Question

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?

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top