-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathOFFPluginInfo.props
More file actions
26 lines (26 loc) · 1.27 KB
/
OFFPluginInfo.props
File metadata and controls
26 lines (26 loc) · 1.27 KB
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
<Project>
<Target Name="AddGeneratedFile" BeforeTargets="BeforeCompile;CoreCompile" Inputs="$(MSBuildAllProjects)" Outputs="$(IntermediateOutputPath)GeneratedFile.cs">
<PropertyGroup>
<BepInExPluginGuid Condition="'$(BepInExPluginGuid)' == ''">$(ProjectGuid)</BepInExPluginGuid>
<BepInExPluginName Condition="'$(BepInExPluginName)' == ''">$(Product)</BepInExPluginName>
<BepInExPluginVersion Condition="'$(BepInExPluginVersion)' == ''">$(Version)</BepInExPluginVersion>
<GeneratedText><![CDATA[
namespace $(RootNamespace)
{
internal static class OFFPluginInfo
{
public const string PLUGIN_GUID = "$(BepInExPluginGuid)"%3B
public const string PLUGIN_NAME = "$(BepInExPluginName)"%3B
public const string PLUGIN_VERSION = "$(BepInExPluginVersion)"%3B
}
}
]]></GeneratedText>
<GeneratedFilePath>$(IntermediateOutputPath)OFFPluginInfo.cs</GeneratedFilePath>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(GeneratedFilePath)" />
<FileWrites Include="$(GeneratedFilePath)" />
</ItemGroup>
<WriteLinesToFile Lines="$(GeneratedText)" File="$(GeneratedFilePath)" WriteOnlyWhenDifferent="true" Overwrite="true" />
</Target>
</Project>