MetadataException in Release Build
My Program uses EF to access data from a SQL CE database. When debug the application using debug setup it works fine but if I use release setup I get a MetadataException when the program tries to access the database through EF. What I've checked so far:
My app.config:
<?xml version="1.0"?>
<configuration>
<connectionStrings>
<add name="GeoDataEntities" connectionString="metadata=res://*/Model.EF.Model.csdl|res://*/Model.EF.Model.ssdl|res://*/Model.EF.Model.msl;provider=System.Data.SqlServerCe.3.5;provider connection string="Data Source=|DataDirectory|GeoData.sdf"" providerName="System.Data.EntityClient" />
</connectionStrings>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0" />
</startup>
</configuration>
The assembly Model.EF is the namespace and Model the name of the edmx, I think that should be right.
I know that there a lot of posts and blogs about MetadataException and I've tried to solve this but nothing have worked so far.
Best regards
Jay
我真的不知道自己做了什么,但是从TFS检入并检出后,它就能正常工作。
链接地址: http://www.djcxy.com/p/38800.html