-
Notifications
You must be signed in to change notification settings - Fork 0
/
Directory.Build.targets
39 lines (32 loc) · 1.44 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
35
36
37
38
39
<Project>
<ItemGroup Condition="'$(TargetFramework.TrimEnd(`0123456789`))' == 'net'">
<PackageReference
Include="Microsoft.NETFramework.ReferenceAssemblies"
PrivateAssets="all"
Version="1.0.2"
/>
</ItemGroup>
<Target Name="AddGeneratedFile" BeforeTargets="BeforeCompile;CoreCompile"
Inputs="$(MSBuildAllProjects)" Outputs="$(IntermediateOutputPath)LCMPluginInfo.cs">
<PropertyGroup>
<LCMPluginGuid Condition="'$(LCMPluginGuid)' == ''">$(AssemblyName)</LCMPluginGuid>
<LCMPluginName Condition="'$(LCMPluginName)' == ''">$(Product)</LCMPluginName>
<LCMPluginVersion Condition="'$(LCMPluginVersion)' == ''">$(Version)</LCMPluginVersion>
<GeneratedText><![CDATA[
internal static class LCMPluginInfo
{
public const string PLUGIN_GUID = "$(LCMPluginGuid)"%3B
public const string PLUGIN_NAME = "$(LCMPluginName)"%3B
public const string PLUGIN_VERSION = "$(LCMPluginVersion)"%3B
}
]]></GeneratedText>
<GeneratedFilePath>$(IntermediateOutputPath)LCMPluginInfo.cs</GeneratedFilePath>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(GeneratedFilePath)" />
<FileWrites Include="$(GeneratedFilePath)" />
</ItemGroup>
<WriteLinesToFile Lines="$(GeneratedText)" File="$(GeneratedFilePath)"
WriteOnlyWhenDifferent="true" Overwrite="true" />
</Target>
</Project>