10

例外: ProcessModel: Default DomainUsage: Single Execution Runtime: net-4.0 Unhandled Exception: System.ArgumentException: The net-4.0 framework is not available パラメータ名: Framework at NUnit.Util.TestAgency.GetAgent(RuntimeFramework framework, Int32 waitTime, Boolean enableDebug ) NUnit.Util.ProcessRunner.Load(TestPackage パッケージ) で NUnit.ConsoleRunner.ConsoleUi.Execute(ConsoleOptions オプション) で NUnit.ConsoleRunner.Runner.Main(String[] args) で

OS Winserver 2008 R2 x64

Nunit 2.5.4.10098

アセンブリのテスト .net 4.0 RTM (v4.0.30319) 用に構築

コマンド ライン nunit-console.exe NServiceBus.Config.UnitTests.dll /framework=net-4.0

何か案は?

4

2 に答える 2

14

Kev のアドバイス ( /framework=4.0.30319 をパラメーター リストに追加) を組み合わせて、nunit-console.exe.config を次のように変更します。

 <configuration>

追加:

<startup>  <requiredRuntime version="v4.0.30319" /></startup>

<configuration><runtime> 追加の下:

 <legacyUnhandledExceptionPolicy enabled="1" />
于 2010-04-14T12:14:01.787 に答える
1

私はCC.netで同じ問題を抱えていました。

引数 /framework=4.0.30319 を使用して、NAnt から NUnit を実行します。

お役に立てれば

ケブ

于 2010-04-14T11:47:27.607 に答える