Microsoft.DotNet.Props was not found

Visual Studio-2015

Visual Studio-2015 Problem Overview


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

The imported project "C:\Program Files(x86)\MSBuild\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Props" was not found.Confirm that the path in the <Import> declaration is correct, and that the file exist on disk.

How to solve this problem?

Visual Studio-2015 Solutions


Solution 1 - Visual Studio-2015

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

Solution 2 - Visual Studio-2015

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

Solution 3 - Visual Studio-2015

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

Solution 4 - Visual Studio-2015

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

Solution 5 - Visual Studio-2015

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.

Solution 6 - Visual Studio-2015

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

Solution 7 - Visual Studio-2015

I ran into this issue after I installed VS2017 community edition. This is how I resolved the issue: Go to this folder: C:\Program Files\dotnet\sdk Find the folder named: 1.0.0 and rename it to xx.xx.xx

For some reason VS2015 switch back (or default to ) to this folder after VS2017 is installed so renaming it forces VS2015 to look in other folders. This is what I have in my global.json: "sdk": { "version": "1.0.0-preview2-003131" }

Updated: You will have to change the folder name back to 1.0.0 when you switch over to VS2017. I had to rename it back to migrate my vs2015 .Net Core solution to 2017.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionNavaneethanView Question on Stackoverflow
Solution 1 - Visual Studio-2015Jon DouglasView Answer on Stackoverflow
Solution 2 - Visual Studio-2015Jay HaybatovView Answer on Stackoverflow
Solution 3 - Visual Studio-2015Frank CannonView Answer on Stackoverflow
Solution 4 - Visual Studio-2015Vivek NatarajanView Answer on Stackoverflow
Solution 5 - Visual Studio-2015Alex M.View Answer on Stackoverflow
Solution 6 - Visual Studio-2015vivek86View Answer on Stackoverflow
Solution 7 - Visual Studio-2015MuazzamAliView Answer on Stackoverflow