Using NUnit 2.2.3 with Visual Studio 2005 RTM
(8.0.50727.42) and .Net 2.0.50727.
I get a System.IO.FileNotFoundException when trying
to run tests written in C# that have a dependency on
a mixed mode C++ DLL (i.e. one that has both
unmanaged and managed C++ code, e.g. it includes the
#pragma unmanaged)
There is a Microsoft bug and workaround for the
application itself that requires copying (and
renaming) the manifest file that was built with the
C++ assembly which references the C RunTime
(MS.VC80.CRT), but I have not been able to figure out
how to make this work for NUnit. I've tried naming
the manifest after the assembly being tested and
after NUnit, but no luck.
See "Cannot Load mixed mode dll" at the MSDN Feedback
Center,
http://lab.msdn.microsoft.com/productfeedback/viewfeed
back.aspx?feedbackid=06e0a0c8-30a4-498f-999e-
ce06daa355ed
There is very simple sample code with the MS bug.
Thanks,
-- Chip Patton
Here is the error:
---------------------------
Assembly Not Loaded
---------------------------
System.IO.FileNotFoundException : The specified
module could not be found. (Exception from HRESULT:
0x8007007E)
For further information, use the Exception Details
menu item.
---------------------------
OK
---------------------------
And the Exception Details:
System.IO.FileNotFoundException...
Server stack trace:
at System.Reflection.Assembly.GetExportedTypes()
at NUnit.Core.AddinManager.Register(Assembly
assembly)
at NUnit.Core.Builders.TestAssemblyBuilder.Load
(String assemblyName)
at NUnit.Core.Builders.TestAssemblyBuilder.Build()
at NUnit.Core.SimpleTestRunner.Load(String
assemblyName)
at NUnit.Core.ProxyTestRunner.Load(String
assemblyName)
at NUnit.Core.ProxyTestRunner.Load(String
assemblyName)
at
System.Runtime.Remoting.Messaging.StackBuilderSink._Pr
ivateProcessMessage(IntPtr md, Object[] args, Object
server, Int32 methodPtr, Boolean fExecuteInContext,
Object[]& outArgs)
at
System.Runtime.Remoting.Messaging.StackBuilderSink.Pri
vateProcessMessage(RuntimeMethodHandle md, Object[]
args, Object server, Int32 methodPtr, Boolean
fExecuteInContext, Object[]& outArgs)
at
System.Runtime.Remoting.Messaging.StackBuilderSink.Syn
cProcessMessage(IMessage msg, Int32 methodPtr,
Boolean fExecuteInContext)
Exception rethrown at [0]:
at
System.Runtime.Remoting.Proxies.RealProxy.HandleReturn
Message(IMessage reqMsg, IMessage retMsg)
at
System.Runtime.Remoting.Proxies.RealProxy.PrivateInvok
e(MessageData& msgData, Int32 type)
at NUnit.Core.TestRunner.Load(String assemblyName)
at NUnit.Util.TestDomain.Load(String
assemblyFileName, String testFixture)
at NUnit.Util.TestDomain.Load(String
assemblyFileName)
at NUnit.Util.TestLoader.LoadTest(String testName)
Logged In: YES
user_id=586918
Originator: NO
Changing this to a bug so we can determine if it still applies
Logged In: YES
user_id=1811851
Originator: NO
I have the same problem writing unit tests for a runtime callable wrapper written in c++/cli that refrences an unmanaged dll.
Is there any action planned to handle this issue?