Skip to content
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

squirrel commandline excludes *.xml #1323

Open
austinejei opened this issue May 28, 2018 · 19 comments
Open

squirrel commandline excludes *.xml #1323

austinejei opened this issue May 28, 2018 · 19 comments

Comments

@austinejei
Copy link

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
Copy link
Contributor

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
Copy link
Author

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

@anaisbetts
Copy link
Contributor

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

@austinejei
Copy link
Author

Yes i did. No XML files.

@Squirrel Squirrel deleted a comment May 29, 2018
@austinejei
Copy link
Author

Any help please......?

@anaisbetts
Copy link
Contributor

@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
Copy link
Author

ok. thanks

@austinejei
Copy link
Author

any luck @paulcbetts

@anaisbetts
Copy link
Contributor

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

@IanElsinga
Copy link

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
Copy link
Contributor

@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
Copy link
Contributor

bddckr commented Jun 20, 2018

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

void removeDeveloperDocumentation(DirectoryInfo expandedRepoPath)
{
expandedRepoPath.GetAllFilesRecursively()
.Where(x => x.Name.EndsWith(".dll", true, CultureInfo.InvariantCulture))
.Select(x => new FileInfo(x.FullName.ToLowerInvariant().Replace(".dll", ".xml")))
.Where(x => x.Exists)
.ForEach(x => x.Delete());
}

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
Copy link

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
Copy link
Author

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
Copy link
Contributor

bddckr commented Jun 20, 2018

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
Copy link

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
Copy link
Contributor

bddckr commented Jun 20, 2018

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

@anaisbetts
Copy link
Contributor

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
Copy link

is anyone else having this problem in 2021?

twastvedt added a commit to twastvedt/Squirrel.Windows that referenced this issue Jun 11, 2021
Stop removing xml files from the package generated by releasify. As discussed here: Squirrel#1323 (comment).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants