-
Notifications
You must be signed in to change notification settings - Fork 2
/
SplitMergePdf.csproj
48 lines (41 loc) · 2.44 KB
/
SplitMergePdf.csproj
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
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<!-- Indicate the assembly is providing a COM server -->
<EnableComHosting>True</EnableComHosting>
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
<ItemGroup>
<Reference Include="itextsharp">
<HintPath>..\itextsharp.dll</HintPath>
<CopyLocal>True</CopyLocal>
</Reference>
<!-- Used in lieu of a Primary Interop Assembly (PIA) -->
<Compile Include="../COMContract/*.cs" />
</ItemGroup>
<Target Name="ServerUsage" Condition="'$(RegFree)' != 'True'" AfterTargets="Build">
<Message Importance="High" Text="%0a************************************%0a*** $(MSBuildProjectName) usage instructions ***%0a************************************" />
<Message Importance="High" Text="The server must be COM registered in order to activate.%0aThe following commands must be executed from an elevated command prompt." />
<Message Importance="High" Text="Register:%0a regsvr32.exe "$(ProjectDir)$(OutputPath)$(ComHostFileName)"" />
<Message Importance="High" Text="Unregister:%0a regsvr32.exe /u "$(ProjectDir)$(OutputPath)$(ComHostFileName)"" />
</Target>
<Target Name="ServerUsage_RegFree" Condition="'$(RegFree)' == 'True'" AfterTargets="Build">
<Message Importance="High" Text="%0a************************************%0a*** $(MSBuildProjectName) usage instructions ***%0a************************************" />
<Message Importance="High" Text="A RegFree COM manifest has been created for the server.%0aThe manifest '@(RegFreeComManifest->'%(Filename)%(Extension)')' must be included during server deployment.%0aThe COMServer project will copy all required outputs to the COMClient output directory." />
<ItemGroup>
<ServerOutput Include="$(OutputPath)*.dll" />
<ServerOutput Include="$(OutputPath)*.runtimeconfig.json" />
<ServerOutput Include="$(OutputPath)*.deps.json" />
<ServerOutput Include="$(OutputPath)*.manifest" />
</ItemGroup>
<!-- Deploy all required server outputs -->
<Copy SourceFiles="@(ServerOutput)" DestinationFolder="../COMClient/$(OutputPath)" />
</Target>
<Target Name="Clean_RegFree" AfterTargets="Clean">
<ItemGroup>
<ServerOutputToDelete Include="../COMClient/$(OutputPath)COMServer.*" />
</ItemGroup>
<!-- Cleanup deployed server outputs -->
<Delete Files="@(ServerOutputToDelete)" />
</Target>
</Project>