Squirrel / Squirrel.Windows

An installation and update framework for Windows desktop apps
MIT License
7.32k stars 1.03k forks source link

squirrel commandline excludes *.xml #1323

Open austinejei opened 6 years ago

austinejei commented 6 years ago

Hello guys,

After running the squirrel commandline, i have realized that it always excludes all xml files even though i have explicitly stated it in my nuget package:

<file src="*.*" target="lib\net45\" exclude="*.nupkg;*.vshost.*"/>
<file src="**" target="lib\net45\" exclude="*.nupkg;*.vshost.*"/>
anaisbetts commented 6 years ago

I don't think this is the case by design, you're saying that the input nupkg file has XML files in it, but the output packages don't?

austinejei commented 6 years ago

Exactly. After running setup.exe, the .xml files are missing.

anaisbetts commented 6 years ago

Can you open the generated full NuGet package (rename it to Zip) and see if the XML files are there?

austinejei commented 6 years ago

Yes i did. No XML files.

austinejei commented 6 years ago

Any help please......?

anaisbetts commented 6 years ago

@austinejei I have no idea why XML files wouldn't show up - I'd try to debug through Squirrel. Since it's during the packaging step, it's straightforward to clone the Squirrel.Windows project and set the debug parameters to point to package your app

austinejei commented 6 years ago

ok. thanks

austinejei commented 6 years ago

any luck @paulcbetts

anaisbetts commented 6 years ago

@austinejei Sorry, to be clear I was saying that you should debug through Squirrel.

IanElsinga commented 6 years ago

I am experiencing the same issue - trying Squirrel for the first time - it's a showstopper for me. If this gets fixed I'll give it another go. Thanks.

anaisbetts commented 6 years ago

@IanElsinga I appreciate the feedback but open-source developers aren't obliged to fix bugs that affect you in order to get your "business". If you want it fixed, I will be glad to give you (or anyone else!) guidance on how to fix it.

bddckr commented 6 years ago

The only related functionality I can find is that Squirrel will be removing the .xml file that comes along with a .dll: https://github.com/Squirrel/Squirrel.Windows/blob/250fe4ce09035a682d90836f8c89097760638f66/src/Squirrel/ReleasePackage.cs#L264-L271

I can't see Squirrel removing any other .xml files without a matching .dll file, so perhaps try to confirm whether that's the issue for you.

If it is I suggest forking, commenting out that linked method's body or the call to it and confirming whether that's the behavior that is giving you an issue.

IanElsinga commented 6 years ago

Thanks, I believe that is the issue - will this be remaining the way it is? There are situations where the associated .xml file is required, Swagger, for example, or in my case https://github.com/jacobslusser/ScintillaNET. I could indeed fork and modify it but then I will lose the ability to easily keep squirrel up to date in my projects without forking every time there is a nuget update.

Thanks for finding this.

austinejei commented 6 years ago

Thanks @bddckr, i'll have a look at it. My issue is similar to @IanElsinga My swagger page was not showing up because of .xml files not present. I shall look into this and give feedback. Would you be willing to accept a pull request tho? Perhaps an extra switch parser for "squirrel.exe" where you can either remove or keep .xml files

For example, "Squirrel.exe --releasify MyApp.1.0.0.nupkg --keepXML

bddckr commented 6 years ago

Haha I'm just a user as you guys are, maybe @paulcbetts can chime in.

I do think Squirrel having an opinion on a lot of things and pushing best practices that were figured out by the authors over all this time is a great resource. That being said adding flags to override specific functionality to allow people who hopefully know what they're doing to change that default behavior is hopefully a welcome addition. 🤞

IanElsinga commented 6 years ago

My opinion is that you can already control exactly what files are to be published using a .nuspec file, so file inclusion/exclusion control is already in place. Adding another point of exclusion is redundant and adds unneeded complexity.

I could be wrong, and I am under the weight of pressing deadlines and can't dig into the source of this project myself at this time so I greatly appreciate anything anyone else is able to do to rectify this!

bddckr commented 6 years ago

I already provided you with the source code and instructions to change it. Fork + clone + edit + compile isn't that hard 😉

anaisbetts commented 6 years ago

The only related functionality I can find is that Squirrel will be removing the .xml file that comes along with a .dll

@bddckr Nice research finding this, I am definitely in favor of 🔥 ing this feature - it made sense when we were flattening dependencies but we don't do that anymore

drzeusis commented 3 years ago

is anyone else having this problem in 2021?