csproj file showing The expression ""Program.cs".GetPathsOfAllDirectoriesAbove()" cannot be evaluated.
See original GitHub issueIssue Description
In a new Dot Net Core 3 console application, the .csproj file is showing an error The expression ""Program.cs".GetPathsOfAllDirectoriesAbove()" cannot be evaluated.
Steps to Reproduce
Create new .NET 3 console application. Open in VSCode. Open .csproj file
Expected Behavior
No errors
Actual Behavior
Error at end of file:
Logs
OmniSharp log
OmniSharp server started with Mono 6.6.0. Path: /Users/johntsombakos/.vscode-insiders/extensions/ms-vscode.csharp-1.21.6/.omnisharp/1.34.6/omnisharp/OmniSharp.exe PID: 99757
Starting OmniSharp on MacOS 10.15.1 (x64)
DotNetPath set to dotnet
Located 2 MSBuild instance(s)
1: Mono 16.3 - "/Library/Frameworks/Mono.framework/Versions/6.6.0/lib/mono/msbuild/Current/bin"
2: StandAlone 16.3 - "/Users/johntsombakos/.vscode-insiders/extensions/ms-vscode.csharp-1.21.6/.omnisharp/1.34.6/omnisharp/.msbuild/Current/Bin"
Registered MSBuild instance: Mono 16.3 - "/Library/Frameworks/Mono.framework/Versions/6.6.0/lib/mono/msbuild/Current/bin"
CscToolExe = csc.exe
CscToolPath = /Users/johntsombakos/.vscode-insiders/extensions/ms-vscode.csharp-1.21.6/.omnisharp/1.34.6/omnisharp/.msbuild/Current/Bin/Roslyn
Detecting Cake files in '/Users/johntsombakos/Projects/WorkflowStatus'.
Could not find any Cake files
Detecting projects in '/Users/johntsombakos/Projects/WorkflowStatus/WorkflowStatus.sln'.
Queue project update for '/Users/johntsombakos/Projects/WorkflowStatus/WorkflowStatus/WorkflowStatus.csproj'
Detecting CSX files in '/Users/johntsombakos/Projects/WorkflowStatus'.
Could not find any CSX files
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpFormattingWorkspaceOptionsProvider, Order: 0
Loading project: /Users/johntsombakos/Projects/WorkflowStatus/WorkflowStatus/WorkflowStatus.csproj
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.RenameWorkspaceOptionsProvider, Order: 100
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.EditorConfigWorkspaceOptionsProvider, Order: 200
Configuration finished.
Omnisharp server running using Stdio at location '/Users/johntsombakos/Projects/WorkflowStatus' on host 99653.
Successfully loaded project file '/Users/johntsombakos/Projects/WorkflowStatus/WorkflowStatus/WorkflowStatus.csproj'.
Adding project '/Users/johntsombakos/Projects/WorkflowStatus/WorkflowStatus/WorkflowStatus.csproj'
Update project: WorkflowStatus
Solution initialized -> queue all documents for code analysis. Initial document count: 3.
C# log
Empty
Environment information
VSCode version: 1.40.0-insider C# Extension: 1.21.6
Mono Information
OmniSharp using global mono :6.6.0Dotnet Information
.NET Core SDK (reflecting any global.json): Version: 3.1.100-preview2-014569 Commit: 4bd5d24d87Runtime Environment: OS Name: Mac OS X OS Version: 10.15 OS Platform: Darwin RID: osx.10.15-x64 Base Path: /usr/local/share/dotnet/sdk/3.1.100-preview2-014569/
Host (useful for support): Version: 3.1.0-preview2.19525.6 Commit: 5672978d91
.NET Core SDKs installed: 2.2.100 [/usr/local/share/dotnet/sdk] 2.2.101 [/usr/local/share/dotnet/sdk] 2.2.103 [/usr/local/share/dotnet/sdk] 2.2.104 [/usr/local/share/dotnet/sdk] 2.2.105 [/usr/local/share/dotnet/sdk] 2.2.106 [/usr/local/share/dotnet/sdk] 2.2.107 [/usr/local/share/dotnet/sdk] 2.2.203 [/usr/local/share/dotnet/sdk] 2.2.300 [/usr/local/share/dotnet/sdk] 2.2.301 [/usr/local/share/dotnet/sdk] 2.2.401 [/usr/local/share/dotnet/sdk] 2.2.402 [/usr/local/share/dotnet/sdk] 3.0.100 [/usr/local/share/dotnet/sdk] 3.1.100-preview2-014569 [/usr/local/share/dotnet/sdk]
.NET Core runtimes installed: Microsoft.AspNetCore.All 2.2.0 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.All] Microsoft.AspNetCore.All 2.2.1 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.All] Microsoft.AspNetCore.All 2.2.2 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.All] Microsoft.AspNetCore.All 2.2.3 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.All] Microsoft.AspNetCore.All 2.2.4 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.All] Microsoft.AspNetCore.All 2.2.5 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.All] Microsoft.AspNetCore.All 2.2.6 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.All] Microsoft.AspNetCore.All 2.2.7 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.All] Microsoft.AspNetCore.App 2.1.12 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 2.2.0 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 2.2.1 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 2.2.2 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 2.2.3 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 2.2.4 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 2.2.5 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 2.2.6 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 2.2.7 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 3.0.0 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 3.1.0-preview2.19528.8 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 2.1.13 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 2.2.0 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 2.2.1 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 2.2.2 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 2.2.3 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 2.2.4 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 2.2.5 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 2.2.6 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 2.2.7 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 3.0.0 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 3.1.0-preview2.19525.6 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs: https://aka.ms/dotnet-download
Visual Studio Code Extensions
Extension | Author | Version |
---|---|---|
Angular2 | johnpapa | 8.1.1 |
auto-close-tag | formulahendry | 0.5.6 |
azure-account | ms-vscode | 0.8.7 |
csharp | ms-vscode | 1.21.6 |
debugger-for-chrome | msjsdiag | 4.12.1 |
githistory | donjayamanne | 0.4.6 |
material-icon-theme | PKief | 3.9.1 |
msbuild-project-tools | tintoy | 0.3.2 |
ng-template | Angular | 0.802.3 |
night-owl | sdras | 1.1.3 |
night-wolf | MaoSantaella | 1.8.1 |
noctis | liviuschera | 10.14.0 |
open-in-browser | techer | 2.0.0 |
output-colorizer | IBM | 0.1.2 |
path-intellisense | christian-kohler | 1.4.2 |
quicktype | quicktype | 12.0.46 |
rushnav | DevExpress | 0.0.5 |
vetur | octref | 0.22.6 |
vscode-azurefunctions | ms-azuretools | 0.20.0 |
vscode-docker | ms-azuretools | 0.8.2 |
vscode-eslint | dbaeumer | 1.9.1 |
vscode-svgviewer | cssho | 2.0.0 |
vscode-typescript-tslint-plugin | ms-vscode | 1.2.2 |
vscodeintellicode | VisualStudioExptTeam | 1.2.0 |
vue-vscode-snippets | sdras | 1.8.0 |
winteriscoming | johnpapa | 1.3.0 |
Issue Analytics
- State:
- Created 4 years ago
- Reactions:6
- Comments:11 (3 by maintainers)
Top GitHub Comments
Seems to be related to having .Net Core 3.1 preview installed. Even thought the .csproj file indicates
<TargetFramework>netcoreapp3.0</TargetFrameWork>
, the .Net Core 3.1 preview tooling is being referenced. Adding a global.json file to specify .Net Core 3.0:eliminated the error. Updating to a target framework of netcoreapp3.1 (without the global.json) still shows the error)
Yes you can disable the extension and you will see the error go away. There is already an open issue there too https://github.com/tintoy/msbuild-project-tools-vscode/issues/59