.NET Core - Project version mismatchPublished on 03 Jun 2019 1 min read
This problem usually happens when you’re working on a solution with multiple projects that were created using different versions of the .NET SDK.
The project was restored using Microsoft.NETCore.App version x.x.x, but with current settings, version y.y.y would be used instead
You may encounter this error when running
dotnet build or maybe only on
dotnet publish. In any case, the best way to get rid of this problem for good is the following:
- On the folder where your
.slnfile resides, create a new file named
Directory.Build.props. If you’re not working with a solution (not using Visual Studio), you can use create it on the root directory of your repository (usually where
- With a text editor, add the following content to it:
What these properties do is make your projects always restore and compile using the latest version available.
Try running the command again. If all went right, it should be compiling successfully now!
In case it doesn’t work for you, you can add these lines manually on each of the
I hope that helps you, thanks for reading!
MongoDB on Linux - Data directory /data/db not found1 min read
So, as a distro-hopper I end up installing MongoDB more often than I’d like to admit. On all times, I’ve...Click to read more…
.NET Core API - Method not allowed on PUT and DELETE requests2 min read
Recently, I’ve been working on an Angular app, powered with a .NET Core API. Everything was working well and smoothly...Click to read more…