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
The template "Class Library" was created successfully.
Processing post-creation actions...
Restoring D:\repos\test\test.csproj:
Determining projects to restore...
Restored D:\repos\test\test.csproj (in 62 ms).
Restore succeeded.
Determining projects to restore...
All projects are up-to-date for restore.
test -> D:\repos\test\bin\Debug\net8.0\test.dll
Build succeeded.
0 Warning(s)
0 Error(s)
Time Elapsed 00:00:00.90
when I:
dotnet add package CUE4Parse && dotnet build
I get:
Determining projects to restore...
...
info : Package 'CUE4Parse' is compatible with all the specified frameworks in project 'D:\repos\test\test.csproj'.
info : PackageReference for package 'CUE4Parse' version '1.1.1' added to file 'D:\repos\test\test.csproj'.
info : Writing assets file to disk. Path: D:\repos\test\obj\project.assets.json
log : Restored D:\repos\test\test.csproj (in 344 ms).
Determining projects to restore...
All projects are up-to-date for restore.
C:\Program Files\dotnet\sdk\8.0.304\Microsoft.Common.CurrentVersion.targets(2401,5): warning MSB3246: Resolved file has a bad image, no metadata, or is otherwise inaccessible. PE i
mage does not have metadata. PE image does not have metadata. [D:\repos\test\test.csproj]
test -> D:\repos\test\bin\Debug\net8.0\test.dll
Build succeeded.
C:\Program Files\dotnet\sdk\8.0.304\Microsoft.Common.CurrentVersion.targets(2401,5): warning MSB3246: Resolved file has a bad image, no metadata, or is otherwise inaccessible. PE i
mage does not have metadata. PE image does not have metadata. [D:\repos\test\test.csproj]
1 Warning(s)
0 Error(s)
Time Elapsed 00:00:01.03
The text was updated successfully, but these errors were encountered:
hallipr
changed the title
Native assembly location in NuGet package causing dotnet build warning
Native assembly in NuGet /lib folder causing dotnet build warning
Aug 20, 2024
To be clear, I understand CUE4Parse ships with the native assembly, it's just not in the correct folder in the nuget package. Native assemblies should be in /runtimes/{rid}/native/ not /lib/
This appears to be cuased by a native assembly being in the
/lib
folder of the CUE4Parse 1.1.1 Nuget package.see https://learn.microsoft.com/en-us/nuget/create-packages/native-files-in-net-packages#compile-assets
and https://stackoverflow.com/a/48123691/596349
Repro steps:
In an empty folder, when I
I get
when I:
I get:
The text was updated successfully, but these errors were encountered: