Home Dashboard Directory Help
Search

Reference to Microsoft.SQLServer.ManagedDTS.dll only works if Target Framework set to .Net 4.0 by Dan Surridge


Status: 

Closed
 as Won't Fix Help for as Won't Fix


14
0
Sign in
to vote
Type: Bug
ID: 519539
Opened: 12/10/2009 6:46:06 AM
Access Restriction: Public
2
Workaround(s)
view
14
User(s) can reproduce this bug

Description

I am migrating a project built in VS2005 (.Net 2.0) to VS2010 Beta 2, but cannot use .Net 4.0 so have set the Target Framework to 3.5. When I reference DLL Microsoft.SQLServer.ManagedDTS.dll (File Version 9.0.3042.0; Assembly Version 9.0.242.0) and build my project I get the compile error message "The type or namespace name 'Dts' does not exist in the namespace 'Microsoft.SqlServer' (are you missing an assembly reference?)".
If I change the Target Framework to 4.0, it works, but for any other target, it fails.
I am using the same version of this DLL as I used in VS2005.
I have reproduced this problem with a simple Class Library project.
Details
Sign in to post a comment.
Posted by shitalJ on 8/30/2012 at 5:58 PM
Add this in your web config
<startup useLegacyV2RuntimeActivationPolicy="true">
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
</startup>
Posted by Zeeshan Ansari on 4/10/2012 at 11:51 PM
I have the same problem what Sridhar R have. can anybody answer on this?
Posted by Sridhar R on 10/21/2010 at 9:25 AM
Forgot to mention, I have SSIS created on SQL Server 2005 and not on SQL Server 2008.
Posted by Sridhar R on 10/21/2010 at 9:22 AM
Hi,

In the .NET Framwork 4.0, I am still not able to find reference of "Microsoft.SqlServer.ManagedDTS.dll" in the "Add Reference section, please guide me on this. I am trying to execute the SSIS package from ASP.NET Web Page.
Thanks
Posted by ovcica on 8/11/2010 at 6:46 AM
I'm hitting the same issue with all the DLLs that use a namespace that's more than three levels deep. It happens only when I try using 3.5 version of the framework. It all works fine when using 4.0. I don't understand how this can be a Won't fix - all projects of ours that use a namespace that deeply nested are now forced to use 4.0 version of the framework. If that turns out to be a problem, we might be forced to continue using VS2008.

Posted by Audrius Sadauskas on 4/30/2010 at 3:48 AM
I have a similar issue. I have a "using" directive that looks like Namespace1.Namespace2.Namespace3.Namespace4. When projects targets .NET 2.0 framework I get a bunch of errors saying that I am missing a reference, etc. If I switch project to use .NET 4.0 - it compiles without any issue. In my case workaround was to add using directive to Namespace3 and then to Namespace4, like this:

using Namespace1.Namespace2.Namespace3;
using Namespace1.Namespace2.Namespace3.Namespace4;

It looks like it can't drill down to more than 3 namespace levels deep when using .NET 2.0 profile. Haven't tried 3.0 and 3.5 tho'.
Posted by Matt Poland on 4/21/2010 at 1:23 PM
See this case in case it resolves your issue...

https://connect.microsoft.com/VisualStudio/feedback/details/551532/cannot-build-project-in-2010-when-project-has-reference-to-ssis-2008-dlls-sqltask-manageddts-etc?wa=wsignin1.0#tabs
Posted by NickG on 4/20/2010 at 9:23 AM
Can you please reopen this. It has not been fixed, no workaround has been given and no reason for not fixing it has been given (the comments about the object browser are irrelevant - people here need their projects to compile whether the object browser problem is fixed or not).
Posted by Matt Poland on 4/15/2010 at 2:45 PM
Specifically, my build output states this...

