You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm experimentally upgrading a solution to .NET 9, the main project looks ok, but the MSTest project in the same solution seems to have had epj.RouteGenerator run on it and (unsurprisingly) find nothing to do, then fault.
I'm not entirely sure I understand what went on, mostly because I don't know anything much about the generator model, but here's what I saw at a command prompt:
PS> dotnet build .\DivisiBill.Tests\DivisiBill.Tests.csproj -c:Debug -f:net9.0
You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy
DivisiBill net9.0 succeeded (3.0s) → DivisiBill\bin\Debug\net9.0\DivisiBill.dll
DivisiBill.Tests net9.0 succeeded with 1 warning(s) (0.3s) → DivisiBill.Tests\bin\Debug\net9.0\DivisiBill.Tests.dll
CSC : warning CS8785: Generator 'RouteGenerator' failed to generate source. It will not contribute to the output and compilation errors may occur as a result. Exception was of type 'InvalidOperationException' with message 'Sequence contains no matching element'.
There's no [epj.RouteGenerator.AutoRoutes("Page")] property setting in the test project but it DOES have dependency on the project under test (DivisiBill) and that does have such a setting and is compiled as part of the test project build.
This only happened once, immediately after the migration, and I have not seen it again since. Even when it did happen it did no harm, so it's not a problem, simply weird, so I thought I'd mention it in case anyone else sees the same thing.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm experimentally upgrading a solution to .NET 9, the main project looks ok, but the MSTest project in the same solution seems to have had epj.RouteGenerator run on it and (unsurprisingly) find nothing to do, then fault.
I'm not entirely sure I understand what went on, mostly because I don't know anything much about the generator model, but here's what I saw at a command prompt:
There's no
[epj.RouteGenerator.AutoRoutes("Page")]
property setting in the test project but it DOES have dependency on the project under test (DivisiBill) and that does have such a setting and is compiled as part of the test project build.This only happened once, immediately after the migration, and I have not seen it again since. Even when it did happen it did no harm, so it's not a problem, simply weird, so I thought I'd mention it in case anyone else sees the same thing.
Beta Was this translation helpful? Give feedback.
All reactions