Skip to content

Commit 65ee034

Browse files
committed
Fix comment generation in Resources.Designer.cs, remove from source control
1 parent 8ff0cbc commit 65ee034

2 files changed

Lines changed: 18 additions & 140 deletions

File tree

src/Lucene.Net.CodeAnalysis.Dev/Lucene.Net.CodeAnalysis.Dev.csproj

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
1111

1212
<Version>1.0.0</Version>
13+
14+
<!-- This is needed so that the cross-platform C# language server can find the generated Resources.Designer.cs file -->
15+
<!-- see: https://github.com/dotnet/msbuild/issues/8086 -->
16+
<CoreCompileDependsOn>PrepareResources;$(CompileDependsOn)</CoreCompileDependsOn>
1317
</PropertyGroup>
1418

1519
<ItemGroup>
@@ -21,8 +25,20 @@
2125
</ItemGroup>
2226

2327
<ItemGroup>
24-
<Compile Update="Resources.Designer.cs" DesignTime="True" AutoGen="True" DependentUpon="Resources.resx" />
25-
<EmbeddedResource Update="Resources.resx" Generator="ResXFileCodeGenerator" LastGenOutput="Resources.Designer.cs" />
28+
<!--
29+
This approach allows the Resources.designer.cs file to be generated into obj,
30+
instead of checked into source control. It also fixes an issue with JetBrains Rider
31+
where it doesn't generate comments on the generated properties.
32+
See: https://github.com/dotnet/msbuild/issues/8086
33+
and https://youtrack.jetbrains.com/issue/RIDER-74074/PublicResXFileCodeGenerator-does-not-generate-comments-and-the-order-of-properties-changes
34+
-->
35+
<EmbeddedResource Update="Resources.resx">
36+
<Generator>MSBuild:Compile</Generator>
37+
<StronglyTypedFileName>$(IntermediateOutputPath)/Resources.designer.cs</StronglyTypedFileName>
38+
<StronglyTypedLanguage>CSharp</StronglyTypedLanguage>
39+
<StronglyTypedNamespace>Lucene.Net.CodeAnalysis.Dev</StronglyTypedNamespace>
40+
<StronglyTypedClassName>Resources</StronglyTypedClassName>
41+
</EmbeddedResource>
2642
</ItemGroup>
2743

2844
</Project>

src/Lucene.Net.CodeAnalysis.Dev/Resources.Designer.cs

Lines changed: 0 additions & 138 deletions
This file was deleted.

0 commit comments

Comments
 (0)