Skip to content

Conversation

@dotnet-maestro
Copy link
Contributor

@dotnet-maestro dotnet-maestro bot commented Dec 5, 2025

Updated Dependencies:
Microsoft.DotNet.Arcade.Sdk (Version 10.0.0-beta.25568.102 -> 10.0.0-beta.25604.105)
System.CommandLine (Version 2.0.1 -> 2.0.2)
@dotnet-maestro dotnet-maestro bot requested a review from a team as a code owner December 5, 2025 02:11
@dotnet-maestro
Copy link
Contributor Author

dotnet-maestro bot commented Dec 7, 2025

Important

The source repository has received code changes from an opposite flow. Any additional codeflows into this PR may potentially result in lost changes.

Please continue with one of the following options:

  1. Close or merge this PR and let the codeflow continue normally
  2. Close or merge this PR and receive the new codeflow immediately by triggering the subscription:
    darc trigger-subscriptions --id 2146351c-d624-4a08-bc4e-875e6191f66e
  3. Force-flow new changes into this PR at your own risk (some PR commits might be reverted):
    darc trigger-subscriptions --force --id 2146351c-d624-4a08-bc4e-875e6191f66e

💡 You may consult the FAQ for more information or tag @dotnet/prodconsvcs for assistance.

@nagilson
Copy link
Member

For some reason, many tests are trying to resolve a 9.0 runtime on osx/linux. I wonder if its because 10 is not available.

Expected command to exit with 0 but it did not.\nFile Name: dotnet\nArguments: Microsoft.TemplateSearch.TemplateDiscovery.dll --basePath /var/folders/kk/yc0qf4694xl1_d6sqg40_2sr0000gn/T/TemplateEngine.Tests/b5928f77-2832-40e4-9657-bfe6ad27571f --packagesPath /var/folders/kk/yc0qf4694xl1_d6sqg40_2sr0000gn/T/TemplateEngine.Tests/c4674323-e566-4957-acca-62344b8a50e1/packages -v --diff false\nExit Code: 1\nStdOut:\n\nStdErr:\nUnhandled exception: System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.\n\nFile name: 'System.Runtime, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'\n   at Microsoft.TemplateSearch.TemplateDiscovery.Test.TestPackCheckerFactory.LoadExistingCache(CommandArgs config)\n   at Microsoft.TemplateSearch.TemplateDiscovery.Test.TestPackCheckerFactory.CreatePackSourceCheckerAsync(CommandArgs config, CancellationToken cancellationToken) in /Users/runner/work/1/s/tools/Microsoft.TemplateSearch.TemplateDiscovery/TestProvider/TestPackCheckerFactory.cs:line 36\n   at Microsoft.TemplateSearch.TemplateDiscovery.TemplateDiscoveryCommand.ExecuteAsync(CommandArgs config, CancellationToken cancellationToken) in /Users/runner/work/1/s/tools/Microsoft.TemplateSearch.TemplateDiscovery/TemplateDiscoveryCommand.cs:line 137\n   at Microsoft.TemplateSearch.TemplateDiscovery.TemplateDiscoveryCommand.<.ctor>b__14_1(ParseResult parseResult, CancellationToken cancellationToken) in /Users/runner/work/1/s/tools/Microsoft.TemplateSearch.TemplateDiscovery/TemplateDiscoveryCommand.cs:line 125\n   at System.CommandLine.Invocation.InvocationPipeline.InvokeAsync(ParseResult parseResult, CancellationToken cancellationToken)\n

@nagilson
Copy link
Member

At first, I thought mariner-2 maybe dropped .net 9 support and we switched to new image runners.
But then I realized we've been using that for a year.

Then I tried to set NetMinimum in directory.build.props to .NET 10. But I didn't see that property propagate, and some of TE still builds on .NET 8. I don't have the context as to why. FYI @dotnet/templating-engine-maintainers

Instead, I've tried to make it so .NET 9 is installed via the pipeline to see if this makes it so it can find the .NET 9 runtime.

@nagilson nagilson enabled auto-merge December 10, 2025 23:09
@nagilson
Copy link
Member

It's still failing to load .NET 9.

It's also got an authoring issue:

/Users/runner/work/1/s/.packages/microsoft.templateengine.authoring.tasks/10.0.100-preview.4.25220.1/build/Microsoft.TemplateEngine.Authoring.Tasks.targets(25,5): Template configuration message MV005: Missing 'sourceName'. [/Users/runner/work/1/s/template_feed/Microsoft.TemplateEngine.Authoring.Templates/Microsoft.TemplateEngine.Authoring.Templates.csproj]

@nagilson
Copy link
Member

Surprisingly, the tests work on my linux machine without .net 9.0. I haven't been able to reproduce this yet.

@nagilson
Copy link
Member

The issue is in LoadExistingCache. I wonder if it's trying to use a .NET 9 based cache.

@nagilson
Copy link
Member

I'm going to try to refresh or stop this cache in the CI machine so we can evaluate my hypothesis. If my hypothesis is true, I think we should consider filing this as a potential code issue.

@nagilson
Copy link
Member

I have higher confidence because this has happened before https://github.com/dotnet/templating/pull/8952/files and #9052

Now, what I don't yet know is how NetCurrent is set.

@nagilson
Copy link
Member

Some dark magic sets it to 10.0. Net Previous is 9 while minimum is 8. I think we should consider this.

@nagilson
Copy link
Member

TargetFrameworkDefaults from arcade.sdk sets all of these values. I'm wondering if this is a break from arcade.

@nagilson
Copy link
Member

nagilson commented Dec 11, 2025

Prior to codeflow:
https://github.com/dotnet/dotnet/blob/02dfa783c1/src/arcade/src/Microsoft.DotNet.Arcade.Sdk/tools/TargetFrameworkDefaults.props

current: 10
prev: 9
min: 8

Post:
https://github.com/dotnet/dotnet/blob/115a295775/src/arcade/src/Microsoft.DotNet.Arcade.Sdk/tools/TargetFrameworkDefaults.props

It's the same :/ So, I imagine this is an issue with the cache not working due to a rollout of .NET.

@nagilson
Copy link
Member

@copilot undo my changes in ada559b as they don't matter.

Copy link
Contributor

Copilot AI commented Dec 11, 2025

@nagilson I've opened a new pull request, #9627, to work on those changes. Once the pull request is ready, I'll request review from you.

@nagilson
Copy link
Member

Ugh, nvm.

@nagilson
Copy link
Member

@dotnet/templating-engine-maintainers It seems like the template cache is broken. It's trying to rely on .NET 9. I'm thinking it's got some cached values and now it's trying to load something it shouldn't. #9052 seemed to track this in the past.

I don't know if you want to disable the cache in the tests only, disable it in code because it's got a bug, or try to fix the bug for .NET 10. Either way, hopefully this research and context I did helps.

@nagilson nagilson added the area: template-content The issue is related to content of template packages managed in this repo (/template_feed) label Dec 11, 2025
@joeloff
Copy link
Member

joeloff commented Dec 11, 2025

TemplateSearch package is built against .net 8 from what I can tell, at least based on what I downloaded from the pipeline

@joeloff
Copy link
Member

joeloff commented Dec 11, 2025

Based on what I'm seeing, the deps.json shows that it target 8.0, but has a dependency on logging abstractions from 9.0.3, this might be the cause of the problem.

@joeloff
Copy link
Member

joeloff commented Dec 11, 2025

@nagilson I'm testing out a fix in another branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: template-content The issue is related to content of template packages managed in this repo (/template_feed)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants