adamhathcock / sharpcompress

SharpCompress is a fully managed C# library to deal with many compression types and formats.
MIT License
2.24k stars 480 forks source link

NUGET package is wrong #5

Closed sawilde closed 10 years ago

sawilde commented 10 years ago

Not sure what happened with the packaging but the same assembly has been packaged into all three locations in the 0.10.1.1 nuget package.

Looking in ILSpy I see that the portable one is

[assembly: TargetFramework(".NETCore,Version=v4.5", FrameworkDisplayName = ".NET for Windows Store apps")]

whereas it should be something like

[assembly: TargetFramework(".NETPortable,Version=v4.0,Profile=Profile1", FrameworkDisplayName = ".NET Portable Subset")]
sawilde commented 10 years ago

Okay I think I know what has happened - when you build all the projects are building in parallel and this is polluting the binaries in the obj/ folders - by unhooking the parallel build by setting project dependencies seems to resolve the build issue on my local machine

adamhathcock commented 10 years ago

You're 100% right.

I have to revert the build locations but the nuspec file will have each assembly named SharpCompress.dll which should cover your original problem.

sawilde commented 10 years ago

The name doesn't help - I tried that first off that is why I had to alter the project settings to alter the assembly name

adamhathcock commented 10 years ago

I guess I don't understand how if the file names are the same in the package how the references can get confused when the hint paths are pointing to the correct location.

sawilde commented 10 years ago

I know it confused me as well as that was the first thing I tried i.e. just the nuspec changes - I think it is all to do with the data that makes up the assembly metadata - is it possible to change the obj/ folder for the 3 'sharpcompress' projects.

Alternatively just change the project dependancies such that you build a sharpcompress library.

I can have a look at fixing it if you want - I'd really like to reference your library in our nuget package rather than my nobbled clone.

adamhathcock commented 10 years ago

Turns out we can change the obj folder. I'll do that along with your paths and that should fix the issue: http://stackoverflow.com/questions/4735534/how-can-i-redirect-the-bin-and-obj-directories-to-a-different-location

adamhathcock commented 10 years ago

https://www.nuget.org/packages/sharpcompress/0.10.1.3

Okay, hopefully this is the last try :)

sawilde commented 10 years ago

I'll check by opening up the nuspec package (zip file in disguise) and look at the assemblies. You could also consider adding some helper build scripts + tests to double check your package before you push to nuget. I do similar on the OpenCover repo.


From: Adam Hathcockmailto:notifications@github.com Sent: ‎15/‎08/‎2013 1:29 AM To: adamhathcock/sharpcompressmailto:sharpcompress@noreply.github.com Cc: Shaun Wildemailto:shaun_wilde@hotmail.com Subject: Re: [sharpcompress] NUGET package is wrong (#5)

https://www.nuget.org/packages/sharpcompress/0.10.1.3

Okay, hopefully this is the last try :)


Reply to this email directly or view it on GitHub: https://github.com/adamhathcock/sharpcompress/issues/5#issuecomment-22643653

sawilde commented 10 years ago

Looks good :) thanks