Microsoft.DotNet.Props was not found

后端 未结 7 634
梦毁少年i
梦毁少年i 2020-12-02 08:27

I have some error while loading the .net project solution. the error will be like

The imported project \"C:\\Program Files(x86)\\MSBuild\\Microsoft\\VisualSt         


        
7条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-02 09:10

    Option 1:

    Install DotNetCore.1.0.1-VS2015Tools.Preview2.0.3. You can stay in xproj.

    Option 2:

    Install Visual Studio 2017 and auto upgrade from xproj to csproj.

    Option 3:

    Follow below steps to upgrade from xproj to csproj and to stay in Visual Studio 2015.

    Warning: Using the below process you will not be able to use VS2015 to Load PCM web. Instead you have to stick and work with DOTNET CLI (Command Line Prompt) or VSCode IDE

    Step 1: Download and Install .NET Core from this link https://www.microsoft.com/net/download/core

    Step 2: Go to global.json. Modify version number to version installed in PC (for my pc it is 1.0.1).

    Old:
    {
      "projects": [ "Source" ],
      "sdk": { "version": "1.0.0-preview2-003131" }
    }
    
    New:
    {
      "projects": [ ""Source" ],
      "sdk": { "version": "1.0.1-*" }
    }
    

    Step 3: Goto Command Prompt as administrator and run command

    dotnet migrate
    dotnet restore
    dotnet build
    dotnet run
    

提交回复
热议问题