Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempting to target too low a framework throws exception #299

Closed
Tracked by #1258
ChrisMaddock opened this issue Oct 12, 2017 · 3 comments
Closed
Tracked by #1258

Attempting to target too low a framework throws exception #299

ChrisMaddock opened this issue Oct 12, 2017 · 3 comments
Assignees
Labels
Milestone

Comments

@ChrisMaddock
Copy link
Member

I just tried to run my tests built against .NET 4.0 with --framework=2.0. This threw the following exception:

1) Error :
An exception occurred in the driver while loading tests.

Server stack trace:
   at NUnit.Engine.Runners.DirectTestRunner.LoadDriver(IFrameworkDriver driver, String testFile, TestPackage subPackage)
   at NUnit.Engine.Runners.DirectTestRunner.LoadPackage()
   at NUnit.Engine.Runners.DirectTestRunner.EnsurePackageIsLoaded()
   at NUnit.Engine.Runners.DirectTestRunner.RunTests(ITestEventListener listener, TestFilter filter)
   at NUnit.Engine.Agents.RemoteTestAgent.Run(ITestEventListener listener, TestFilter filter)
   at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
   at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg, Int32 methodPtr, Boolean fExecuteInContext)

Exception rethrown at [0]:
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at NUnit.Engine.ITestEngineRunner.Run(ITestEventListener listener, TestFilter filter)
   at NUnit.Engine.Runners.ProcessRunner.RunTests(ITestEventListener listener, TestFilter filter)

I think we used to have specific handling for this situation which returned a helpful error message. We should check for that - and add some if not.

@CharliePoole
Copy link
Member

I think it used to work as well. Somebody may need to figure out what happened and leave some info for the person who works it if we are making this "help wanted."

BTW, can we clarify the definition of labels in the wiki to include this and say what it means. In particular, it sounds a bit different from the old up for grabs label. That is, "help wanted" would sound to me like "we don't intend/know how to fix this unless somebody else volunteers" but I don't think that's our intent.

@CharliePoole
Copy link
Member

This is a pretty old issue and the messages have improved over time. I cleaned them up a bit, adding an explicit reference to the requested runtime if there was one. I also cleaned up messages for the situation where the requested runtime is not formatted correctly or doesn't exist.

@CharliePoole
Copy link
Member

This issue has been resolved in version 3.16.0

The release is available on:
GitHub.
NuGet packages are also available NuGet.org and
Chocolatey Packages may be found at Chocolatey.org

@CharliePoole CharliePoole removed the PortToVersion4 Version 3 change needs to be ported to the version 4 code in main label Jan 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants