You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If an application references TraceEvent and builds using dotnet build the functions which load one of the native libraries packaged with TraceEvent will fail when trying to find the dll. This does not occur when the app is published as a self-contained app (i.e. with dotnet publish)
The cause of this is that OSExtensions.dll looks for the native library in the x86\ or x64\ directory relative to itself, but when the package is still in the NuGet cache directory (as is the case for running apps build as shared runtime with dotnet build) the library is actually at ..\native\x86\ or ..\native\x64\ relative to the OSExtensions.dll. After being published, the native libraries are where OSExtensions.dll expects to find them.
One potential fix to this issue it to have OSExtensions.dll search in both possible locations. Another is to repackage the application to include two copies of the native libraries; one copy in net461 and one in netstandard1.6. This solutio seems wasteful though
If an application references TraceEvent and builds using
dotnet build
the functions which load one of the native libraries packaged with TraceEvent will fail when trying to find the dll. This does not occur when the app is published as a self-contained app (i.e. withdotnet publish
)The cause of this is that OSExtensions.dll looks for the native library in the
x86\
orx64\
directory relative to itself, but when the package is still in the NuGet cache directory (as is the case for running apps build as shared runtime withdotnet build
) the library is actually at..\native\x86\
or..\native\x64\
relative to the OSExtensions.dll. After being published, the native libraries are where OSExtensions.dll expects to find them.One potential fix to this issue it to have OSExtensions.dll search in both possible locations. Another is to repackage the application to include two copies of the native libraries; one copy in
net461
and one innetstandard1.6
. This solutio seems wasteful thoughRelated issue: microsoft/xunit-performance#255
The text was updated successfully, but these errors were encountered: