2

I am taking over a ASP.NET MVC 3 project from a friend who has not got the time to work on it. I copied across all his files, setup the database etc and then opened it in VS2010. I proceeded to change the MS-SQL connection settings and then started the project in debug mode in VS.

As a note we are both using Framework versions v4.0.30319

It ran fine 100% without issue. I then closed the project, shut off the machine and now need to get started on adding some items to the website. I ran the site with VS again and go an error, specifically with the Frameworks web.config file, saying:

Error 77 Could not load type 'System.Data.Entity.Design.AspNet.EntityDesignerBuildProvider'. C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\web.config

Looking this up I found a resolution to this issue at http://forums.asp.net/t/1698282.aspx/1 and they solved it by adding the following line to the site apps web.config:

<add assembly="System.Data.Entity.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />

Running the site again now produced two errors:

Error 77 The type or namespace name 'ChangePasswordModel' does not exist in the namespace 'ComputechIT.Models' (are you missing an assembly reference?) c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\computechit\1111c5a1\826189ca\App_Web_43fo251f.0.cs 184

Error 78 The type or namespace name 'RegisterModel' does not exist in the namespace 'ComputechIT.Models' (are you missing an assembly reference?) c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\computechit\1111c5a1\826189ca\App_Web_43fo251f.2.cs 184

Researched further and found that someone mentioned removing the obj directory and contents from within the project folder, which I did, to no avail.

So am a little stumped now as to why this site worked fine the first time I used it. Something seemed to have changed between then and when I next turned on the PC and tried to run the site.

I've done no updates of any sort on this PC. Any help would be appreciated.

Sergey Berezovskiy
  • 232,247
  • 41
  • 429
  • 459
John Cogan
  • 1,034
  • 4
  • 16
  • 39
  • try cleaning the project or cache of VS – Dakait Mar 07 '13 at 10:19
  • Hi That did not seem to work. I cleared out all the directorys as listed below: C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files Each time I run the project it adds the files to the folder C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files and then the same errors come up even after I have closed VS, deleted the temp files and reopen. – John Cogan Mar 07 '13 at 10:47
  • have a look at http://stackoverflow.com/questions/520593/how-do-you-clear-your-visual-studio-cache-on-windows-vista – Dakait Mar 07 '13 at 10:48
  • Hi Yep that was the first post I saw after your comment and I emptied all those folders (The ones that existed) as well as the items listed on http://weblogs.asp.net/psheriff/archive/2011/11/08/clean-up-after-visual-studio.aspx – John Cogan Mar 07 '13 at 10:50
  • remove the dll in the bin folder of both debug and release dir clean and build again, if the problem persists try shutting down NOT restarting your PC (trust me some times it works) – Dakait Mar 07 '13 at 10:50
  • Hi dakait. Did that and now I get 'Could not load type "ComputechIT.MvcApplication' due to the missing DLLs in the bin directory. – John Cogan Mar 07 '13 at 11:11
  • yup but the application dlls shoud be generated on build, e.g you application name is foo, then in the bin dir remove foo.dll and foo.pdb, if you have added 3 party libraries that you have to include again – Dakait Mar 07 '13 at 11:15
  • 1
    I started getting similar errors after setting `MvcBuildViews` to `true`. The forms authentication views seemed to appear out of nowhere as if auto-generated, and my own hidden files which I had "excluded from project" (which were also full of errors) needed to be deleted. – Benjamin Apr 01 '13 at 13:47

0 Answers0