4

I am building a dotnetcore project using Microsoft.NETCore.App version 1.1.0. I had tried updating to 1.1.1, but our project uses NUnit, which is not yet fully supported in 1.1.1. So, I had to roll it back. However, as part of the update, I had to install the .Net Core app of 1.1.1. After rolling back, I re-installed 1.1.0, and I still get the following error when I build:

Error   MSB4019 The imported project "C:\Program Files\dotnet\sdk\1.0.1\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 exists on disk.

I looked in the file directory for all versions of the sdk that I have installed, and none of them have that directory. This worked until my attempt to update this morning. I am not sure why it still fails after reinstalling the older version of .Net Core. This is a blocker for me, as it prevents me from building and finishing a feature for an API. Any help is much appreciated.

Update: The obvious answer is to move the project to VS2017, but unfortunately that is not currently an option, as our project uses NUnit for testing, which is not yet fully supported in VS2017 and dotnetcore.

3
  • With the release of VS2017 and .NET Core tooling 1.0 RTM on Mar 7, don't waste your time on VS2015. Commented Mar 16, 2017 at 1:39
  • 1
    Unfortunately, I can't move to 2017 because our suite uses NUnit, which has limited compatibility with VS2017 and dotnetcore Commented Mar 16, 2017 at 14:29
  • It is rather interesting that you mentioned NUnit. You can safely develop a .NET Standard class library and then run NUnit test cases in a classic .NET Framework class library project. Commented Mar 16, 2017 at 14:41

1 Answer 1

5

To continue using xproj and project.json, you must only use Visual Studio 2015 and .NET Core CLI preview 2. Run dotnet--info to figure out which version of .NET Core CLI you have. You must use a version that starts with "1.0.0-preview2". Anything newer does not support xproj or project.json.

If you have multiple versions of .NET Core CLI installed, executing "dotnet.exe" will use the latest version by default. You can control this by adding a file named "global.json" to your project and setting the SDK version in it. Example:

{
  "sdk": { "version": "1.0.0-preview2-003131" }
}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.