views:

534

answers:

1

I'm going over some ASP.NET tutorials and the first one I'm looking at is how to make a Master Page. When I do create a master page, I get an error:

Value cannot be null.  Parameter name: frameworkName

It occurs in the first line of my master page (MasterPage.master) and it's the default page that gets created- I haven't modified it at all:

<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>

Could somebody tell me what is the frameworkName parameter and how can I get rid of this error? FYI: I'm using Visual Studio 2010.

+3  A: 

This is a bug in VS 2010:

The reason you are seeing this error is that there are assembly references in the xaml which you are failing to resolve. There is a startpage.csproj in the same directory as the .xaml file. Please copy both to the new folder and open the project file in VS2010. This should work.

http://connect.microsoft.com/VisualStudio/feedback/details/485162/edit-startpage-xaml-frameworkname-value-cannot-be-null

Here is master file that I currently have, so I would check for missing assemblies?:

<%@ Master Language="C#" AutoEventWireup="true" CodeFile="Site.master.cs" Inherits="SiteMaster" %>

Can you also recreate the solution and import into the new .sln file ?

JonH
@JonH, thanks for the info! Strangely, the problem fixed itself after I restarted VS2010 and re-opened the project. It said that the project was built for an older version of .NET and it asked me to convert to .NET 4.0; after converting, the error was gone.
Lirik
@Lirik - Yes this is scheduled to be fixed in the next patch / update to VS2010. It includes a fix for missing assembly references. This error could easily go away by recreating the solution and reimporting your master site as well as any other page.
JonH