Skip to content

C# string interpolation causes SKC5 compiler error #17

@StefanCodes

Description

@StefanCodes

Hi,

I'm maintaining a project that uses SharpKit (5.5.0) and I think I've found a bug in SKC, but I'm not the original developer and am not 100% clear on the SharpKit pipeline. I'd like to know if this is a SharpKit bug, a configuration issue in my project, or if I'm just doing something fundamentally wrong.

I have a web project that contains both legacy pages using WebForms, and newer pages using WebAPI+SharpKit. The project compiles in Visual Studio, but the build ultimately fails with Unexpected character $'`.

I've traced the problem to a codebehind file for a legacy WebForms page - a logging statement was refactored to use string interpolation instead of String.Format(). The solution builds successfully if I revert that line.

I'm assuming that the issue is the SharpKit compiler isn't aware of the C# 6 string interpolation syntax, so when the compiler parses the project, it trips over this syntax (even though the problem code is not in a file that SharpKit needs to compile).

Does that make sense? If so, are there any options for a workaround? If not, can you suggest where I might look to diagnose this issue?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions