Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post May 31, 2012 03:16 PM by little.chimmy
Apr 14, 2011 11:41 AM|LINK
I am following the asp.net MVC tutorials for getting started with MVC3 (http://www.asp.net/mvc/tutorials/getting-started-with-mvc3-part5-cs)
but get an error when trying to add the controller.
I use VS2010 on Windows XP Pro.
I have created the app, everything going well until I try to add a controller with read/write actions & views, using Entity Framwork.
The error is :
Could Not load file or assemby. File:// \\MyServername\Mynetworkpath..\MyApp..\packages\EntityFramework.4.1.10331.0\lib\EntityFramework.dll or one of itd dependencies. Operation is not supported. (Exception from HRESULT : 0x80131515)
I have checked that the file is definately in the location advised (it is also in the bin folder of MyApp), and that the folder is not read only, and even added Full control to Everyone (I know this is not good practice but wanted to rule out permission
I have also tried changing the reference to the dll in myApp to be Copy Local = true but this made no difference.
I can add empty controllers & controllers with empty read/write actions fine.
I have trawled through google and searched the forums, and have found similar problems but none the same. Has anyone any idea what may be causing the issue?
Apr 14, 2011 12:05 PM|LINK
The problem was that EF need another dll for SQL CE 4 (System.Data.SqlServerCe.Entity.dll)
and we need to put some configuration on web.config:
<remove invariant="System.Data.SqlServerCe.4.0" />
<add name="Microsoft SQL Server Compact Data Provider 4.0" invariant="System.Data.SqlServerCe.4.0" description=".NET Framework Data Provider for Microsoft SQL Server Compact" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=188.8.131.52, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />
This is actually a reply from stackoverflow:
Hope that helps.
Apr 14, 2011 12:34 PM|LINK
Thanks rishialagesan, but I am not using SQL CE, I do have a SQL2008 Server but so far have not made any references to this.
I am not running the application in anyway - the error appears as soon as I click the Add button to try and add the controller to the application within VS2010.
Apr 15, 2011 11:30 PM|LINK
I have the same problem...
Apr 17, 2011 02:30 AM|LINK
I'm using the framework well in Win7, not very sure whether it can work properly on the plat form of Windows XP.
I think you can download it again from offical website：http://download.microsoft.com/download/0/7/A/07AC6336-D665-4442-B841-39D11BBF2563/EntityFramework41.exe
Apr 18, 2011 11:41 AM|LINK
In order to run vs2010 successfully.. you need to have windows xp service pack 3 or windows vista or windows7. Please check what version of XP is installed on your machine.
Apr 18, 2011 02:59 PM|LINK
Thank you, I have Windows 7 Professional, Visual Studio 2010 Ultimate and I have the error.
Apr 18, 2011 10:47 PM|LINK
Did you install the ASP.NET MVC 3 Tools Update identified in step one of the tutorial?
Apr 18, 2011 11:06 PM|LINK
Thanks for your help, my problem was that I installed the ASP.NET MVC 3 Tools Update after created the project, then I have to create a new project again. Now all is ok.
Apr 19, 2011 08:00 AM|LINK
Hi, I have XP Pro Version 2002 Service Pack 3 installed, and yes I had downloaded the Tools Update before I began the tutorial.
If I move my entire project to the c: then it will work correctly, however I do not want to do this as it means it won't be backed up and if anything happens to the laptop I will lose any projects saved there.
As I previouslya advised I have allowed Full Control to "Everyone" on the folders on my network share.