Skip to content

Instantly share code, notes, and snippets.

@Rookian
Created March 1, 2012 09:41
Show Gist options
  • Save Rookian/1948586 to your computer and use it in GitHub Desktop.
Save Rookian/1948586 to your computer and use it in GitHub Desktop.
MSpec
nicht funktionierender Aufruf:
C:\TFS_BDD_TestingFramework\Machine.Specifications-Release\mspec-clr4.exe --xml "\\SERVERNAME\BuildResult\MasterBuild\ImportServerMasterBuild\ImportServerMasterBuild 6.0.0.81\results.xml" --html "\\SERVERNAME\BuildResult\MasterBuild\ImportServerMasterBuild\ImportServerMasterBuild 6.0.0.81" " \\SERVERNAME\BuildResult\MasterBuild\ImportServerMasterBuild\ImportServerMasterBuild 6.0.0.81\Release\ImportServerTests.dll"
Ergebnis:
Could not load file or assembly 'file:///\\SERVERNAME\BuildResult\MasterBuild\ImportServerMasterBuild\ImportServerMasterBuild 6.0.0.81\Release\ImportServerTests.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
funktionierender Aufruf:
C:\TFS_BDD_TestingFramework\Machine.Specifications-Release\mspec-clr4.exe --xml "C:\BuildResult\MasterBuild\ImportServerMasterBuild\ImportServerMasterBuild 6.0.0.81\results.xml" --html "C:\BuildResult\MasterBuild\ImportServerMasterBuild\ImportServerMasterBuild 6.0.0.81" " C:\BuildResult\MasterBuild\ImportServerMasterBuild\ImportServerMasterBuild 6.0.0.81\Release\ImportServerTests.dll"
Alles läuft lokal.
Lösung gefunden :)
Die Exception wird unabhängig davon geworfen, ob die Datei lokal liegt oder nicht. Entscheidend ist, dass es ein Netzwerkpfad ist.
http://msdn.microsoft.com/en-us/library/dd409252%28VS.100%29.aspx
App.config:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<runtime>
<loadFromRemoteSources enabled="true"/>
</runtime>
</configuration>
So käme keine Exception.
Getestet mit:
var path = @"\\SERVERNAME\BuildResult\MasterBuild\ImportServerMasterBuild\ImportServerMasterBuild 6.0.0.81\Release\ImportServerTests.dll";
var loadFile = Assembly.LoadFile(path);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment