upgrade asp.net core targeting framework 4.6.1 from vs2015 to vs2017 - One or more compilation references are missing
See original GitHub issuehave upgraded my asp.net core,using project.json and targeting .net framework 4.6.1 on visual studio 2015 to visual studio 2017.
I have multiple projects in the solution where the main application is referencing them by project reference(all of them target net461).
When running the application I get
One or more compilation references are missing. Possible causes include a missing 'preserveCompilationContext' property under 'buildOptions' in the application's project.json.
Screenshot:
And my csproj: webapp.txt
I’ll try to create a project to see if I can reproduce.
Issue Analytics
- State:
- Created 7 years ago
- Comments:20 (12 by maintainers)
Top Results From Across the Web
upgrade asp.net core targeting framework 4.6.1 from ...
One or more compilation references are missing. Possible causes include a missing 'preserveCompilationContext' property under 'buildOptions' in ...
Read more >Troubleshoot .NET Framework targeting errors
This article provides resolutions for MSBuild errors that might occur because of reference issues.
Read more >Targeted .NET Frameworks - Visual Studio (Windows)
When you open a project that targets an earlier framework version, Visual Studio can automatically upgrade the project or leave the target as-is ......
Read more >Building a project that target .NET Framework 4.5 in Visual ...
So, the fix is simple: just copy the files from that package to C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4 ...
Read more >.NET core vs .NET framework
Wondering about the difference between .NET Core & .NET Framework? Here's a quick guide on how to pick the right runtime environment for...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@livarcocc Looks like I found a way how to reproduce it:
@using ClassLibrary2
example: WebApplication1.zip
I got the same error message, in my case I had to fully qualify my Model (@model Project.Namespace.Classname) and then it worked.
Best regards Dominic Rooijackers