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 have a SingleFile generator that works fine for old-style projects, but does not get executed for SDK-style projects (.NET 8)
The package has those CodeGenerator-related attributes:
I also added the custom command from your Single-File Generator example to add/set the custom build tool entry.
The command gets executed for both project styles, but the generator is only used for old-style projects.
As the availability is only declared via Attributes I have no idea how to debug this and find a reason why it does not work for SDK-style projects.
Because the SDK style projects are projects that were migrated from older when migrating from .NET Framework to .NET 8 I also tried it with clean, empty projects of both styles with the same result.
Expected behavior
Should work with both types of projects
The text was updated successfully, but these errors were encountered:
Installed products
Visual Studio 2022 Community
Description
I have a SingleFile generator that works fine for old-style projects, but does not get executed for SDK-style projects (.NET 8)
The package has those CodeGenerator-related attributes:
[ProvideCodeGenerator(typeof(BuildTextConsts), BuildTextConsts.Name, BuildTextConsts.cCustomToolDescription, true, ProjectSystem = ProvideCodeGeneratorAttribute.CSharpProjectGuid, RegisterCodeBase = true)] [ProvideCodeGeneratorExtension(BuildTextConsts.Name, BuildTextConsts.cDefaultExtension)]
I also added the custom command from your Single-File Generator example to add/set the custom build tool entry.
The command gets executed for both project styles, but the generator is only used for old-style projects.
As the availability is only declared via Attributes I have no idea how to debug this and find a reason why it does not work for SDK-style projects.
Because the SDK style projects are projects that were migrated from older when migrating from .NET Framework to .NET 8 I also tried it with clean, empty projects of both styles with the same result.
Expected behavior
Should work with both types of projects
The text was updated successfully, but these errors were encountered: