I am working on a ASP.NET MVC2 website and now I need to add more projects. My current webproject looks like this :
MyProject
- MyProject
-- [MyProjects project files]
- [Solution files] (plus a webconfig)
I started to takeout just the MyProject and rename it so that the structure looked like this :
MyProject.Website
- [MyPrject.Website project files]
Then I Created a MyPrject folder where I placed both the MyProjectSite and another project called MyProject.Integration, like this :
MyProject
- MyProject.Website
- MyProject.Integration
Then I started Visual Studio 2010 and created a blank solution, this gave me the following file structure :
MyProject
- MyProject.Solution
-- [Solution files] (no web.config)
- MyProject.Website
-- [Website project files]
- MyProject.Integration
-- [Integration project files)
When looking in Visual Studio 2010 I can see that my Solution(MyProject) contains two projects(MyProject.Website and MyPrject.Integration).
Now I hit Rebuild all and first get the following Exception:
Error 1 Could not load type 'System.Data.Entity.Design.AspNet.EntityDesignerBuildProvider'. C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\web.config 129
If I just rebuild the MyProjectIntegration everything is working fine but uts when building the MyProject.Website that I get this exception.
Its strange that I get a exception in a web.config not placed within my projects?
I googled the problem and found out that I could add a row to my web.config in the MyProject.Website, this is how it looks
<compilation debug="true" targetFramework="4.0">
<assemblies>
<add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add assembly="System.Data.Entity.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
</assemblies>
</compilation>
The "System.Data.Entity.Design" row was added
When this was dune I rebuilded again and then I got the following exception :
Error 1 The type or namespace name 'ModelViewRegisterFilter' does not exist in the namespace 'Biss.Views.ViewClasses' (are you missing an assembly reference?) c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\MyProject.website\e0c6b507\13ca6533\App_Web_3ri01j0f.0.cs 178
What am I doing wrong? I just need to have a main Solution that contains the two projects?
Edit1: Pleas note that all the projects was working just fine before I tried to place them in this solution.
Instead of creating a blank solution, why not try starting off with the mvc solution template and then add your existing projects and files to it.