Skip to content

Commit

Permalink
Merge pull request #154 from AArnott/resx
Browse files Browse the repository at this point in the history
Switch to resx source generator
  • Loading branch information
AArnott authored Dec 20, 2024
2 parents aad8806 + ec44581 commit b6e9f7f
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 280 deletions.
1 change: 1 addition & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<ItemGroup>
<GlobalPackageReference Include="CSharpIsNullAnalyzer" Version="0.1.593" />
<GlobalPackageReference Include="DotNetAnalyzers.DocumentationAnalyzers" Version="1.0.0-beta.59" />
<GlobalPackageReference Include="Microsoft.CodeAnalysis.ResxSourceGenerator" Version="3.11.0-beta1.24527.2" />
<!-- The condition works around https://github.com/dotnet/sdk/issues/44951 -->
<GlobalPackageReference Include="Nerdbank.GitVersioning" Version="3.7.112" Condition="!('$(TF_BUILD)'=='true' and '$(dotnetformat)'=='true')" />
<GlobalPackageReference Include="PolySharp" Version="1.15.0" />
Expand Down
3 changes: 3 additions & 0 deletions src/Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
<Compile Include="$(MSBuildThisFileDirectory)AssemblyInfo.cs" Condition=" '$(Language)'=='C#' " />
<Compile Include="$(MSBuildThisFileDirectory)AssemblyInfo.vb" Condition=" '$(Language)'=='VB' " />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Update="*.resx" EmitFormatMethods="true" />
</ItemGroup>

<Import Project="$([MSBuild]::GetPathOfFileAbove($(MSBuildThisFile), $(MSBuildThisFileDirectory)..))" />
</Project>
153 changes: 0 additions & 153 deletions src/Validation/Strings.Designer.cs

This file was deleted.

15 changes: 0 additions & 15 deletions src/Validation/Validation.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,6 @@
<PackageTags>InputValidation IntegrityCheck</PackageTags>
</PropertyGroup>

<ItemGroup>
<EmbeddedResource Update="Strings.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Strings.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>

<ItemGroup>
<Compile Update="Strings.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>Strings.resx</DependentUpon>
</Compile>
</ItemGroup>

<Target Name="WarnIncompleteBuild" BeforeTargets="Pack" Condition="'$(MSBuildRuntimeType)'!='Full'">
<Warning Text="This package will contain a subset of the shipping binaries. Use msbuild.exe on Windows for a complete build." Code="IncompleteBuild" />
</Target>
Expand Down
99 changes: 0 additions & 99 deletions test/Validation.Tests/TestStrings.Designer.cs

This file was deleted.

13 changes: 0 additions & 13 deletions test/Validation.Tests/Validation.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,4 @@
<ItemGroup>
<ProjectReference Include="..\..\src\Validation\Validation.csproj" />
</ItemGroup>
<ItemGroup>
<Compile Update="TestStrings.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>TestStrings.resx</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Update="TestStrings.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>TestStrings.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
</Project>

0 comments on commit b6e9f7f

Please sign in to comment.