-
Notifications
You must be signed in to change notification settings - Fork 31
Expand file tree
/
Copy pathBasicExampleConNet10.csproj
More file actions
55 lines (50 loc) · 2.44 KB
/
Copy pathBasicExampleConNet10.csproj
File metadata and controls
55 lines (50 loc) · 2.44 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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net10.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\BasicExampleCon\Program.cs">
<Link>Program.cs</Link>
</Compile>
<Compile Include="..\BasicExampleCon\Properties\AssemblyInfo.cs">
<Link>Properties\AssemblyInfo.cs</Link>
</Compile>
<None Include="..\BasicExampleCon\test.snk">
<Link>test.snk</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<ProjectReference Include="..\BasicExampleLibraryNet10\BasicExampleLibraryNet10.csproj" />
</ItemGroup>
<Target Name="GenerateObfuscarConfig" BeforeTargets="PostBuildEvent;PostBuild">
<PropertyGroup>
<_ProjectDir>$(MSBuildProjectDirectory)\</_ProjectDir>
<_OutDir>$(OutputPath)</_OutDir>
<_InPath>$(_ProjectDir)$(_OutDir)</_InPath>
<_OutPath>$(_InPath)Obfuscator_Output</_OutPath>
<_KeyFile>$(_InPath)test.snk</_KeyFile>
<_ConfigFile>$(_InPath)obfuscar.generated.xml</_ConfigFile>
</PropertyGroup>
<ItemGroup>
<_ObfuscarLines Include="<?xml version='1.0'?>" />
<_ObfuscarLines Include="<Obfuscator>" />
<_ObfuscarLines Include=" <Var name='InPath' value='$(_InPath)' />" />
<_ObfuscarLines Include=" <Var name='OutPath' value='$(_OutPath)' />" />
<_ObfuscarLines Include=" <Var name='HidePrivateApi' value='true' />" />
<_ObfuscarLines Include=" <Var name='KeyFile' value='$(_KeyFile)' />" />
<_ObfuscarLines Include=" " />
<_ObfuscarLines Include=" <Module file='$(_InPath)$(AssemblyName)$(TargetExt)' />" />
<_ObfuscarLines Include=" <Module file='$(_InPath)BasicExampleLibraryNet10.dll' />" />
<_ObfuscarLines Include="</Obfuscator>" />
</ItemGroup>
<Message Importance="high" Text="Generating obfuscar config at: $(_ConfigFile)" />
<WriteLinesToFile File="$(_ConfigFile)" Overwrite="true" Lines="@(_ObfuscarLines)" />
<Message Importance="high" Text="Obfuscar config generated successfully" />
</Target>
<Target Name="RunObfuscar" AfterTargets="Build">
<Exec Command="dotnet tool run obfuscar.console $(_InPath)obfuscar.generated.xml" WorkingDirectory="$(MSBuildProjectDirectory)" />
</Target>
</Project>