Open MortInfinite opened 6 years ago
Tagging @DustinCampbell. Try hooking something up to the WorkspaceFailed
event, and also taking a look at the Compilation
's Diagnostic
s. I suspect something went wrong with loading the project.
The solution.Workspace.WorkspaceFailed event isn't raised.
The project's compilation's diagnostics contains one entry: error CS5001: Program does not contain a static 'Main' method suitable for an entry point
I fixed this issue by adding public
access modifiers to the Program
class and Main
method.
However, now I'm getting the following issue when trying to load a project that targets .net 4.7.2:
[Failure] Msbuild failed when processing the file
'C:\Users\CrispyDrone\Documents\Projects\aop-logging-poc\SampleTarget.net47\SampleTarget.net47.csproj' with message:
The imported project "C:\Users\CrispyDrone\Documents\Projects\aop-logging-poc\Aop.Logging\bin\Debug\netcoreapp2.1\Microsoft.CSharp.targets" was not found.
Confirm that the expression in the Import declaration "C:\Users\CrispyDrone\Documents\Projects\aop-logging-poc\Aop.Logging\bin\Debug\netcoreapp2.1\Microsoft.CSharp.targets" is correct,
and that the file exists on disk. C:\Users\CrispyDrone\Documents\Projects\aop-logging-poc\SampleTarget.net47\SampleTarget.net47.csproj
When I try to open a project that targets dotnet core 2.1, I receive the following error message:
[Failure] Msbuild failed when processing the file 'C:\Users\CrispyDrone\Documents\Projects\aop-logging-poc\SampleTarget\SampleTarget.csproj'
with message: The SDK 'Microsoft.NET.Sdk' specified could not be found.
C:\Users\CrispyDrone\Documents\Projects\aop-logging-poc\SampleTarget\SampleTarget.csproj
output of dotnet --list-sdks
:
$ dotnet --list-sdks
2.1.508 [C:\Program Files\dotnet\sdk]
2.1.510 [C:\Program Files\dotnet\sdk]
3.0.101 [C:\Program Files\dotnet\sdk]
3.1.100 [C:\Program Files\dotnet\sdk]
5.0.100-alpha1-015759 [C:\Program Files\dotnet\sdk]
Version Used: Microsoft.CodeAnalysis NuGet package version 2.6.1
Steps to Reproduce:
Expected Behavior: Expected to see "Program.cs" document in the list of documents contained in "TestProject" project.
Actual Behavior: The project.Documents collection is empty.