My machine is running 64 bit windows with Visual Studio 2015 + SQL Server 2014 express.
I need to create the client application with SMO that should run on both 32 bit and 64 bit machines. I just read the Microsoft MSDN document about how to reference SMO. So I know that I need to reference these dll files:
Microsoft.SqlServer.ConnectionInfo.dll,
Microsoft.SqlServer.Smo.dll,
Microsoft.SqlServer.Management.Sdk.Sfc.dll,
Microsoft.SqlServer.SqlEnum.dll
But I am confused a bit as these files are present in 2 folders:
C:\Program Files\Microsoft SQL Server\120\SDK\Assemblies\
C:\Program Files (x86)\Microsoft SQL Server\120\SDK\Assemblies\
If any one can suggest me what approach should I use.
Configure my project for separate builds for 32 and 64 bit and reference the corresponding SMO dlls using the technique described here. (This will lead to 2 different exe files for 32bit and 64bit, so I need to create different installer for both platforms! correct me if I am wrong)
Keep one build configuration i.e. AnyCPU is my project and reference the dlls from C:\Program Files (x86)\ only. (Will it work?)
I know this can lead to open discussion, but I am more interested if anyone can confirm whether solution 2 works for me. And why should I prefer solution 1 over solution 2.