Squirrel.Windows icon indicating copy to clipboard operation
Squirrel.Windows copied to clipboard

squirrel commandline excludes *.xml

Open austinejei opened this issue 6 years ago • 19 comments

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.*"/>

austinejei avatar May 28 '18 10:05 austinejei

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?

anaisbetts avatar May 28 '18 12:05 anaisbetts

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

austinejei avatar May 28 '18 13:05 austinejei

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

anaisbetts avatar May 28 '18 14:05 anaisbetts

Yes i did. No XML files.

austinejei avatar May 28 '18 15:05 austinejei

Any help please......?

austinejei avatar Jun 01 '18 13:06 austinejei

@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

anaisbetts avatar Jun 02 '18 06:06 anaisbetts

ok. thanks

austinejei avatar Jun 06 '18 00:06 austinejei

any luck @paulcbetts

austinejei avatar Jun 09 '18 22:06 austinejei

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

anaisbetts avatar Jun 09 '18 23:06 anaisbetts

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.

IanElsinga avatar Jun 20 '18 01:06 IanElsinga

@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.

anaisbetts avatar Jun 20 '18 01:06 anaisbetts

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.

bddckr avatar Jun 20 '18 07:06 bddckr

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.

IanElsinga avatar Jun 20 '18 12:06 IanElsinga

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

austinejei avatar Jun 20 '18 13:06 austinejei

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. 🤞

bddckr avatar Jun 20 '18 13:06 bddckr

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!

IanElsinga avatar Jun 20 '18 14:06 IanElsinga

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

bddckr avatar Jun 20 '18 14:06 bddckr

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

anaisbetts avatar Jun 20 '18 15:06 anaisbetts

is anyone else having this problem in 2021?

drzeusis avatar May 21 '21 20:05 drzeusis