Entity Framework: Unable to load the specified metadata resource

后端 未结 2 1573
醉梦人生
醉梦人生 2021-01-01 01:08

I decided to move Entity Connection String from app.config to code. However after setting it up like this:

    public static string         


        
2条回答
  •  清酒与你
    2021-01-01 01:56

    I upgraded to the new csproj format(Visual studio 2017 with simple format) after that I started getting this error. The csproj has a feature where you don't need to include each file instead it includes all the relevant files under the folder by default so the entity framework files are treated same way so those are not embedded into the assembly by default.

    I need to go and manually change the build action of my edml file(edmx in case of Microsoft entity framework) to 'DevartEntityDeploy' (I hope it is EntityDeploy for Microsoft Entity framework)and build it which solved my problem

提交回复
热议问题