views:

804

answers:

2

I'm currently getting a "Could not load type UI.Administration.Site.master" error message and I'm not really sure as to why.

I have an ASP.NET MVC Project with the UI namespace. Within the project's structure, I have an Admin folder. I right clicked on the Admin folder and chose "Convert to Web Application", but am getting a Could Not Load Type error for my master page.

Are there any special things that must occur in these situations for this to work?

ERROR INFO BELOW

Parser Error Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Could not load type 'UI.Administration.Site'.

Source Error:

Line 1: <%@ Master Language="C#" CodeBehind="Site.master.cs" Inherits="UI.Administration.Site" %>

A: 

Make sure your namespaces match up with your folder structure as well as in your Inherits clause and your CodeBehind attributes. I had the same problem and it was because the namespace in the Inherits attribute didn't match up when I converted.

Joseph
+1  A: 

I had always wondered what this command did. I'm sure I've tried it and seen no result. I finally just looked it up:

"Convert to Web Application" has nothing to do with your scenario. It's for converting Visual Studio .NET and Visual Studio .NET 2003 to Visual Studio .NET 2008.

See "Walkthrough: Converting a Visual Studio 2002 or 2003 Web Project to a Visual Studio 2008 Web Application Project".

John Saunders