Welcome to Pete Brown's 10rem.net

First time here? If you are a developer or are interested in Microsoft tools and technology, please consider subscribing to the latest posts.

You may also be interested in my blog archives, the articles section, or some of my lab projects such as the C64 emulator written in Silverlight.

(hide this)

Dealing with the “Project file must include the .NET Framework assembly …” Error

Pete Brown - 23 December 2008

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:

<Content Include="ClientBin\Themes\GreenGardenTheme.xaml" >
  <SubType>Designer</SubType>
  <Generator>MSBuild:Compile</Generator>
</Content>

Changing that to read:

<Content Include="ClientBin\Themes\GreenGardenTheme.xaml" />

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”

<Page Include="ClientBin\Themes\GreenGardenBackground.png" />

Changing that back to “Content” in the IDE fixed it.

I noticed that the above error comes up a zillion times in search, so I thought I’d post my own solution here. Hope it helps you out.

     
posted by Pete Brown on Tuesday, December 23, 2008
filed under:      

14 comments for “Dealing with the “Project file must include the .NET Framework assembly …” Error”

  1. Felickzsays:
    Reading your book ... 4 in action and just went through the splash page section at the end! All i had to do was add this as content(which you eluded to) and my WinFX exceptions went away.

Comment on this Post

Remember me

3 trackbacks for “Dealing with the “Project file must include the .NET Framework assembly …” Error”

  1. Dew Drop - December 23, 2008 | Alvin Ashcraft's Morning Dewsays:
    PingBack from http://www.alvinashcraft.com/2008/12/23/dew-drop-december-23-2008/
  2. Dealing with the ???Project file must include the .NET Framework assembly ?????? Error | Silverlight Guidesays:
    PingBack from http://www.silverlightguide.com/news/dealing-with-the-%e2%80%9cproject-file-must-include-the-net-framework-assembly-%e2%80%a6%e2%80%9d-error
  3. Community Blogssays:
    In this issue: Pete Brown, Damon Payne, Agata Staniak, Justin Angel, and David Anson. Shoutout: John