nugetizer icon indicating copy to clipboard operation
nugetizer copied to clipboard

Packing reference assemblies generated at compile time is valid.

Open kzu opened this issue 2 months ago • 0 comments

Discussed in https://github.com/devlooped/nugetizer/discussions/82

Originally posted by AraHaan April 27, 2021 I basically currently make a nuget package that is basically an Sdk package to try to hackingly allow packing of reference assemblies generated at compile time to the ref folder in the nuget package.

However it runs into problems, namely it tries to do everything it could to try to add the files added to the reference section in the nuspec, however it adds the files without adding them to the autogenerated nuspec.

I would like to instead replace my package with this tool to be able to package the reference assemblies in my packages on my projects as they are usefull to me, for starters they get consumed in Visual Studio and so the code decompiler actually decompiles the files under the ref folder in the package instead of the runtime version protecting them from being exposed in the decompiler context.

I could very easily however cook up an attribute on all types that will inform them the actual code is on github but that is besides the point.

Anyways since this is possible it could be added to this project. The current package I attempted for this is located at https://github.com/Elskom/PublishRefAssemblies

I hope you all agree as I see thousands of people find it useful to package reference assemblies with the main package as opposed to what the BCL does which is package then inside of separate ref packages and runtime ones to their own packages added in by the .NET SDK implicitly at build time.

Also the readme fails to mention the ref folder part of the spec, it is a special place where reference assemblies go to and I found it out by looking in the reference versions of the BCL packages.

Anyways the ref folder under any nupkg IS TFM specific.

kzu avatar May 17 '24 18:05 kzu