-
Notifications
You must be signed in to change notification settings - Fork 0
/
SpaceWarp.PluginInfoProps.props
41 lines (41 loc) · 1.66 KB
/
SpaceWarp.PluginInfoProps.props
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
40
41
<Project>
<Target Name="AddGeneratedFile"
BeforeTargets="BeforeCompile;CoreCompile"
Inputs="$(MSBuildAllProjects)"
Outputs="$(IntermediateOutputPath)GeneratedFile.cs">
<PropertyGroup>
<SpaceWarpPluginGuid Condition="'$(SpaceWarpPluginGuid)' == ''">$(AssemblyName)</SpaceWarpPluginGuid>
<SpaceWarpPluginName Condition="'$(SpaceWarpPluginName)' == ''">$(Product)</SpaceWarpPluginName>
<SpaceWarpPluginVersion Condition="'$(SpaceWarpPluginVersion)' == ''">$(Version)</SpaceWarpPluginVersion>
<GeneratedText><![CDATA[
namespace $(RootNamespace)
{
/// <summary>
/// Automatically generated information about the plugin.
/// </summary>
public static class MyPluginInfo
{
/// <summary>
/// The GUID of the plugin.
/// </summary>
public const string PLUGIN_GUID = "$(SpaceWarpPluginGuid)"%3B
/// <summary>
/// The name of the plugin.
/// </summary>
public const string PLUGIN_NAME = "$(SpaceWarpPluginName)"%3B
/// <summary>
/// The version of the plugin.
/// </summary>
public const string PLUGIN_VERSION = "$(SpaceWarpPluginVersion)"%3B
}
}
]]></GeneratedText>
<GeneratedFilePath>$(IntermediateOutputPath)MyPluginInfo.cs</GeneratedFilePath>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(GeneratedFilePath)" />
<FileWrites Include="$(GeneratedFilePath)" />
</ItemGroup>
<WriteLinesToFile Lines="$(GeneratedText)" File="$(GeneratedFilePath)" WriteOnlyWhenDifferent="true" Overwrite="true" />
</Target>
</Project>