-
Notifications
You must be signed in to change notification settings - Fork 706
/
Directory.Build.targets
34 lines (31 loc) · 1.4 KB
/
Directory.Build.targets
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<Project>
<!--
Support for resx generators outside of VS
https://github.com/dotnet/msbuild/issues/4751
-->
<PropertyGroup>
<!--
This is required because OmniSharp (VSCode) calls the build in a way
that will skip resource generation. Without this line, OmniSharp won't
find the generated .cs files and analysis will fail.
-->
<CoreCompileDependsOn>PrepareResources;$(CoreCompileDependsOn)</CoreCompileDependsOn>
</PropertyGroup>
<ItemGroup>
<EmbeddedResource Update="@(EmbeddedResource)">
<Generator>MSBuild:Compile</Generator>
<ResourceNamespace>$(RootNamespace)$([MSBuild]::ValueOrDefault('.%(RelativeDir)', '').Replace('\', '.').Replace('/', '.').TrimEnd('.'))</ResourceNamespace>
<StronglyTypedFileName>$(IntermediateOutputPath)%(ResourceNamespace).%(Filename).g$(DefaultLanguageSourceExtension)</StronglyTypedFileName>
<StronglyTypedLanguage>$(Language)</StronglyTypedLanguage>
<StronglyTypedNamespace>%(ResourceNamespace)</StronglyTypedNamespace>
<StronglyTypedClassName>%(Filename)</StronglyTypedClassName>
</EmbeddedResource>
</ItemGroup>
<!--
Support for command line evaluation of properties
https://github.com/dotnet/msbuild/issues/3911#issuecomment-1478468822
-->
<Target Name="PrintVersion">
<Message Text="$(MSBuildProjectName):$(Version)" Importance="High" />
</Target>
</Project>