sdk: upgrade asp.net core targeting framework 4.6.1 from vs2015 to vs2017 - One or more compilation references are missing
have 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.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 20 (12 by maintainers)
@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