-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The expression cannot be evaluated. #59
Comments
What version of the .NET Core SDK are you using? |
Can you try turning up the log level and seeing what gets printed to the output pane? |
Hi, My app use .NET Core SDK 3.1.100.
|
I don't know how to turning up the log level in the VSCode. Can you give me a hint? |
You’ll find the log level under VS Code settings (search for MSBuild). |
Here are the logs:
|
Ok, it’s not going to work with 3.1 SDK yet because they’ve made breaking changes to MSBuild / SDK targets again. I can’t just upgrade the language server to target 3.1 yet, though, because 3.1 is preview and most people won’t have the required runtime installed yet. Sorry, but I’m going to have to spend a couple of days thinking about how to handle this... |
@tintoy looks like the same error as here dotnet/vscode-csharp#3396 but I have no idea how to tackle this since I can't reproduce it OmniSharp is moving to msbuild 16.4 now, perhaps that will be enough to resolve it? |
actually, scratch that. That issue in the OmniSharp VS Code repo was reported by mistake - the user thought it's coming from OmniSharp which led me to investigate it. |
I am "the user" referenced above, and had reported that problem. Disabling the extension removes the error. Shame, this extension is super helpful! Hopefully it can get resolved soon |
Thanks, yes, I’m going to try upgrading to the latest MSBuild to see if that helps :) Will post a new version of the VSIX to try out in a day or 2 (not near my laptop till tomorrow). |
Can you try this one out for me and see if it works for you? |
Version 0.3.3 solved the issue! 👍 |
I just confirmed |
Thanks! I’ll publish the new version first thing tomorrow :) |
Is this fixed? What's the required procedure to fix (i.e. what product needs to be updated and what version)? Thanks |
This was fixed quite some time ago - it was due to a version mismatch between the MSBuild engine used by the language server and the MSBuild engine distributed with the .NET Core SDK. |
It works correctly in the currently published version of the extension. |
Here are the repro steps:
Create MVC site
dotnet new mvc -n m1 cd m1
Open VSCode
code .
Open
m1.csproj
You will see the following red line:
The error message is:
The text was updated successfully, but these errors were encountered: