5

We are migrating our project to .NET Core and I'm uppgrading our build server following the steps presented on this page https://www.microsoft.com/net/core#windows.

After intalling VS 2015 update 3 and DotNetCore.1.0.0-VS2015Tools.Preview2 and building the project I get an error saying: The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DotNet.Web\Microsoft.DotNet.Web.targets" was not found. I checked the build server and sure enough the DotNet.Web folder which should be found at C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\ is missing.

Why was this not installed and how can I fix this?

mstrand
  • 2,973
  • 5
  • 24
  • 26

1 Answers1

10

The problem was that when I applied the VS Update 3 on VS 2015 I did not check the Microsoft Web Developer Tools option. I had to do the following to get the folder and file in place.

Program and Features -> Visual Studio -> right click and select change -> select modify -> check Microsoft Web Developer Tools -> click update.

After the update run the DotNetCore.1.0.0-VS2015Tools.Preview2.exe file again and select repair (this step is necessary).

This will create the C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DotNet.Web and Microsoft.DotNet.Web.targets file

James
  • 2,823
  • 22
  • 17
mstrand
  • 2,973
  • 5
  • 24
  • 26
  • This worked (though we had to add the option "SKIP_VSU_CHECK=1" to the DotNetCore Tools exe to make it run. However, now builds are dying with the error 'Project *my_project_name* does not have a lock file. Please run "dotnet restore" to generate a new lock file.' Any suggestions? – Mark Meuer Jul 25 '16 at 20:13
  • This might work also for another issue related to targeting. I will try, thank you. – boyukbas Oct 18 '19 at 06:44