Namespace name 'Dac' does not exist in the namespace 'Microsoft.SqlServer'

978 views Asked by At

I'm trying to get DacFx (latest-v17.1) to work on a machine which has SQL Server 2014 and VS 2013. I tried manually referencing the dll's from the 140/dac/bin folder (I had installed the DacFx17.1 framework) in my console application.

I also tried the below nuget in my solution. https://www.nuget.org/packages/Microsoft.SqlServer.DacFx.x86/140.3652.3

But i get the below error..

Error 18 The type or namespace name 'Dac' does not exist in the namespace 'Microsoft.SqlServer' (are you missing an assembly reference?)

Does this mean I wont be able to use the latest DacFx framework?

1

There are 1 answers

0
TheReaction On

I know I'm kind of late to the issue, but I had a similar problem when trying to upgrade to SQL Server 2017 from 2008. Reference was set, dll was there but when trying to build I got CS0234 (Microsoft.SqlServer.Dac.dll -> here Version 14.0.0.0).

Now, I still cannot pinpoint the exact problem, but I got it running by using a higher target framework. I basically used .Net Framework 4.6 instead of 4 and it suddenly worked. I randomly tried this because of some unrelated warnings in the project.