forked from dotnet/samples
/
DllServer.csproj
23 lines (17 loc) · 1.08 KB
/
DllServer.csproj
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\Contract\Server.Contract.props" />
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<!-- Indicate the assembly is providing a COM server -->
<EnableComHosting>true</EnableComHosting>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\COMRegistration\COMRegistration.csproj" />
</ItemGroup>
<Target Name="ServerUsage" AfterTargets="Build" DependsOnTargets="AssignTargetPaths">
<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>
</Project>