I got strange compile-time error:
Project file must include the .NET Framework assembly 'WindowsBase, PresentationCore, PresentationFramework' in the reference list.
This project is aspnet mvc web application and all was fine开发者_StackOverflow社区 for a long time.
After I added them Build went fine, but what could be a reason for this error?
It was caused by addition of file with .xaml extension. By default, VS.NET try to complie it.
When I changed settings to BuildAction: none, copy to output: always I was able to remove those references.
i know that this error was solved, but in my situation, solution was different.
If you copied or moved an item from another project, its "Build Action" property might be set to "Page". This happened to me, and changing it to "Resource" or "Content" (because that's what the item was) fixed the problem.
You are using some type from the assemblies in your code. As a server side project this is almost certainly an error.
VS will normally give you an error immediately on entering the name of something for which it cannot find a definition so it seems odd that you got as far as a compile before noticing.
精彩评论