sdk: Native DLL not found with dotnet cli win-x64 while testing with xunit targeting net451
Steps to reproduce
project.json:
{
"version": "1.0.0-*",
"buildOptions": {
"emitEntryPoint": true
},
"dependencies": {
"xunit": "2.1.0-*",
"dotnet-test-xunit": {
"version": "1.0.0-rc2-*",
"target": "package"
},
"Microsoft.NETCore.Platforms": "1.0.1-rc2-*"
},
"frameworks": {
"net451": {
}
},
"testRunner": "xunit"
}
Program.cs:
using System;
namespace ConsoleApplication
{
public class Program
{
public static void Main(string[] args)
{
Console.WriteLine("Hello World!");
}
}
}
Commands:
dotnet restore
dotnet test
Expected behavior
Working test run, as with .NET Core 1.0 RC2:
xUnit.net .NET CLI test runner (64-bit win10-x64)
Discovering: test-xunit
Discovered: test-xunit
=== TEST EXECUTION SUMMARY ===
test-xunit.dll Total: 0
SUMMARY: Total: 1 targets, Passed: 1, Failed: 0.
Actual behavior
xUnit.net .NET CLI test runner (32-bit win10-x86)
System.DllNotFoundException: Die DLL "Microsoft.DiaSymReader.Native.x86.dll": Das angegebene Modul wurde nicht gefunden. (Ausnahme von HRESULT: 0x8007007E) kann nicht geladen werden.
SUMMARY: Total: 1 targets, Passed: 0, Failed: 1.
The error message says, that the file Microsoft.DiaSymReader.Native.x86.dll
could not be found.
The full build output is stored in .\Debug\net451\win7-x64
, which only contains a Microsoft.DiaSymReader.Native.amd64.dll
.
When I specify an explicit -r win7-x86
, the output gets stored in .\Debug\net451\win7-x86
, but - according to the Process Monitor - gets searched for in the .\Debug\net451\win7-x64
folder.
Using the x86 version of dotnet-cli works as expected for both net451
and netcoreapp1.0
.
Environment data
dotnet --info
output:
.NET Command Line Tools (1.0.0-preview1-002702)
Product Information:
Version: 1.0.0-preview1-002702
Commit Sha: 6cde21225e
Runtime Environment:
OS Name: Windows
OS Version: 10.0.10586
OS Platform: Windows
RID: win10-x64
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 8
- Comments: 15 (4 by maintainers)
Followed the recommendations on the xunit issue and was able to get things working again.
I noticed that as a temporary fix adding C:\Program Files\dotnet\sdk\1.0.0-preview1-002702\runtimes\win-x86\native to Env:Path helps.
I’m closing this issue, because it’s not related to dotnet/cli. Updating xunit to rc3 works. The myget gallery for xunit where s/o can download the RC3: https://myget.org/gallery/xunit
+1 same behavior with 4.6