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
problems).
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?
Thanks your assistance is greatly appreciated!
RouX
Imagination is Intelligence Having Fun :)
Growing Old is Mandatory, Growing Up is Optional :P
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.
Thanks your assistance is greatly appreciated!
RouX
Imagination is Intelligence Having Fun :)
Growing Old is Mandatory, Growing Up is Optional :P
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.
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.
Richard Emanuel Masaya Amézquita
Enginner in systems and computers sciences
Marked as answer by cts-mgraham on May 23, 2011 03:49 PM
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.
Thanks your assistance is greatly appreciated!
RouX
Imagination is Intelligence Having Fun :)
Growing Old is Mandatory, Growing Up is Optional :P
roux76
Member
71 Points
31 Posts
EntityFramework.dll Could not be loaded
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 problems).
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?
RouX
Imagination is Intelligence Having Fun :)
Growing Old is Mandatory, Growing Up is Optional :P
rishialagesa...
Participant
789 Points
179 Posts
Re: EntityFramework.dll Could not be loaded
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:
<system.data> <DbProviderFactories> <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=4.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" /> </DbProviderFactories> </system.data>This is actually a reply from stackoverflow:
http://stackoverflow.com/questions/4762857/using-sql-server-ce-4-on-a-remote-host-with-mvc-3
Hope that helps.
roux76
Member
71 Points
31 Posts
Re: EntityFramework.dll Could not be loaded
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.
RouX
Imagination is Intelligence Having Fun :)
Growing Old is Mandatory, Growing Up is Optional :P
rema43001
Member
28 Points
38 Posts
Re: EntityFramework.dll Could not be loaded
Apr 15, 2011 11:30 PM|LINK
I have the same problem...
Enginner in systems and computers sciences
Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: EntityFramework.dll Could not be loaded
Apr 17, 2011 02:30 AM|LINK
Hi:)
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
Thx
smishra1983
Member
6 Points
4 Posts
Re: EntityFramework.dll Could not be loaded
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.
(Software Engineer)
rema43001
Member
28 Points
38 Posts
Re: EntityFramework.dll Could not be loaded
Apr 18, 2011 02:59 PM|LINK
Thank you, I have Windows 7 Professional, Visual Studio 2010 Ultimate and I have the error.
Enginner in systems and computers sciences
chohmann
Star
9385 Points
1644 Posts
Re: EntityFramework.dll Could not be loaded
Apr 18, 2011 10:47 PM|LINK
Did you install the ASP.NET MVC 3 Tools Update identified in step one of the tutorial?
rema43001
Member
28 Points
38 Posts
Re: EntityFramework.dll Could not be loaded
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.
Enginner in systems and computers sciences
roux76
Member
71 Points
31 Posts
Re: EntityFramework.dll Could not be loaded
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.
RouX
Imagination is Intelligence Having Fun :)
Growing Old is Mandatory, Growing Up is Optional :P