Sunday, August 22, 2010

Project file must include the .NET Framework assembly 'WindowsBase, PresentationCore, PresentationFramework' in the reference list.

   I was adding a splash screen to my Silverlight project and ran into a sudden compile problem with the ASP.NET web site. The compile error was: Project file must include the .NET Framework assembly 'WindowsBase, PresentationCore, PresentationFramework' in the reference list. I verified that the loose Silverlight xaml file was set to just content, with no build action. However, I kept getting that error, even after a clean and rebuild. So I cracked open the project file, and saw that generator was still listed for the xaml files even though it was blank in the IDE:
  1. <content include=
"ClientBin\Themes\GreenGardenTheme.xaml">  

  •  <subtype>Designer</subtype>  



  •  <generator>MSBuild:Compile</generator>  



  • </content>  

  • Changing that to read:
    1. <content include=
    "ClientBin\Themes\GreenGardenTheme.xaml"></content>  
    while correct, still didn’t fix the compile problem. So I poked around some more and discovered that a PNG file had somehow had its build action set to “Page” when I dragged it from the Silverlight project to the web project. “Page” is reserved for WPF apps. In the Silverlight app, it was set to “Resource”

    Read more: 10Rem.NET