-
-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathCodingWithCalvin.MCPServer.csproj
More file actions
61 lines (52 loc) · 2.53 KB
/
CodingWithCalvin.MCPServer.csproj
File metadata and controls
61 lines (52 loc) · 2.53 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
56
57
58
59
60
61
<Project Sdk="CodingWithCalvin.VsixSdk/0.4.0">
<PropertyGroup>
<TargetFramework>net48</TargetFramework>
<LangVersion>latest</LangVersion>
<Nullable>enable</Nullable>
<RootNamespace>CodingWithCalvin.MCPServer</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="CodingWithCalvin.Otel4Vsix" Version="0.2.2" />
<PackageReference Include="Microsoft.VisualStudio.SDK" Version="17.14.40265" />
<PackageReference Include="Microsoft.VSSDK.BuildTools" Version="17.*" PrivateAssets="all" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\CodingWithCalvin.MCPServer.Shared\CodingWithCalvin.MCPServer.Shared.csproj" />
</ItemGroup>
<ItemGroup>
<Content Include="..\..\LICENSE">
<Link>resources\LICENSE</Link>
<IncludeInVSIX>true</IncludeInVSIX>
</Content>
<Content Include="..\..\resources\logo.png">
<Link>resources\logo.png</Link>
<IncludeInVSIX>true</IncludeInVSIX>
</Content>
</ItemGroup>
<PropertyGroup>
<ServerProjectDir>$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)..\CodingWithCalvin.MCPServer.Server\'))</ServerProjectDir>
<ServerOutputDir>$(ServerProjectDir)bin\$(Configuration)\net10.0\</ServerOutputDir>
<ServerPublishDir>$(ServerProjectDir)bin\$(Configuration)\net10.0\publish\</ServerPublishDir>
</PropertyGroup>
<!-- Build and publish the server project as self-contained -->
<Target Name="BuildServer" BeforeTargets="Build">
<Exec Command="dotnet publish "$(ServerProjectDir)CodingWithCalvin.MCPServer.Server.csproj" -c $(Configuration) --self-contained -r win-x64 -o "$(ServerPublishDir)"" />
<Message Importance="high" Text="Server published to: $(ServerPublishDir)" />
</Target>
<!-- Include the server executable in the VSIX -->
<Target Name="IncludeServerInVsix" BeforeTargets="GetVsixSourceItems" DependsOnTargets="BuildServer">
<ItemGroup>
<VSIXSourceItem Include="$(ServerPublishDir)**\*.*">
<VSIXSubPath>Server\%(RecursiveDir)</VSIXSubPath>
</VSIXSourceItem>
</ItemGroup>
<Message Importance="high" Text="Including server from: $(ServerPublishDir)" />
</Target>
<!-- Copy server files to output directory for debugging -->
<Target Name="CopyServerToOutput" AfterTargets="Build" DependsOnTargets="BuildServer">
<ItemGroup>
<ServerFiles Include="$(ServerPublishDir)**\*.*" />
</ItemGroup>
<Copy SourceFiles="@(ServerFiles)" DestinationFolder="$(OutputPath)Server\%(RecursiveDir)" SkipUnchangedFiles="true" />
</Target>
</Project>