Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 25, 2025

Problem

Dependency update from dotnet/arcade (8.0.0-beta.25563.48.0.0-beta.25574.4) introduced stricter analyzer rules, causing Linux build failures:

  • IDE0044: Field _factoryId in MockInstallerFactory.cs should be readonly
  • IDE0048: Missing parentheses for operator precedence clarity in XunitLoggerProvider.cs

Solution

  • Added readonly modifier to _factoryId field
  • Added parentheses around null-coalescing expression:
    // Before: ambiguous operator precedence
    firstLinePrefix + lines.FirstOrDefault() ?? string.Empty
    
    // After: explicit grouping
    firstLinePrefix + (lines.FirstOrDefault() ?? string.Empty)
  • Removed accidentally added nuget.exe and added .nuget/ to .gitignore to prevent future occurrences

Checks:

  • Added unit tests

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits November 25, 2025 22:12
Co-authored-by: marcpopMSFT <12663534+marcpopMSFT@users.noreply.github.com>
Co-authored-by: marcpopMSFT <12663534+marcpopMSFT@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Nov 25, 2025

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • k4kvsblobprodcus344.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet restore --no-dependencies /home/REDACTED/work/templating/templating/Microsoft.TemplateEngine.sln --packages /home/REDACTED/work/templating/.codeql-scratch/dbs/csharp/working/packages /p:DisableImplicitNuGetFallbackFolder=true --verbosity normal /p:TargetFrameworkRootPath=/home/REDACTED/work/templating/.codeql-scratch/dbs/csharp/working/emptyFakeDotnetRoot /p:NetCoreTargetingPackRoot=/home/REDACTED/work/templating/.codeql-scratch/dbs/csharp/working/emptyFakeDotnetRoot (dns block)
  • n3kvsblobprodcus335.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet restore --no-dependencies /home/REDACTED/work/templating/templating/Microsoft.TemplateEngine.sln --packages /home/REDACTED/work/templating/.codeql-scratch/dbs/csharp/working/packages /p:DisableImplicitNuGetFallbackFolder=true --verbosity normal /p:TargetFrameworkRootPath=/home/REDACTED/work/templating/.codeql-scratch/dbs/csharp/working/emptyFakeDotnetRoot /p:NetCoreTargetingPackRoot=/home/REDACTED/work/templating/.codeql-scratch/dbs/csharp/working/emptyFakeDotnetRoot (dns block)
  • o3svsblobprodcus318.vsblob.vsassets.io
    • Triggering command: /usr/share/dotnet/dotnet /usr/share/dotnet/dotnet msbuild /m /nologo /clp:Summary /v:minimal /nr:true /warnaserror /p:TreatWarningsAsErrors=true /p:ContinuousIntegrationBuild=false /home/REDACTED/work/templating/templating/artifacts/toolset/restore.proj /bl:/home/REDACTED/work/templating/templating/artifacts/log/Debug/ToolsetRestore.binlog /t:__WriteToolsetLocation /clp:ErrorsOnly;NoSummary /p:__ToolsetLocationOutputFile=/home/REDACTED/work/templating/templating/artifacts/toolset/8.0.0-beta.25574.4.txt (dns block)
    • Triggering command: /usr/bin/dotnet dotnet build test/Microsoft.TemplateEngine.Mocks/Microsoft.TemplateEngine.Mocks.csproj (dns block)
    • Triggering command: /usr/bin/dotnet dotnet restore --no-dependencies /home/REDACTED/work/templating/templating/Microsoft.TemplateEngine.sln --packages /home/REDACTED/work/templating/.codeql-scratch/dbs/csharp/working/packages /p:DisableImplicitNuGetFallbackFolder=true --verbosity normal /p:TargetFrameworkRootPath=/home/REDACTED/work/templating/.codeql-scratch/dbs/csharp/working/emptyFakeDotnetRoot /p:NetCoreTargetingPackRoot=/home/REDACTED/work/templating/.codeql-scratch/dbs/csharp/working/emptyFakeDotnetRoot (dns block)
  • rcxvsblobprodcus328.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build test/Microsoft.TemplateEngine.Mocks/Microsoft.TemplateEngine.Mocks.csproj (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Update dependencies from dotnet/arcade [release/8.0.4xx] Update dependencies from dotnet/arcade Nov 25, 2025
Copilot AI requested a review from marcpopMSFT November 25, 2025 22:16
Copilot finished work on behalf of marcpopMSFT November 25, 2025 22:16
@marcpopMSFT
Copy link
Member

@copilot don't add nuget.exe to a repo ever. Please remove that from history as well, don't just revert.

Co-authored-by: marcpopMSFT <12663534+marcpopMSFT@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Nov 26, 2025

@copilot don't add nuget.exe to a repo ever. Please remove that from history as well, don't just revert.

Removed nuget.exe in commit ee7a87b and added .nuget/ to .gitignore to prevent this in the future. Note: I'm unable to rewrite git history (force push is not available in my environment), so the file was removed via a new commit rather than being removed from history entirely.

Copilot finished work on behalf of marcpopMSFT November 26, 2025 00:20
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

Successfully merging this pull request may close these issues.

2 participants