Open decriptor opened 1 month ago
I've worked around this by adding this to my test case: [DeploymentItem(@"onnxruntime.dll")] [DeploymentItem(@"onnxruntime.lib")] [DeploymentItem(@"OpenCvSharpExtern.dll")]
Hi @decriptor,
I will investigate the issue (most likely next week).
@decriptor is moving to the new platform (MSTest runner - what you called {AssemblyName}.exe
) a possiblity? There is a class of issues that are really hard to fix with VSTest platform and we are not actively investing into it when there is a viable solution with the new platform.
@Evangelink I think so. Is the future {AssemblyName}.exe and vstest.console.exe will be deprecated?
Our current situation is that we moved as many projects as we could to sdk projects and then netstandard2.0 as much as possible. We are slowly trying to migration from net472 to net8.0 (or whatever is current when we get there). Also, we are trying to upgrade from Azure DevOps 2020 server to at least Azure DevOps 2022 server.
vstest.console.exe will be deprecated?
This would be an ideal but this is for sure going to take years.
The new platform (MSTest runner) doesn't require SDK style project (when you have it, it's easier as you can rely on MSTest.Sdk that greatly simplifies your project).
Would it be possible for you to create a small repro that I could use and debug to really pin point the issue and see what's possible on my end.
The tl;dr; is that the unmanaged references from nuget packages aren't copied to the
TestResults\Deploy_***\out
directory.In my case, I'm trying to test my ML library that uses the Microsoft.ML.OnnxRuntime.DirectML nuget:
My unit tests run and pass if I run them in Visual Studio or use the new mstest nugets that generate {AssemblyName}.exe. If I try to run them from the console (and CI) using vstest.console.exe it fails to load the native assemblies.
From what I can tell so far, when vstest.console.exe runs it tries to find all of the references and copy them to the out folder it finds the managed references from the nugets. ie,
However, things like
onnxruntime.dll
orOpenCvSharpExtern.dll
are not copied over to theout
folder.I haven't had much luck trying to google. I'm hoping that I'm missing something simple.