-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTestStandMCP.csproj
More file actions
93 lines (87 loc) · 5.64 KB
/
Copy pathTestStandMCP.csproj
File metadata and controls
93 lines (87 loc) · 5.64 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<!-- net8.0-windows: COM interop (TestStand engine) is a Windows-only feature.
The TestStand engine COM server is 32-bit, so the host process must stay x86;
an x86 .NET 8 runtime is installed under "C:\Program Files (x86)\dotnet". -->
<TargetFramework>net8.0-windows</TargetFramework>
<LangVersion>latest</LangVersion>
<AssemblyName>TestStandMCP</AssemblyName>
<RootNamespace>TestStandMCP</RootNamespace>
<Nullable>enable</Nullable>
<!-- PlatformTarget x86 + the x86 .NET SDK produce a 32-bit apphost (TestStandMCP.exe)
so the process loads the in-process 32-bit TestStand COM server. (No RuntimeIdentifier
on purpose — keeps the output path bin\x86\Debug\net8.0-windows\ clean.) -->
<PlatformTarget>x86</PlatformTarget>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<Version>1.0.0</Version>
<Description>MCP Server for NI TestStand automation and integration</Description>
<Authors>TestStandMCP</Authors>
<Platforms>AnyCPU;x86</Platforms>
</PropertyGroup>
<!-- Exclude the test project subtree — the SDK wildcard would pick it up otherwise -->
<ItemGroup>
<Compile Remove="Test\**" />
<None Remove="Test\**" />
<Content Remove="Test\**" />
<EmbeddedResource Remove="Test\**" />
</ItemGroup>
<!-- Ship the guidance + agent files INTO the build output so a deployed bin\ folder is
self-contained. On the target PC, .claude\agents\link-agents.bat junctions
%USERPROFILE%\.claude\agents to this deployed .claude\agents folder (see that .bat).
- CLAUDE.md / README.md are already default-included as <None>, so we <Update> them
(an <Include> would raise a duplicate-item error).
- .claude\** is excluded by the SDK default globs (**/.*/**), so the agent files must
be added explicitly via <Include>. The Link metadata preserves the .claude\agents
subpath in the output; PreserveNewest keeps the copy incremental.
- scripts\** (the Python doc/presentation generators + their sibling HTML template)
are shipped alongside so a deployed bin\ is self-contained: the doc- and
presentation-generator agents run from ANY working directory once junctioned
user-wide, so a working-directory-relative "<repo>\scripts" path would not exist.
The agents resolve the real location via get_engine_paths → ScriptsDirectory
(= AppContext.BaseDirectory\scripts), which points exactly here. -->
<ItemGroup>
<None Update="CLAUDE.md" CopyToOutputDirectory="PreserveNewest" />
<None Update="README.md" CopyToOutputDirectory="PreserveNewest" />
<!-- The configuration is loaded with SetBasePath(AppContext.BaseDirectory), so appsettings.json
only ever takes effect from NEXT TO THE EXE. Without this copy the file was read from
nowhere: AddJsonFile is optional, so it failed silently, and every key in it — including the
long-dead TestStand:EnginePath — looked configurable while being unreachable. -->
<None Update="appsettings.json" CopyToOutputDirectory="PreserveNewest" />
<None Include=".claude\agents\**\*"
Link=".claude\agents\%(RecursiveDir)%(Filename)%(Extension)"
CopyToOutputDirectory="PreserveNewest" />
<None Include="scripts\**\*"
Link="scripts\%(RecursiveDir)%(Filename)%(Extension)"
CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>
<!-- NI's official requirement for hosting the TestStand engine under .NET Core/8: the engine
loads the .NET Core runtime in-process and the host app's runtimeconfig.json MUST declare
BOTH of these shared frameworks (mirrors <TestStand>\AdapterSupport\DotNetSupport\
DotnetCore.runtimeconfig.json). Without them the engine raises "The TestStand Engine cannot
be initialized — Error occurred when loading .NET Core runtime" and ConnectAsync fails.
WindowsDesktop.App also supplies `stdole`, which the NI interop assembly references. -->
<ItemGroup>
<FrameworkReference Include="Microsoft.WindowsDesktop.App" />
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
<ItemGroup>
<!-- Microsoft.CSharp provides the runtime binder for `dynamic` (late-bound IDispatch COM). -->
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<!-- NI TestStand interop, netstandard2.0 build (loads under .NET 8). Same namespaces/types
as the .NET-Framework PIA, so the source compiles unchanged. Replaces the old direct
HintPath reference to the .NET-Framework PIA, which does NOT load under .NET Core/8 —
that was the root cause of the engine "Connect" failure on .NET Core. -->
<PackageReference Include="NationalInstruments.TestStand.API" Version="23.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="8.0.0" />
<PackageReference Include="System.Text.Json" Version="8.0.6" />
</ItemGroup>
</Project>