Daniel Cazzulino

Results 360 comments of Daniel Cazzulino

![296 passed](https://img.shields.io/badge/✅-win‐x64%20in%205m%205s-blue) ![296 passed](https://img.shields.io/badge/passed-296-brightgreen) ![1 skipped](https://img.shields.io/badge/skipped-1-silver) :test_tube: Details on Microsoft Windows 10.0.20348 from [dotnet-retest](https://github.com/devlooped/dotnet-retest) v0.7.1 on .NET 8.0.17 with [:purple_heart:](https://github.com/sponsors/devlooped) by @devlooped

![296 passed](https://img.shields.io/badge/✅-win‐x64%20in%205m%2020s-blue) ![296 passed](https://img.shields.io/badge/passed-296-brightgreen) ![1 skipped](https://img.shields.io/badge/skipped-1-silver) :test_tube: Details on Microsoft Windows 10.0.20348 from [dotnet-retest](https://github.com/devlooped/dotnet-retest) v0.7.1 on .NET 8.0.18 with [:purple_heart:](https://github.com/sponsors/devlooped) by @devlooped

Typically, you should not be building the package on build. NuGet API itself (for package creation, which is what we use) doesn't provide incrementality checks of any kind. Perhaps this...

On second thought: so you're not trying to *avoid* the overhead of packing the .nupkg, just that the final file is not overwritten if it hasn't changed? Perhaps this could...

I got a draft PR just to explore what the changes might be. Feel free to suggest alternatives. All existing tests pass fine, but I could not find unit tests...

Do you think there's an opportunity to provide something like this at least for the restricted use case of rendering text-only versions of help for the purposes of self-updating static...

Got a workaround for now in my app: ```csharp var app = new CommandApp(); // ... app.Configure(config => { if (Environment.GetEnvironmentVariables().Contains("NO_COLOR") && config.Settings.HelpProviderStyles?.Options is { } options) options.DefaultValue = Style.Plain;...

@FrankRay78 that didn't work. It seems it's being re-set by someone else. The default values are bold even though I set the help styles to null: ![image](https://github.com/user-attachments/assets/fdc21d07-44b0-40ab-b90f-796b5629da79)

Thanks @FrankRay78 for that thorough test. I went back to it and tried it again (updated to latest), and things seem to be working now. So I'll close this now....

Expanded on @tillig's approach and made it [a general-purpose](https://www.cazzulino.com/resources.html) drop-in for `Directory.Build.targets`: ```xml PrepareResources;$(CoreCompileDependsOn) MSBuild:Compile $(IntermediateOutputPath)\$([MSBuild]::ValueOrDefault('%(RelativeDir)', '').Replace('\', '.').Replace('/', '.'))%(Filename).g$(DefaultLanguageSourceExtension) $(Language) $(RootNamespace) $(RootNamespace).$([MSBuild]::ValueOrDefault('%(RelativeDir)', '').Replace('\', '.').Replace('/', '.').TrimEnd('.')) %(Filename) ```