RevitDevTool.TestAdapter 0.0.3

dotnet add package RevitDevTool.TestAdapter --version 0.0.3
                    
NuGet\Install-Package RevitDevTool.TestAdapter -Version 0.0.3
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="RevitDevTool.TestAdapter" Version="0.0.3">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="RevitDevTool.TestAdapter" Version="0.0.3" />
                    
Directory.Packages.props
<PackageReference Include="RevitDevTool.TestAdapter">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add RevitDevTool.TestAdapter --version 0.0.3
                    
#r "nuget: RevitDevTool.TestAdapter, 0.0.3"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package RevitDevTool.TestAdapter@0.0.3
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=RevitDevTool.TestAdapter&version=0.0.3
                    
Install as a Cake Addin
#tool nuget:?package=RevitDevTool.TestAdapter&version=0.0.3
                    
Install as a Cake Tool

RevitDevTool.TestAdapter

Microsoft.Testing.Platform adapter that runs tests inside a live Revit or AutoCAD-family host. Requires RevitDevTool.

The package does not depend on a test framework. NUnit remains the default and uses local ExploreTests discovery via DevTools.NUnit.MTP.dll. Native TUnit is Revit-only (HostName=Revit) and follows the same year → TFM mapping as the host add-in. DevTools.TUnit.MTP.dll reads TUnit.Core Sources.TestEntries locally; in-host execution uses the same catalog through TestRunner and testing/run IPC, not a nested MTP testhost.

Host options come from csproj properties. The package generates testconfig.json and Microsoft.Testing.Platform.MSBuild copies it to [AssemblyName].testconfig.json. The adapter reads the devtools section through MTP IConfiguration. Do not use .runsettings.

<PropertyGroup>
  <IsTestProject>true</IsTestProject>
  <OutputType>Exe</OutputType>
  <RuntimeIdentifiers>win-x64</RuntimeIdentifiers>
  
  <HostName>Revit</HostName>
  <HostVersion>$(RevitVersion)</HostVersion>
  
  <ForceLaunch>false</ForceLaunch>
  <PerTestTimeout>60</PerTestTimeout>
  <LaunchTimeout>180</LaunchTimeout>
  <TestingFramework>nunit</TestingFramework>
</PropertyGroup>
<ItemGroup>
  <PackageReference Include="RevitDevTool.TestAdapter" />
  <PackageReference Include="Microsoft.Testing.Platform.MSBuild" />
  <PackageReference Include="NUnit" Version="4.6.1" />
</ItemGroup>

For TUnit 1.65.38, keep the same host properties and replace the framework items with:

<PropertyGroup>
  <TestingFramework>tunit</TestingFramework>
</PropertyGroup>
<ItemGroup>
  <PackageReference Include="RevitDevTool.TestAdapter" />
  <PackageReference Include="Microsoft.Testing.Platform.MSBuild" />
  <PackageReference Include="TUnit" Version="1.65.38" />
</ItemGroup>

TUnit requires HostName=Revit. It is not gated to specific Revit years; use the same HostVersion / TFM as any other Revit test project.

AutoCAD-family projects set <HostName>AutoCad</HostName> or Civil3D, and <HostVersion>$(AutoCadVersion)</HostVersion> (or the year string). Keep a global.json next to the test project:

{
  "sdk": { "version": "10.0.0", "rollForward": "latestMinor" },
  "test": { "runner": "Microsoft.Testing.Platform" }
}
cd path/to/Host.Tests
dotnet test --project Host.Tests.csproj -c Debug --filter MethodName

--filter is a test method name or substring. Always run dotnet test from the folder that contains that global.json.

Product Compatible and additional computed target framework versions.
.NET net8.0-windows7.0 is compatible.  net9.0-windows was computed.  net10.0-windows was computed.  net10.0-windows7.0 is compatible. 
.NET Framework net48 is compatible.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.0.3 82 8/23/2026
0.0.2 92 8/20/2026
0.0.1 86 8/18/2026