wpf应用程序安装后,全局程序集缓存中需要SqlServer.Dmf.dll [英] SqlServer.Dmf.dll required in Global Assembly Cache upon wpf app installation

查看:97
本文介绍了wpf应用程序安装后,全局程序集缓存中需要SqlServer.Dmf.dll的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个wpf应用程序,用于创建数据库文件。仅在连接字符串中使用(LocalDB)/v11.0,而不是.SQLExpress。如果我进入项目属性并转到发布选项卡,然后单击应用程序文件,我告诉它排除SQlServer.Dmf.dll,但是当我发布它时,仍然要求该dll。为什么是这样?我不在我的应用程序中的任何地方使用此dll,我也不认为应该将其添加到我的引用中。如果我安装了Microsoft SQL Server 2012,则可以在要安装的计算机上使用。但是对于我正在做的事情,我不需要安装sql server2012。我只在文件中使用本地db .mdf(以及日志)。我在这里想念什么吗?

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?

推荐答案

项目属性>中列出的文件。发布>应用程序文件由Visual Studio自动编译。您的应用程序必须需要这些DLL。如果尚未在计算机上注册它们,则将它们设置为 excluded 会生成您描述的错误。

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.

您应该将程序集设置为已包含,或者如果这给您的发行版增加了不可接受的大小开销,则可以到 Project Properties>发布>前提条件并添加 SQL Server 2012 Express LocalDB

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

这篇关于wpf应用程序安装后,全局程序集缓存中需要SqlServer.Dmf.dll的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