8000 When using EnableRexCodeGenerator, this should Just Work · devlooped/oss@c7235d7 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Commit c7235d7

Browse files
authored
When using EnableRexCodeGenerator, this should Just Work
Default to Just Works resources generation. See https://www.cazzulino.com/resources.html
1 parent 13d67e2 commit c7235d7

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/Directory.Build.targets

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,15 @@
9999
<UpToDateCheck Include="@(None);@(Content);@(EmbeddedResource)" />
100100
<!-- We'll typically use ThisAssembly.Strings instead of the built-in resource manager codegen -->
101101
<EmbeddedResource Update="@(EmbeddedResource)" Generator="" Condition="'$(EnableRexCodeGenerator)' != 'true'" />
102+
<EmbeddedResource Update="@(EmbeddedResource)" Condition="'$(EnableRexCodeGenerator)' == 'true'">
103+
<!-- Default to Just Works resources generation. See https://www.cazzulino.com/resources.html -->
104+
<Generator>MSBuild:Compile</Generator>
105+
<StronglyTypedFileName>$(IntermediateOutputPath)\$([MSBuild]::ValueOrDefault('%(RelativeDir)', '').Replace('\', '.').Replace('/', '.'))%(Filename).g$(DefaultLanguageSourceExtension)</StronglyTypedFileName>
106+
<StronglyTypedLanguage>$(Language)</StronglyTypedLanguage>
107+
<StronglyTypedNamespace Condition="'%(RelativeDir)' == ''">$(RootNamespace)</StronglyTypedNamespace>
108+
<StronglyTypedNamespace Condition="'%(RelativeDir)' != ''">$(RootNamespace).$([MSBuild]::ValueOrDefault('%(RelativeDir)', '').Replace('\', '.').Replace('/', '.').TrimEnd('.'))</StronglyTypedNamespace>
109+
<StronglyTypedClassName>%(Filename)</StronglyTypedClassName>
110+
</EmbeddedResource>
102111
</ItemGroup>
103112

104113
<Target Name="IsPackable" Returns="@(IsPackable)">
@@ -161,4 +170,4 @@
161170
<Import Project="Directory.targets" Condition="Exists('Directory.targets')"/>
162171
<Import Project="Directory.targets.user" Condition="Exists('Directory.targets.user')" />
163172

164-
</Project>
173+
</Project>

0 commit comments

Comments
 (0)
0