![]() |
VOOZH | about |
dotnet add package H.Generators.Tests.Extensions --version 1.24.2
NuGet\Install-Package H.Generators.Tests.Extensions -Version 1.24.2
<PackageReference Include="H.Generators.Tests.Extensions" Version="1.24.2" />
<PackageVersion Include="H.Generators.Tests.Extensions" Version="1.24.2" />Directory.Packages.props
<PackageReference Include="H.Generators.Tests.Extensions" />Project file
paket add H.Generators.Tests.Extensions --version 1.24.2
#r "nuget: H.Generators.Tests.Extensions, 1.24.2"
#:package H.Generators.Tests.Extensions@1.24.2
#addin nuget:?package=H.Generators.Tests.Extensions&version=1.24.2Install as a Cake Addin
#tool nuget:?package=H.Generators.Tests.Extensions&version=1.24.2Install as a Cake Tool
A set of extensions to simplify the code of generators. In addition to extensions, this library also adds a .props file to automatically add your generation-time dependencies to the NuGet package and Integration tests.
The usage is pretty simple:
<PackageReference Include="H.Generators.Extensions" Version="1.4.2" PrivateAssets="all" />
I want to note that PrivateAssets="all" is required to rule out some issues.
options.GetGlobalOption(string name)options.GetOption(AdditionalText, string name)options.GetRequiredGlobalOption(string name)options.GetRequiredOption(AdditionalText, string name)options.TryRecognizeFramework()options.RecognizeFramework()
To recognize the framework, you will need to add the following code to your %PackageId%.props:<Project>
<ItemGroup>
<CompilerVisibleProperty Include="RecognizeFramework_DefineConstants"/>
<CompilerVisibleProperty Include="UseWPF"/>
<CompilerVisibleProperty Include="UseWinUI"/>
<CompilerVisibleProperty Include="UseMaui"/>
</ItemGroup>
<Target Name="CreateDefineConstants" BeforeTargets="GenerateMSBuildEditorConfigFileShouldRun;GenerateMSBuildEditorConfigFileCore">
<PropertyGroup>
<RecognizeFramework_DefineConstants>$(DefineConstants.Replace(';',','))</RecognizeFramework_DefineConstants>
</PropertyGroup>
</Target>
</Project>
context.ReportException(string id, Exception)name.ToPropertyName()name.ToParameterName()text.RemoveBlankLinesWhereOnlyWhitespaces()text.NormalizeLineEndings(string? newLine = null)fullTypeName.ExtractNamespace()fullTypeName.ExtractSimpleName()fullTypeName.WithGlobalPrefix()values.Inject()DictionaryAnalyzerConfigOptionsDictionaryAnalyzerConfigOptionsProviderMemoryAdditionalTextImmutableArrayExtensions.NormalizeLocationsYou can get answers to your questions in my discord support channel:
https://discord.gg/g8u2t9dKgE
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 was computed. net5.0-windows net5.0-windows was computed. net6.0 net6.0 was computed. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 is compatible. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 netcoreapp2.0 was computed. netcoreapp2.1 netcoreapp2.1 was computed. netcoreapp2.2 netcoreapp2.2 was computed. netcoreapp3.0 netcoreapp3.0 was computed. netcoreapp3.1 netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 netstandard2.0 is compatible. netstandard2.1 netstandard2.1 was computed. |
| .NET Framework | net461 net461 was computed. net462 net462 was computed. net463 net463 was computed. net47 net47 was computed. net471 net471 was computed. net472 net472 was computed. net48 net48 was computed. net481 net481 was computed. |
| MonoAndroid | monoandroid monoandroid was computed. |
| MonoMac | monomac monomac was computed. |
| MonoTouch | monotouch monotouch was computed. |
| Tizen | tizen40 tizen40 was computed. tizen60 tizen60 was computed. |
| Xamarin.iOS | xamarinios xamarinios was computed. |
| Xamarin.Mac | xamarinmac xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos xamarinwatchos was computed. |
This package is not used by any NuGet packages.
Showing the top 1 popular GitHub repositories that depend on H.Generators.Tests.Extensions:
| Repository | Stars |
|---|---|
|
HavenDV/DependencyPropertyGenerator
Dependency property, routed event and weak event source generator for WPF/UWP/WinUI/Uno/Avalonia/MAUI platforms.
|
| Version | Downloads | Last Updated |
|---|---|---|
| 1.24.2 | 4,797 | 2/26/2025 |
| 1.24.1 | 900 | 1/12/2025 |
| 1.24.0 | 977 | 11/13/2024 |
| 1.23.0 | 279 | 11/13/2024 |
| 1.22.0 | 4,456 | 11/30/2023 |
| 1.21.1 | 225 | 11/30/2023 |
| 1.21.0 | 244 | 11/30/2023 |
| 1.20.0 | 1,203 | 11/7/2023 |
| 1.19.0 | 855 | 9/22/2023 |
| 1.18.0 | 300 | 8/30/2023 |
| 1.17.1 | 310 | 8/30/2023 |
| 1.17.0 | 265 | 8/30/2023 |
| 1.16.0 | 261 | 8/16/2023 |
| 1.15.1 | 416 | 4/8/2023 |
| 1.15.0 | 538 | 3/10/2023 |
| 1.14.3 | 380 | 3/9/2023 |
| 1.14.2 | 383 | 3/9/2023 |
| 1.14.1 | 375 | 3/9/2023 |
| 1.14.0 | 392 | 3/9/2023 |
| 1.13.1 | 392 | 3/9/2023 |
⭐ Last 10 features:
Updated to net9
Added Net9 to LatestReferenceAssemblies.
Added extensions from DependencyPropertyGenerator.
Updated to net8.0.
Added net8.0 support for ReferenceAssemblies.
Updated Uno version in FrameworkReferenceAssemblies.
Added GeneratorDriverExtensions.
Added net7.0 reference assemblies.
Added SelectAndReportDiagnostics.
Added IncrementalValuesProvider.CollectAsEquatableArray.
🐞 Last 10 fixes:
Fixed version of Microsoft.CodeAnalysis.CSharp.
Fixed ToParameterName for C# keywords.
Updated Uno and WinAppSdk versions.
Fixed Avalonia ReferenceAssemblies.
Fixed warnings.
Added ability to add/remove _SystemLibs.
Added missing IncrementalValueProvider SelectAndReportExceptions without cancellation token.
Added IncrementalValueProvider SelectAndReportExceptions.
Added missing useful overloads.
Added IncrementalValuesProviderExtensions.WhereNotNull.