Reputation: 7227
I've upgraded from .NET Core 2.0 to 2.1.1 (so many elements that gets highly confusing).
I built my project and now I'm getting this error:
Cannot find compilation library location for package 'Microsoft.NETCore.App'
I don't know what other information should I provide. Please guide me in providing more info on this issue.
It's such a frustrating experience. Upgrading backward compatible version in Semantic Versioning shouldn't break things. I wish they had versioned this release as .NET Core 3.0, so that we wouldn't upgrade. Any help?
Update: I created this issue on GitHub.
Upvotes: 5
Views: 5411
Reputation: 1136
I did simple fix for this issue, I selected option to remove additional files at destination before publish and then it solved my issue.
Upvotes: 3
Reputation: 1357
Clean your hosted folder and install fresh. Re-installing the SDK/runtimes did not fully correct the issue for me.
Resolved this error by:
Also try with an empty new project (File -> New Project -> ASP.NET Core Web Site -> 2.1)
Upvotes: 0
Reputation: 1046
Just set MvcRazorExcludeRefAssembliesFromPublish to false in your .csproj file and that should fix the issue.
Upvotes: 2
Reputation: 239300
You're missing the SDK. Download and install 2.1.301 (at the time of writing), and you'll be okay. FWIW, you're not forced to upgrade. If the packages upgraded automatically, you either set a wildcard on package version or you just did something like "Upgrade all" in the NuGet Package Manager GUI. If you're concerned about things upgrading without your permission, then use explicit version numbers and pick and choose each package to upgrade manually.
Upvotes: 0