SharpTestEx e Visual Studio 2010

Ero alle prese con dei test sul dominio di una nuova applicazione in Visual Studio 2010 quando al primo dei test che testava una ArgumentException il sistema mi torna un “brutto” errore:

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].

Per fortuna avevo Omar in ascolto su Twitter che mi ha subito (via chat FB) indirizzato alla soluzione del problema: se sulla macchina non è installato VS2008 bisogna aggiungere al progetto dei test la seguente sezione:

<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Microsoft.VisualStudio.QualityTools.UnitTestFramework"
publicKeyToken="b03f5f7f11d50a3a"
culture="neutral" />
<bindingRedirect oldVersion="9.0.0.0"
newVersion="10.0.0.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>

Uteriori dettagli sul work item aperto da imperugo e sulla documentazione.

Grazie ancora a Omar Pollice in su

E non dite più che i Social Network sono inutili :)

posted @ venerdì 22 ottobre 2010 02:06

Print

Comments on this entry:

# re: SharpTestEx e Visual Studio 2010

Left by Omar Damiani at 22/10/2010 02:10
Gravatar
...de nada;)

# re: SharpTestEx e Visual Studio 2010

Left by Ugo Lattanzi at 25/10/2010 00:30
Gravatar
Ci sono capitato anche io.
Il problema me lo dava solo su pc in cui non avevo installato Visual Studio 2008 :S

# re: SharpTestEx e Visual Studio 2010

Left by Nazareno at 25/10/2010 01:00
Gravatar
@Ugo: infatti sono partito dal tuo post :)
Comments have been closed on this topic.
«aprile»
domlunmarmergiovensab
31123456
78910111213
14151617181920
21222324252627
2829301234
567891011