SqlServer.Dmf.dll required in Global Assembly Cache upon wpf app installation

不打扰是莪最后的温柔 提交于 2019-12-11 07:25:31

问题


I have an wpf app that creates a database to file. Just uses (LocalDB)/v11.0 in the connection string not .SQLExpress. If i go in project properties and go to publish tab and click on Application files, i tell it to Exclude SQlServer.Dmf.dll and yet when I publish it still ask for that dll. Why is this? I am not using this dll anywhere in my app nor do I think it should be required that i add it to my references. If I install Microsoft SQL Server 2012 then on the machine I'm trying to install on then it will work. But for what Im doing I shouldn't need to install sql server 2012. Im only ever using a local db .mdf(along with log) in file. Am i missing something here?


回答1:


The files listed in Project Properties > Publish > Application Files is automatically compiled by Visual Studio. Your application must require these DLLs. If they are not already registered on the machine then setting them to excluded will generate the error you describe.

You should either set the assemblies to Included or if this adds unacceptable size overhead to your distribution then you can go to Project Properties > Publish > Prerequisites and add SQL Server 2012 Express LocalDB



来源:https://stackoverflow.com/questions/23092738/sqlserver-dmf-dll-required-in-global-assembly-cache-upon-wpf-app-installation

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!