Welcome to irritatedVowel.com Sign in | Help

POKE 53280,0: Pete Brown's Blog

Silverlight, WPF, Woodworking, .NET Programming, CNC, Nature, and other topics.
Pete is an MVP for Silverlight Click here to view the MVP profile.

A Microsoft Silverlight MVP and INETA Speaker, Pete Brown writes on a number of topics including Silverlight, WPF, .NET, woodworking and working as a consultant in the DC area. read more

Subscribe

Subscribe to my feed
Add to Technorati Favorites

Community Events



Applied Information Sciences - My Employer

who's online

AddThis Social Bookmark Button

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

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.

  Add to Technorati Favorites
Posted: Tuesday, December 23, 2008 3:40 PM by Pete.Brown
Filed under: , ,

Comments

Dew Drop - December 23, 2008 | Alvin Ashcraft's Morning Dew said:

PingBack from http://www.alvinashcraft.com/2008/12/23/dew-drop-december-23-2008/
# December 23, 2008 5:35 PM

Dealing with the ???Project file must include the .NET Framework assembly ?????? Error | Silverlight Guide said:

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
# December 23, 2008 7:15 PM

Community Blogs said:

In this issue: Pete Brown, Damon Payne, Agata Staniak, Justin Angel, and David Anson. Shoutout: John
# December 30, 2008 12:48 PM

Kurko said:

Thank you Pete, work it for me to! Swith "Page" to "Content"
# March 7, 2009 12:01 PM

John said:

Thanks! Fixed my issue today as well. Exact same scenario.
# April 14, 2009 2:07 AM

Miguel Saez said:

Similar scenario: I got the error after copying an image from a silverlight projecto to an asp.net project. Thanks for posting the solution!
# May 7, 2009 5:44 PM

forgetu said:

Thanks!
# June 8, 2009 3:03 AM

Schuft said:

Thank you !
# June 30, 2009 7:33 AM
Leave a Comment

(required) 

(required) 

(optional)

(required) 

Enter the text you see in the image:

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS