Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
Changelog
---

## [v1.0.0-beta21](https://github.com/andrewlock/NetEscapades.EnumGenerators/compare/v1.0.0-beta20..v1.0.0-beta21) (2026-03-09)

### Breaking Changes

* When using the _NetEscapades.EnumGenerators_ meta package, set `EnumGenerator_PreserveAttributes=true` by default, so that usage analyzers can light up in downstream projects (#241)

### Features

* Add "Force Internal" to allow forcing extension methods to be `internal` even for `public` enums (#230) Thanks [@xC0dex](https://github.com/xC0dex)!
* Extend usage analyzers to nullable enum variables (#244)

### Fixes

* Scan all assemblies for "external" attributes for usage analyzers (#238)

## [v1.0.0-beta20](https://github.com/andrewlock/NetEscapades.EnumGenerators/compare/v1.0.0-beta19..v1.0.0-beta20) (2026-01-05)

### Breaking Changes
Expand Down
16 changes: 8 additions & 8 deletions docs/NetEscapades.EnumGenerators.Generators.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ This adds a `<PackageReference>` to your project. You can additionally mark the
</PropertyGroup>

<!-- Add the package -->
<PackageReference Include="NetEscapades.EnumGenerators.Generators" Version="1.0.0-beta20"
<PackageReference Include="NetEscapades.EnumGenerators.Generators" Version="1.0.0-beta21"
PrivateAssets="all" ExcludeAssets="runtime" />
<!-- -->

Expand Down Expand Up @@ -451,10 +451,10 @@ In some cases you may not want these dependencies to flow to other projects. Thi
</PropertyGroup>

<!-- Add the generator package with PrivateAssets -->
<PackageReference Include="NetEscapades.EnumGenerators.Generators" Version="1.0.0-beta20" PrivateAssets="All"/>
<PackageReference Include="NetEscapades.EnumGenerators.Generators" Version="1.0.0-beta21" PrivateAssets="All"/>

<!-- Optionally add the runtime dependencies package -->
<PackageReference Include="NetEscapades.EnumGenerators.RuntimeDependencies" Version="1.0.0-beta20" />
<PackageReference Include="NetEscapades.EnumGenerators.RuntimeDependencies" Version="1.0.0-beta21" />
</Project>
```

Expand Down Expand Up @@ -514,7 +514,7 @@ In general, for simplicity, we recommend referencing [NetEscapades.EnumGenerator
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<PackageReference Include="NetEscapades.EnumGenerators" Version="1.0.0-beta20" />
<PackageReference Include="NetEscapades.EnumGenerators" Version="1.0.0-beta21" />
</Project>
```

Expand All @@ -527,7 +527,7 @@ In contrast, if you are producing a reusable library and don't want any runtime
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<PackageReference Include="NetEscapades.EnumGenerators.Generators" Version="1.0.0-beta20" PrivateAssets="All" ExcludeAssets="runtime" />
<PackageReference Include="NetEscapades.EnumGenerators.Generators" Version="1.0.0-beta21" PrivateAssets="All" ExcludeAssets="runtime" />
</Project>
```

Expand All @@ -541,8 +541,8 @@ The final option is to reference [NetEscapades.EnumGenerators.Generators](https:
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<PackageReference Include="NetEscapades.EnumGenerators.Generators" Version="1.0.0-beta20" PrivateAssets="All" ExcludeAssets="runtime"/>
<PackageReference Include="NetEscapades.EnumGenerators.RuntimeDependencies" Version="1.0.0-beta20" />
<PackageReference Include="NetEscapades.EnumGenerators.Generators" Version="1.0.0-beta21" PrivateAssets="All" ExcludeAssets="runtime"/>
<PackageReference Include="NetEscapades.EnumGenerators.RuntimeDependencies" Version="1.0.0-beta21" />
</Project>
```

Expand Down Expand Up @@ -655,7 +655,7 @@ The `[EnumExtensions]` attribute is decorated with the `[Conditional]` attribute
</PropertyGroup>

<!-- Add the package -->
<PackageReference Include="NetEscapades.EnumGenerators" Version="1.0.0-beta20" />
<PackageReference Include="NetEscapades.EnumGenerators" Version="1.0.0-beta21" />
</Project>
```
<!-- endInclude -->
2 changes: 1 addition & 1 deletion docs/NetEscapades.EnumGenerators.Generators.source.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ This adds a `<PackageReference>` to your project. You can additionally mark the
</PropertyGroup>

<!-- Add the package -->
<PackageReference Include="NetEscapades.EnumGenerators.Generators" Version="1.0.0-beta20"
<PackageReference Include="NetEscapades.EnumGenerators.Generators" Version="1.0.0-beta21"
PrivateAssets="all" ExcludeAssets="runtime" />
<!-- -->

Expand Down
2 changes: 1 addition & 1 deletion docs/NetEscapades.EnumGenerators.Interceptors.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ This adds a `<PackageReference>` to your project. You can additionally mark the
</PropertyGroup>

<!-- Add the package -->
<PackageReference Include="NetEscapades.EnumGenerators.Interceptors" Version="1.0.0-beta20" />
<PackageReference Include="NetEscapades.EnumGenerators.Interceptors" Version="1.0.0-beta21" />
<!-- -->

</Project>
Expand Down
2 changes: 1 addition & 1 deletion docs/NetEscapades.EnumGenerators.Interceptors.source.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ This adds a `<PackageReference>` to your project. You can additionally mark the
</PropertyGroup>

<!-- Add the package -->
<PackageReference Include="NetEscapades.EnumGenerators.Interceptors" Version="1.0.0-beta20" />
<PackageReference Include="NetEscapades.EnumGenerators.Interceptors" Version="1.0.0-beta21" />
<!-- -->

</Project>
Expand Down
16 changes: 8 additions & 8 deletions docs/NetEscapades.EnumGenerators.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ This adds a `<PackageReference>` to your project:
</PropertyGroup>

<!-- Add the package -->
<PackageReference Include="NetEscapades.EnumGenerators" Version="1.0.0-beta20" />
<PackageReference Include="NetEscapades.EnumGenerators" Version="1.0.0-beta21" />
<!-- -->

</Project>
Expand Down Expand Up @@ -453,10 +453,10 @@ In some cases you may not want these dependencies to flow to other projects. Thi
</PropertyGroup>

<!-- Add the generator package with PrivateAssets -->
<PackageReference Include="NetEscapades.EnumGenerators.Generators" Version="1.0.0-beta20" PrivateAssets="All"/>
<PackageReference Include="NetEscapades.EnumGenerators.Generators" Version="1.0.0-beta21" PrivateAssets="All"/>

<!-- Optionally add the runtime dependencies package -->
<PackageReference Include="NetEscapades.EnumGenerators.RuntimeDependencies" Version="1.0.0-beta20" />
<PackageReference Include="NetEscapades.EnumGenerators.RuntimeDependencies" Version="1.0.0-beta21" />
</Project>
```

Expand Down Expand Up @@ -516,7 +516,7 @@ In general, for simplicity, we recommend referencing [NetEscapades.EnumGenerator
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<PackageReference Include="NetEscapades.EnumGenerators" Version="1.0.0-beta20" />
<PackageReference Include="NetEscapades.EnumGenerators" Version="1.0.0-beta21" />
</Project>
```

Expand All @@ -529,7 +529,7 @@ In contrast, if you are producing a reusable library and don't want any runtime
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<PackageReference Include="NetEscapades.EnumGenerators.Generators" Version="1.0.0-beta20" PrivateAssets="All" ExcludeAssets="runtime" />
<PackageReference Include="NetEscapades.EnumGenerators.Generators" Version="1.0.0-beta21" PrivateAssets="All" ExcludeAssets="runtime" />
</Project>
```

Expand All @@ -543,8 +543,8 @@ The final option is to reference [NetEscapades.EnumGenerators.Generators](https:
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<PackageReference Include="NetEscapades.EnumGenerators.Generators" Version="1.0.0-beta20" PrivateAssets="All" ExcludeAssets="runtime"/>
<PackageReference Include="NetEscapades.EnumGenerators.RuntimeDependencies" Version="1.0.0-beta20" />
<PackageReference Include="NetEscapades.EnumGenerators.Generators" Version="1.0.0-beta21" PrivateAssets="All" ExcludeAssets="runtime"/>
<PackageReference Include="NetEscapades.EnumGenerators.RuntimeDependencies" Version="1.0.0-beta21" />
</Project>
```

Expand Down Expand Up @@ -657,7 +657,7 @@ The `[EnumExtensions]` attribute is decorated with the `[Conditional]` attribute
</PropertyGroup>

<!-- Add the package -->
<PackageReference Include="NetEscapades.EnumGenerators" Version="1.0.0-beta20" />
<PackageReference Include="NetEscapades.EnumGenerators" Version="1.0.0-beta21" />
</Project>
```
<!-- endInclude -->
2 changes: 1 addition & 1 deletion docs/NetEscapades.EnumGenerators.source.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ This adds a `<PackageReference>` to your project:
</PropertyGroup>

<!-- Add the package -->
<PackageReference Include="NetEscapades.EnumGenerators" Version="1.0.0-beta20" />
<PackageReference Include="NetEscapades.EnumGenerators" Version="1.0.0-beta21" />
<!-- -->

</Project>
Expand Down
16 changes: 8 additions & 8 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ This adds a `<PackageReference>` to your project:
</PropertyGroup>

<!-- Add the package -->
<PackageReference Include="NetEscapades.EnumGenerators" Version="1.0.0-beta20" />
<PackageReference Include="NetEscapades.EnumGenerators" Version="1.0.0-beta21" />
<!-- -->

</Project>
Expand Down Expand Up @@ -453,10 +453,10 @@ In some cases you may not want these dependencies to flow to other projects. Thi
</PropertyGroup>

<!-- Add the generator package with PrivateAssets -->
<PackageReference Include="NetEscapades.EnumGenerators.Generators" Version="1.0.0-beta20" PrivateAssets="All"/>
<PackageReference Include="NetEscapades.EnumGenerators.Generators" Version="1.0.0-beta21" PrivateAssets="All"/>

<!-- Optionally add the runtime dependencies package -->
<PackageReference Include="NetEscapades.EnumGenerators.RuntimeDependencies" Version="1.0.0-beta20" />
<PackageReference Include="NetEscapades.EnumGenerators.RuntimeDependencies" Version="1.0.0-beta21" />
</Project>
```

Expand Down Expand Up @@ -516,7 +516,7 @@ In general, for simplicity, we recommend referencing [NetEscapades.EnumGenerator
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<PackageReference Include="NetEscapades.EnumGenerators" Version="1.0.0-beta20" />
<PackageReference Include="NetEscapades.EnumGenerators" Version="1.0.0-beta21" />
</Project>
```

Expand All @@ -529,7 +529,7 @@ In contrast, if you are producing a reusable library and don't want any runtime
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<PackageReference Include="NetEscapades.EnumGenerators.Generators" Version="1.0.0-beta20" PrivateAssets="All" ExcludeAssets="runtime" />
<PackageReference Include="NetEscapades.EnumGenerators.Generators" Version="1.0.0-beta21" PrivateAssets="All" ExcludeAssets="runtime" />
</Project>
```

Expand All @@ -543,8 +543,8 @@ The final option is to reference [NetEscapades.EnumGenerators.Generators](https:
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<PackageReference Include="NetEscapades.EnumGenerators.Generators" Version="1.0.0-beta20" PrivateAssets="All" ExcludeAssets="runtime"/>
<PackageReference Include="NetEscapades.EnumGenerators.RuntimeDependencies" Version="1.0.0-beta20" />
<PackageReference Include="NetEscapades.EnumGenerators.Generators" Version="1.0.0-beta21" PrivateAssets="All" ExcludeAssets="runtime"/>
<PackageReference Include="NetEscapades.EnumGenerators.RuntimeDependencies" Version="1.0.0-beta21" />
</Project>
```

Expand Down Expand Up @@ -657,7 +657,7 @@ The `[EnumExtensions]` attribute is decorated with the `[Conditional]` attribute
</PropertyGroup>

<!-- Add the package -->
<PackageReference Include="NetEscapades.EnumGenerators" Version="1.0.0-beta20" />
<PackageReference Include="NetEscapades.EnumGenerators" Version="1.0.0-beta21" />
</Project>
```
<!-- endInclude -->
2 changes: 1 addition & 1 deletion docs/README.source.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ This adds a `<PackageReference>` to your project:
</PropertyGroup>

<!-- Add the package -->
<PackageReference Include="NetEscapades.EnumGenerators" Version="1.0.0-beta20" />
<PackageReference Include="NetEscapades.EnumGenerators" Version="1.0.0-beta21" />
<!-- -->

</Project>
Expand Down
12 changes: 6 additions & 6 deletions docs/fragments/package-referencing.include.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ In some cases you may not want these dependencies to flow to other projects. Thi
</PropertyGroup>

<!-- Add the generator package with PrivateAssets -->
<PackageReference Include="NetEscapades.EnumGenerators.Generators" Version="1.0.0-beta20" PrivateAssets="All"/>
<PackageReference Include="NetEscapades.EnumGenerators.Generators" Version="1.0.0-beta21" PrivateAssets="All"/>

<!-- Optionally add the runtime dependencies package -->
<PackageReference Include="NetEscapades.EnumGenerators.RuntimeDependencies" Version="1.0.0-beta20" />
<PackageReference Include="NetEscapades.EnumGenerators.RuntimeDependencies" Version="1.0.0-beta21" />
</Project>
```

Expand Down Expand Up @@ -96,7 +96,7 @@ In general, for simplicity, we recommend referencing [NetEscapades.EnumGenerator
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<PackageReference Include="NetEscapades.EnumGenerators" Version="1.0.0-beta20" />
<PackageReference Include="NetEscapades.EnumGenerators" Version="1.0.0-beta21" />
</Project>
```

Expand All @@ -109,7 +109,7 @@ In contrast, if you are producing a reusable library and don't want any runtime
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<PackageReference Include="NetEscapades.EnumGenerators.Generators" Version="1.0.0-beta20" PrivateAssets="All" ExcludeAssets="runtime" />
<PackageReference Include="NetEscapades.EnumGenerators.Generators" Version="1.0.0-beta21" PrivateAssets="All" ExcludeAssets="runtime" />
</Project>
```

Expand All @@ -123,8 +123,8 @@ The final option is to reference [NetEscapades.EnumGenerators.Generators](https:
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<PackageReference Include="NetEscapades.EnumGenerators.Generators" Version="1.0.0-beta20" PrivateAssets="All" ExcludeAssets="runtime"/>
<PackageReference Include="NetEscapades.EnumGenerators.RuntimeDependencies" Version="1.0.0-beta20" />
<PackageReference Include="NetEscapades.EnumGenerators.Generators" Version="1.0.0-beta21" PrivateAssets="All" ExcludeAssets="runtime"/>
<PackageReference Include="NetEscapades.EnumGenerators.RuntimeDependencies" Version="1.0.0-beta21" />
</Project>
```

Expand Down
2 changes: 1 addition & 1 deletion docs/fragments/preserving-usages.include.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ The `[EnumExtensions]` attribute is decorated with the `[Conditional]` attribute
</PropertyGroup>

<!-- Add the package -->
<PackageReference Include="NetEscapades.EnumGenerators" Version="1.0.0-beta20" />
<PackageReference Include="NetEscapades.EnumGenerators" Version="1.0.0-beta21" />
</Project>
```
13 changes: 5 additions & 8 deletions releasenotes.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,20 @@
<PropertyGroup>
<PackageReleaseNotes>
<![CDATA[
## 1.0.0-beta20
## 1.0.0-beta21

### Breaking Changes

* Split NetEscapades.EnumGenerators package into 3 packages (#233, #234)
* _NetEscapades.EnumGenerators_ is a meta package, and should not be added with `PrivateAssets="All"` or `ExcludeAssets="runtime"`
* _NetEscapades.EnumGenerators.Generators_ contains the source generator, and _can_ be added with private assets
* _NetEscapades.EnumGenerators.RuntimeDependencies_ contains optional runtime dependencies used during generation
* Please see the readme for advice on choosing your packages: https://github.com/andrewlock/NetEscapades.EnumGenerators#package-referencing-options
* When using the _NetEscapades.EnumGenerators_ meta package, set `EnumGenerator_PreserveAttributes=true` by default, so that usage analyzers can light up in downstream projects (#241)

### Features

* Add analyzer to detect `StringBuilder.Append(enum)` on enums with `[EnumExtensions]` or `EnumExtensions<T>` (#230)
* Add "Force Internal" to allow forcing extension methods to be `internal` even for `public` enums (#230) Thanks [@xC0dex](https://github.com/xC0dex)!
* Extend usage analyzers to nullable enum variables (#244)

### Fixes

* Fix generating invalid XML in System.Memory warnings (#228)
* Scan all assemblies for "external" attributes for usage analyzers (#238)

]]>
</PackageReleaseNotes>
Expand Down
2 changes: 1 addition & 1 deletion src/NetEscapades.EnumGenerators.Generators/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ namespace NetEscapades.EnumGenerators;

public static class Constants
{
public const string Version = "1.0.0-beta20";
public const string Version = "1.0.0-beta21";
public const string MetadataSourcePropertyName = "EnumGenerator_EnumMetadataSource";
public const string ForceExtensionMembers = "EnumGenerator_ForceExtensionMembers";
public const string ForceInternalPropertyName = "EnumGenerator_ForceInternal";
Expand Down
2 changes: 1 addition & 1 deletion version.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<VersionPrefix>1.0.0</VersionPrefix>
<VersionSuffix>beta20</VersionSuffix>
<VersionSuffix>beta21</VersionSuffix>
<PackageVersion Condition="'$(VersionSuffix)' == ''">$(VersionPrefix)</PackageVersion>
<PackageVersion Condition="'$(VersionSuffix)' != ''">$(VersionPrefix)-$(VersionSuffix)</PackageVersion>
</PropertyGroup>
Expand Down
Loading