I have an issue, my host only supports NET 4.0 so i cannot properly use EF 5.0, so I would like to downgrade, but i do not know how to do that.

I tried just to change version in web.config but it didn't help, i just get errors, when i run application.

Should i do something special and should i then delete and create whole model again?

I didn't choose any versions when i first started with EF, i just followed a small wizard which generated me a model, but i think the model is of EF5

Thanks

有帮助吗?

解决方案

.NET 4.0 is ok. Dont use EF 4.0 because its not about EF version. Just change the target framework to .NET 4.0 of application and dependent libraries. After that you probably going to get some errors. Uninstall and install your entity framework dll from nuget. Because of this:

<package id="EntityFramework" version="5.0.0" targetFramework="net40" />

Then you should recreate your model again. Because some of classes may cause errors which are comes with 4.5 Framework like spatial location...

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top