Microsoft.DotNet.Props was not found

后端 未结 7 578
梦毁少年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条回答
  • 2020-12-02 09:06

    Although this question has already been answered. I recently came across the same issue. The more specific answer is that you need to install the Visual Studio 2015 Tools (Preview 2):

    https://www.microsoft.com/net/download/core

    Direct Download:

    https://go.microsoft.com/fwlink/?LinkId=827546

    Because this wasn't straight forward and I was working on a 1.1 dotnet core project, I accidentally skipped this step and only installed the Windows SDK. I reported an issue here:

    https://github.com/dotnet/core/issues/378

    0 讨论(0)
  • 2020-12-02 09:09

    You need to install Microsoft .NET Core 1.0.1 tooling preview (the current one is Preview 2).

    0 讨论(0)
  • 2020-12-02 09:09

    If you've recently installed VS 2017 and you get this error and your project was using project.json, it's probably that you have to upgrade your solution to csproj rather than the old project.json format. If you open the project in vs2017 it should upgrade it automatically. Check out this article if you need more info Project-json to csproj

    0 讨论(0)
  • 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
    
    0 讨论(0)
  • 2020-12-02 09:13

    I know that i am quite late to the party, but as someone who has run into these problems time and again, these 2 articles really helped me in understanding why those issues happened in the first place and how to fix them.

    a brief update about my current setup: i had both VS2015 and VS2017 installed. I was using VS2015 with .net Core SDK 1.0.0-preview2-003133, which contains .Net Core 1.0.1. Upon installing VS 2017, it automatically installed .Net Core 1.1.0 and set that as the default .Net Core version on my PC, which led to all the problems.

    hopefully others would find it useful too :)

    no executable found matching command dotnet projectmodel server

    developing two versions net core sdk side

    0 讨论(0)
  • 2020-12-02 09:16

    It seems that Microsoft entirely rejiggled the solution structure in VS2017... That's how I resolved the issue in VS2017:

    • Opened the .sln file
    • In the "Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = 'NNN', 'NNN.xproj'... " line - replaced the "NNN.xproj" with the "NNN.csproj", and... vuala!

    hope it helps.

    0 讨论(0)
提交回复
热议问题