VSTS2010: Cannot reference a project hat uses Microsoft.VisualStudio.QualityTools.WebTestFramework.dll - by T_JJ

Status : 

  Fixed<br /><br />
		This item has been fixed in the current or upcoming version of this product.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.


14
0
Sign in
to vote
ID 459230 Comments
Status Closed Workarounds
Type Bug Repros 8
Opened 5/27/2009 9:17:03 AM
Access Restriction Public

Description

In Visual Studio 2010 TS beta 1, I cannot reference a project that uses Microsoft.VisualStudio.QualityTools.WebTestFramework.dll

For example:
There are two class libraries or test projects:
Project1: 
-Has a reference to Microsoft.VisualStudio.QualityTools.WebTestFramework.dll version 10.0.0.0
-Has a class that uses the WebTestFramework (e.g. WebtestPlugin)
Project2:
-Has a reference to Project1
-Tries to use some class from Project1

When compiling these projects, Project2 shows compilation errors reporting that the namespaces & classes of Project1 are missing.

And these warnings are displayed:
C:\Windows\Microsoft.NET\Framework\v4.0.20506\Microsoft.Common.targets(1337,9): warning MSB3265: The primary reference "C:\Test\Project1\bin\Debug\Project1.dll" could not be resolved because it has an indirect dependency on the .NET Framework assembly "Microsoft.ShDocVw, Version=8.0.50705.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which has a public key token of "B03F5F7F11D50A3A" and has been located in the GAC or AssemblyFolders search locations. The assembly has been added to an exclusion list. Assemblies with this public key token should not be resolved from the GAC or the Assemblyfolders search locations. If this reference is required change the reference include to a fusion name and set <SpecificVersion> metadata to true.
C:\Windows\Microsoft.NET\Framework\v4.0.20506\Microsoft.Common.targets(1337,9): warning MSB3253: The referenced assembly "C:\Test\Project1\bin\Debug\Project1" could not be resolved because it has a dependency on "Microsoft.ShDocVw, Version=8.0.50705.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which is in a generated exclusion list which excludes it from the targeted framework ".NETFramework,Version=v4.0". If this reference is required by your code, you may get compilation errors. If this reference is required change the reference include to a fusion name and set <SpecificVersion> metadata to true.


Retargetting to version framework 2.0 or 3.5 instead of 4.0 does not change anything.

Microsoft.VisualStudio.QualityTools.WebTestFramework.dll version 10.0.0.0 has a reference to Microsoft.ShDocVw

Microsoft.VisualStudio.QualityTools.WebTestFramework.dll uses runtime version 2.0.50727 according to the properties window when selecting the reference. I would expect runtime 4.0.20506 like Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll
Sign in to post a comment.
Posted by Bixby Bob Pope on 9/10/2010 at 8:00 AM
I've had this error but I found that one project, a WCF Library, was targeted to the .NET Framework 4 Client Profile and the others that it referenced targeted the full .NET Framework 4. When I re-targeted my WCF Library to the full Framework everything built.

This article: http://msdn.microsoft.com/en-us/library/cc656912.aspx has a note that says "If you are targeting the .NET Framework 4 Client Profile, you cannot reference an assembly that is not in the .NET Framework 4 Client Profile. Instead you must target the .NET Framework 4. For more information, see Troubleshooting .NET Framework Targeting Errors[http://msdn.microsoft.com/en-us/library/cc668079.aspx]."
Posted by Shah Mehul on 9/1/2009 at 11:37 PM
I was also getting same kind of error...

Follow the mentioned below steps

1. right click on the dll for which youa are getting error
2. Click on Property
3. Select True for Specific Version property of that dll

you are done...


Posted by Microsoft on 7/8/2009 at 10:20 AM
Just wanted to let you know that I recently looked at internal bug. I found that it has been resolved as fixed. So, this should be fixed and available in the next release of Visual Studio 2010.

Chuck England
Visual Studio Platform
Program Manager - MSBuild

Posted by PramodBR on 7/3/2009 at 3:35 AM
I Got the same error, but for different dlls. I think this is a general issue and not specific to these dlls alone.
i
Posted by Microsoft on 6/19/2009 at 2:31 PM
In looking into this further, we found that this is a duplicate of an internal bug. We currently have the internal bug assigned to a dev to fix within Visual Studio 2010.

Thanks for taking the time to report this to us. I am closing the bug as a duplicate.

Chuck England
Visual Studio Platform
Program Manager - MSBuild
Posted by Microsoft on 6/18/2009 at 9:32 AM
Thanks for taking your time to send us this feedback.

In looking at this on the latest build on my box, I get similar warnings and errors when I simply try to create the first project and build.

We are looking into the issue and will get back with you shortly when we have more information.

Chuck England
Visual Studio Platform
Program Manager - MSBuild
Posted by randob1 on 6/2/2009 at 6:53 AM
From what I can tell, it would appear that not all the 10.0 versions of the framework are getting registered in the GAC which could be causing these issues. I think this may be the case because of the "indirect dendency" portion of the message and the fact that I have another instance where I am using a reference to another assembly(Microsoft.VisualStudio.QualityTools.Vsip) which gives me an error as it is trying to point to the 2.0 version of the shell assembly in the GAC and the 10.0 version has not been registered in the GAC. It would be interresting to know if anyone is having these problems in a clean environement without the 2.0 framework.
Posted by Ngoc Luu on 5/31/2009 at 11:39 PM
I got the same error when reference to "Microsoft.Practices.EnterpriseLibrary.Common". This is it:

The primary reference "Microsoft.Practices.EnterpriseLibrary.Common, Version=4.1.0.0, Culture=neutral, processorArchitecture=MSIL" could not be resolved because it has an indirect dependency on the .NET Framework assembly "System.Management, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which has a public key token of "B03F5F7F11D50A3A" and has been located in the GAC or AssemblyFolders search locations. The assembly has been added to an exclusion list. Assemblies with this public key token should not be resolved from the GAC or the Assemblyfolders search locations. If this reference is required change the reference include to a fusion name and set <SpecificVersion> metadata to true.

It only happen if the main project targets to .net framework 4.0. But I neet to target to the 4.0 because I want to use new features of Entity Framework 4.0. There are any workaround? :(
Posted by Piet Amersfoort on 5/31/2009 at 11:43 AM
I have the same issue:

The primary reference "Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" could not be resolved because it has an indirect dependency on the .NET Framework assembly "System.Management, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which has a public key token of "B03F5F7F11D50A3A" and has been located in the GAC or AssemblyFolders search locations. The assembly has been added to an exclusion list. Assemblies with this public key token should not be resolved from the GAC or the Assemblyfolders search locations. If this reference is required change the reference include to a fusion name and set <SpecificVersion> metadata to true.
Posted by randob1 on 5/28/2009 at 12:01 PM
I have a very similar situation in which both projects contain assemblies from the QualityTools namespace but not the WebTestFramework assembly. Project one builds without issue but Project two which references project one fails to build when project one is referenced by project.

The build error is similar as well but mentions an indirect reference to Microsoft.VisualC instead of Microsoft.shDocVw. I have searched high and low for any type of inclusion/reference/mention and have not come up with anything.

If I add the reference to project one by browsing the assembly there are no errors and project two builds fine but that really isn't an option for me. To me this looks possibly like some type of generic problem in the beta more than a specific assembly issue but I could be wrong.