1
votes

I am building and running a C# application using Visual Studio Code. I have been using the C# extension 0.3.7 without any problems. Today, I updated the extension to 1.2.1 and the application no longer runs.

When I attempt to use the .Net Core Launcher to run the application, I see the following message:

Run 'Debug: Download .NET Core Debugger' in the Command Palette or open a .NET project directory to download the .NET Core Debugger

When I open up the Command Palette and run this command, then I see this error:

Errors in C:\Users\martin.vscode\extensions\ms-vscode.csharp-1.2.1\coreclr-debug\project.json

The project 'coreclr-debug' does not specify any target frameworks in 'C:\Users\martin\.vscode\extensions\ms-vscode.csharp-1.2.1\coreclr-debug\project.json'.

Here is the frameworks fragment from the project.json file in the coreclr-debug directory:

  "frameworks": {
    "netcoreapp1.0": {
      "imports": [
        "dnxcore50",
        "portable-net45+win8"
      ]
    }
  },

I've also tried upgrading again to Version 1.2.2, but see essentially the same error. Any ideas as to what is happening?

2
Check their Git repo to see if it has been recorded as a bug. This is not a question for Stack Overflow. - Lex Li
Thanks - I'm sorry to be so naive, but how do I check their Git repo to if this is a know issue? - user304582
GitHub allows you to search by keywords. Use the search box at the top of the page. - Lex Li

2 Answers

1
votes

From what I've seen Microsoft made quite a mess in the C:\Program Files\dotnet folder. Run dotnet --info to see where the problem lies (if you get an error, then you have an older version).

My solution was to delete the whole dotnet folder, then run the installer for the SDK again, and use Repair. It worked afterwards (after I cleaned up existing binaries and .vscode folder and re-ran dotnet restore).

0
votes

Hi it is possible after updating the C# library there were some dependency conflicts in your solution.

Try:

dotnet restore //restore dependencies
dotnet build    ///build solution
dotnet run  //run solution