-
Notifications
You must be signed in to change notification settings - Fork 255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Architecture-specific files folder hierarchy lost (native subfolders) #7698
Comments
If you don't pass runtime identifier @nguerrera @dsplaisted can help understand the difference here and give more details. |
@jainaashish if I understand this correctly, passing |
I've the same understanding and I'd imagine it should keep the same folder structure in a self-contained app as well. Which is why I've added dotnet SDK folks to respond on this issue. This isn't related to NuGet and once dotnet folks agree, I'll move it over to their repo. |
I am nearly certain there is a duplicate issue somewhere, but I cannot find it. I believe there were opinions that this was by design because you should be using content instead of native for auxiliary files to the native dll. But without finding the original issue I'm not sure. cc @eerhardt who I think was involved in the original discussion. |
I think it was https://github.com/dotnet/cli/issues/9794...? Basically, the suggested workaround was to use Maybe we should consider changing the behavior, and maintaining the folder structure.... Or at least, an option to opt into maintaining the folder structure under |
closing this as dupe of https://github.com/dotnet/cli/issues/9794 @ezolotko you can continue the further discussion on the above issue. |
@jainaashish I'm not sure we should be closing this as a dupe of another closed issue. If we want to continue discussion of this, it should probably be on an open issue. |
I just wanted to point out that the suggested solution with contentFiles has it's drawbacks:
|
@dsplaisted then may we should reopen that closed issue but we should continue the discussion there so that we have the history of why did we closed at the first place. |
So, any progress on this? |
Details about Problem
NuGet product used: VS UI, dotnet.exe
NuGet version: 4.60
dotnet.exe --version: 2.1.503
VS version: 15.9.5
OS version: Microsoft Windows [Version 10.0.17134.523]
Detailed repro steps
Download the attached archive containing the repro files, extract the downloaded archive at [path]
In the nuget options, add local package source at the location [path]\NativeFilesFoldersPackage, so that the included NativeFilesFoldersPackage.0.0.1.nupkg is available to install.
Inside the NativeFilesFoldersPackage.0.0.1.nupkg file, notice that folder \runtimes\win-x64\native contains the following folder hierarchy:
Create a .NET Core class library project, install the NativeFilesFoldersPackage.0.0.1 package in it.
For the created project, run the following command: dotnet publish -c Release -r win-x64
In the created publish folder (bin\Release\netcoreapp2.1\win-x64\publish), notice that the files RootNativeFile.txt and NativeFileInSubfolder.txt are in the publish directory next to each other (without the MySubfolder folder included), i.e. the native folder hierarchy in the package is lost while publishing.
The same effect is observed with native DLLs while debugging the project in Visual Studio without publishing.
This issue is really important for scenarios when the native libraries need to maintain a fixed folder hierarchy around them to function (for example, libraries which look for data or plugins in a subfolder, cases with "xxx.framework" folders on MacOS, and many others).
Sample Project
NativeFilesFoldersTest.zip
Verbose Logs
NativeFilesFolders_Publish.log
The text was updated successfully, but these errors were encountered: