1

Closed

Test fails is Visual Studio 2008 is not installed.

description

Hi,
I found a problem with SharpTestEx.MSTest and Visual Studio 2010.
Specifically the Test library tries to load Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=9.0.0.0 but, in my case, I don't have Visual Studio 2008 installed so, I don't have this library.

The specific error is:

System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].


I found the problem with "Assembly Binding Log Viewer (Fuslogvw.exe)" its report show this:

=== Pre-bind state information ===
LOG: User = MacProUGO\imperugo
LOG: DisplayName = Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
(Fully-specified)
LOG: Appbase = file:///C:/Projects/Dexter/Trunk/src/Solutions/VS 2010/TestResults/imperugo_MACPROUGO 2010-05-10 12_37_05/Out
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = QTAgent32.exe

Calling assembly : SharpTestsEx.MSTest, Version=1.0.0.0, Culture=neutral, PublicKeyToken=8c60d8070630b1c1.

LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\QTAgent32.exe.Config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Post-policy reference: Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
LOG: GAC Lookup was unsuccessful.


thx
.u
Closed May 10, 2010 at 9:39 PM by

comments

fabiomaulo wrote May 10, 2010 at 1:08 PM

What happen if you put the follow section into the app.config of your test project ?

imperugo wrote May 10, 2010 at 2:09 PM

It works fine ;)

Thx

teoarch wrote May 9, 2011 at 9:29 AM

I've the same issue using version 1.1.1.0 of SharpTestsEx.

Error:
Test method EyeOpen.MvvmSdk.ViewModel.Test.ViewModelTest.ChangeAPropertyOfANotifiableObjectExpectedPropertyChangedEventIsRaised threw exception:
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.

Stack trace:
SharpTestsEx.Factory.AssertExceptionFactory.CreateException(String message)
SharpTestsEx.Assertions.UnaryAssertion1.Assert(TA actual, String customMessage) in d:\CSharp\SharpTestsEx\clean\SharpTestsEx\SharpTestsEx\Assertions\UnaryAssertion.cs: line 40
SharpTestsEx.Extensions.AssertUsing[TA](IAssertionInfo
1 assertionInfo, UnaryAssertion`1 assertion) in d:\CSharp\SharpTestsEx\clean\SharpTestsEx\SharpTestsEx\Extensions.cs: line 14
SharpTestsEx.ExtensionsImpl.StringBeConstraints.EqualTo(String expected) in d:\CSharp\SharpTestsEx\clean\SharpTestsEx\SharpTestsEx\ExtensionsImpl\StringConstraints.cs: line 31
EyeOpen.MvvmSdk.ViewModel.Test.ViewModelTest.ChangeAPropertyOfANotifiableObjectExpectedPropertyChangedEventIsRaised() in
[my file]

Using MSBuild and MSTest.