Thursday, August 19, 2010

Visual Studio 2010 solution build process give a warning about indirect dependency on the .NET Framework assembly due to SSIS references

Here’s how I saw the problem…
2746.image_5F00_thumb_5F00_2ECB3D39.png
Install SQL Server 2005. Afterwards, Install SQL Server 2008. (Integration Services or Management tools features are enough usually)
Install your favorite new tool Visual Studio 2010.
Create or Open a solution for your C# or VB application. The Solution properties should target the “.Net Framework 3.5” to have this problem.
Add references to one or more of the SSIS dlls in the SDK folder. These assemblies may be referenced from References tree in the Solution Explorer pane of Visual Studio 2010, by browsing to the dll files in the 32-bit directories from either SQL Server 2005 or SQL Server 2008:
On a 64-bit platform:
C:\Program Files (x86)\Microsoft SQL Server\90\SDK\Assemblies
C:\Program Files (x86)\Microsoft SQL Server\100\SDK\Assemblies
On a 32-bit platform:
C:\Program Files\Microsoft SQL Server\90\SDK\Assemblies
C:\Program Files\Microsoft SQL Server\100\SDK\Assemblies
Microsoft.SqlServer.Dts.Design.dll
Microsoft.SQLServer.ManagedDTS.dll
Microsoft.SqlServer.ScriptTask.dll
Microsoft.SqlServer.SQLTask.dll
Microsoft.SqlServer.TxScript.dll
Microsoft.SqlServer.VSTAScriptingLib.dll
Build menu > Build ApplicationName.
The warnings will appear in the Error List pane.
The build of the .Net application may report the following Warnings in the Error List pane:

The primary reference "Microsoft.SqlServer.Dts.Design, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL" could not be resolved because it has an indirect dependency on the .NET Framework assembly "mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" which has a higher version "2.0.3600.0" than the version "2.0.0.0" in the current target framework.
Read more: Jason's Technical Topics