C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1360,9): warning MSB3258: The primary reference "Microsoft.SqlServer.SQLTask, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=x86" 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.
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1360,9): warning MSB3258: The primary reference "Microsoft.SQLServer.ManagedDTS, Version=9.0.242.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.
Posted by Matt Poland on 4/15/2010 at 2:35 PM
I experience the bug of not being able tor reference the Microsoft.SQLServer.ManagedDTS assembly in Visual Studio 2010 Ultimate RTM while targeting the 3.5 framework. It says it is referenced but none of its types are available from code. I am able to successfully build while targeting the 4.0 framework but that is not an option for us at this time. The object browser is not a consideration in my issue.
Posted by NickG on 4/15/2010 at 9:51 AM
I have this issue too. Is there no solution to it?
Posted by elitz on 4/8/2010 at 4:43 PM
I am in the un-enviable position of having to use framework 3.5 with SSIS 2005. Am running into same issue as described in original post. IN my case, it's references to Microsoft.SqlServer.SqlTask and Microsoft.SqlServer.WebserviceTask that are creating the issues. (version 9.0.242 assembly versions). Upon building the project, compiler can't find namespace Microsoft.SqlServer.Dts.Tasks.WebServiceTask and Microsoft.SqlServer.Dts.Tasks.SqlTask respectively. Changing to framework 4.0 resolves it...(but i'm stuck with 3.5 for now). Anyway, wondering if any new info or resolultions have been discovered since original post....thank you.
Posted by Mike Reagan-CalRecycle on 2/9/2010 at 1:49 PM
I am trying out VS 2010 RC and have this exact issue this user reported. Whats the fix to this problem?
Posted by Microsoft on 1/8/2010 at 6:28 PM
Thank you for reporting this issue. The Build team reports that the sample project you attached does build correctly on VS 2010 Beta 2, which is consistent with Dan's comments. Regarding the Object Browser issues, we unfortunately are not investing heavily in Object Browser improvements for VS 2010, though we may revamp this feature in a future release. As such, the OB-related issues are Won't Fix for VS 2010 but will remain in our database to be revisited during planning for future versions of Visual Studio.

Thanks for sending your feedback on VS 2010.
Posted by Microsoft on 12/18/2009 at 12:28 AM
Thanks for your feedback.

We are rerouting this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.

Thank you
Posted by Dan Surridge on 12/17/2009 at 6:06 AM
I attached source files for a simple project which demonstrated the problem - which I still get on my Win 2003 box. I have tried the same project / dll on a Win 2008 R2 VM with VS2008, VS2010 Beta 2 Ultimate, SQL Server 2008 Enterprise installed, but the build works OK.
Posted by Rodrigo Rodriguez on 12/16/2009 at 7:07 AM
Running regasm on SSIS assemblies, as mentioned in the readme file above does not seem to remove the warning.
When adding the reference to the project, the symbols in the assembly Microsoft.SQLServer.ManagedDTS are available both in code (intellisense) as in the Object Browser. As we start compiling the project, all the references become invalid and the assembly is immediately removed from the Object Browser window.
We have noticed that by using Microsoft Visual Studio 2008, the same project compiles with no problem (using 3.5 as target) on all machines.
This problem occurs in three machines but in one it does not occur. We are using the version 90 (SQL2005) of assemblies. We have copied the assemblies to a folder and added the reference on the project file to those files, not those on GAC neither those on SQLServer SDK\Assemblies folder.
Configuration:

All:
    Windows Server 2008 with latest SP.

Working:

1 Machine got installed VS.NET 2010 B2; ; SQLServer 2005 Developer Edition; SSIS 2008.

Not Working:

1 Machine got installed VS.NET 2010 B2; SQLServer 2008 Express
2 Machines got installed VS.NET 2010 B2; SQLServer 2005 Developer Edition; SQLServer 2008 Express With Advanced Services.
Posted by Rodrigo Rodriguez on 12/15/2009 at 5:22 PM
I can't it right now, but we are facing the same issue. I think it would be related to the 2.3.1.3 item on the Microsoft .NET Framework 3.5 Readme.

http://download.microsoft.com/download/9/a/e/9ae0f6cc-7032-408e-9ca7-989f9e4af4ec/dotNetReadMe.htm

That is: 2.3.1.3. The COM registration for System.Management.Instrumentation.dll, which is included with .NET Framework 3.5, is incorrect because it assumes that the version is 2.0.0.0 when it is actually 3.5.0.0

This topic shows a similar error that occurs due to bad registering of the DLL during install. So they advice to use regasm tool to register the file again. You can try that.
Posted by Microsoft on 12/14/2009 at 1:10 AM
Thanks for reporting this issue. We are unable to reproduce the issue with the file you provided.

Please give us a full demo project to demonstrate this issue so that we can conduct further research?

It would be greatly appreciated if you could provide us with that information as quickly as possible. If we do not hear back from you within 7 days, we will close this issue.

Thanks again for your efforts and we look forward to hearing from you.

Visual Studio Product Team
Posted by Microsoft on 12/11/2009 at 3:18 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Sign in to post a workaround.
Posted by GrahamLCollins on 10/6/2010 at 1:38 PM
Replacing the Microsoft.SqlServer.Msxml6_interop.dll in the GAC with the one from SQL2008 solved it for me. Make sure to follow the instructions in the link below. I was able to build my project in VS2010 and I checked that I was still able to run SSIS packages on my machine and that the application would run on a machine that has not been patched with the 2008 Microsoft.SqlServer.Msxml6_interop.dll.

http://blogs.msdn.com/b/jason_howell/archive/2010/08/18/visual-studio-2010-solution-build-process-give-a-warning-about-indirect-dependency-on-the-net-framework-assembly-due-to-ssis-references.aspx
Posted by David Reavill on 3/24/2010 at 11:46 AM
We reproduced this problem on Windows XP Pro x86 SP-3 with VS 2010 RC.
We found that the problem did not occur on Windows XP Pro x64 SP-2 with VS 2010 RC.
Both were targeting Debug/x86 platform.
File Name Submitted By Submitted On File Size  
Microsoft.SQLServer.ManagedDTS.dll (restricted) 12/10/2009 -
ClassLibrary1.csproj (restricted) 12/10/2009 -
Class1.cs (restricted) 12/10/2009 -