Skip to content

Commit 1aa040c

Browse files
committed
fix(nunit): publish as RevitDevTool.NUnit after nuget.org reserved DevTools
nuget.org rejected PackageId DevTools.NUnit. Rename the consumer package and MSBuild assets so they auto-import under the new id.
1 parent 86f0a0e commit 1aa040c

11 files changed

Lines changed: 37 additions & 37 deletions

File tree

.github/workflows/PublishNUnit.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
workflow_dispatch:
55
inputs:
66
push:
7-
description: "Push DevTools.NUnit to nuget.org (OIDC Trusted Publishing)"
7+
description: "Push RevitDevTool.NUnit to nuget.org (OIDC Trusted Publishing)"
88
type: boolean
99
default: true
1010
nuget_user:
@@ -39,7 +39,7 @@ jobs:
3939
- name: Test MTP
4040
run: dotnet test tests/DevTools.NUnit.Mtp.Tests/DevTools.NUnit.Mtp.Tests.csproj -c Release
4141

42-
- name: Pack DevTools.NUnit
42+
- name: Pack RevitDevTool.NUnit
4343
id: pack
4444
shell: pwsh
4545
run: |
@@ -55,8 +55,8 @@ jobs:
5555
- name: Upload nupkg
5656
uses: actions/upload-artifact@v4
5757
with:
58-
name: DevTools.NUnit.${{ steps.pack.outputs.version }}
59-
path: output/nuget/DevTools.NUnit.${{ steps.pack.outputs.version }}.nupkg
58+
name: RevitDevTool.NUnit.${{ steps.pack.outputs.version }}
59+
path: output/nuget/RevitDevTool.NUnit.${{ steps.pack.outputs.version }}.nupkg
6060
if-no-files-found: error
6161
retention-days: 14
6262

@@ -92,7 +92,7 @@ jobs:
9292
NUGET_API_KEY: ${{ steps.login.outputs.NUGET_API_KEY }}
9393
PACKAGE_VERSION: ${{ steps.pack.outputs.version }}
9494
run: |
95-
$nupkg = "output/nuget/DevTools.NUnit.$($env:PACKAGE_VERSION).nupkg"
95+
$nupkg = "output/nuget/RevitDevTool.NUnit.$($env:PACKAGE_VERSION).nupkg"
9696
if (-not (Test-Path -LiteralPath $nupkg)) {
9797
throw "Missing $nupkg"
9898
}

docs/agents/nunit-host-testing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Host DLL changes: `scripts/build-host.ps1 -Year <year>`. Runner: `dotnet publish
2020

2121
## Pattern
2222

23-
- Package contract: `HostName`, `HostVersion`, `HostLaunch`, timeouts + NUnit. MTP consumers add `DevTools.NUnit`; VSTest consumers add `DevTools.NUnit.TestAdapter` + `Microsoft.NET.Test.Sdk`. `UseRevit`/`UseAutoCad` are this repo's sample compile flags, not package settings.
23+
- Package contract: `HostName`, `HostVersion`, `HostLaunch`, timeouts + NUnit. MTP consumers add `RevitDevTool.NUnit`; VSTest consumers add `DevTools.NUnit.TestAdapter` + `Microsoft.NET.Test.Sdk`. `UseRevit`/`UseAutoCad` are this repo's sample compile flags, not package settings.
2424
- MTP `--filter` = NUnit method name. VSTest `--filter` = `FullyQualifiedName~…`. Runner owns NUnit XML (`--name` / `--test`).
2525
- MTP: `dotnet test` from the sample directory (scoped `global.json`). VSTest: run from that sample directory or repo root — never from an MTP sample folder.
2626
- Four samples: MTP×Revit, MTP×Civil3D, VSTest×Revit, VSTest×Civil3D. Do not mix adapters on one project.

docs/product/nunit-host-testing.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# NUnit Host Testing
22

33
Experimental in-host NUnit for Revit / AutoCAD-family via DevTools Named Pipe,
4-
with MTP (`DevTools.NUnit`) and VSTest (`DevTools.NUnit.TestAdapter`) consumers.
4+
with MTP (`RevitDevTool.NUnit`) and VSTest (`DevTools.NUnit.TestAdapter`) consumers.
55
The MTP package requires
66
[RevitDevTool](https://github.com/trgiangv/RevitDevTool); the host-test
77
controller ships in that installer. The live CAD host executes the tests.
88

99
## Status
1010

11-
**Experimental.** Discover / run / progress work end-to-end. `DevTools.NUnit`
11+
**Experimental.** Discover / run / progress work end-to-end. `RevitDevTool.NUnit`
1212
(MTP) is published independently of the RevitDevTool installer. Version is
1313
`<Version>` in `source/DevTools.NUnit.Mtp/DevTools.NUnit.Mtp.csproj` (starts at
1414
`0.0.1`). Run `.github/workflows/PublishNUnit.yml` from GitHub Actions to pack
@@ -19,7 +19,7 @@ Host-process debugging is **out of scope**. There is no `--debug` CLI, no Test
1919
Explorer Debug attach, and no IDE SDK. Attach the IDE debugger to the host
2020
PID yourself if needed; that is not a product feature.
2121

22-
Two consumer surfaces share the same Runner/Host: MTP (`DevTools.NUnit`) and
22+
Two consumer surfaces share the same Runner/Host: MTP (`RevitDevTool.NUnit`) and
2323
VSTest (`DevTools.NUnit.TestAdapter`). Keep them on **separate** test projects.
2424

2525
## Modules
@@ -29,10 +29,10 @@ VSTest (`DevTools.NUnit.TestAdapter`). Keep them on **separate** test projects.
2929
| `DevTools.NUnit.Core` | `nunit/*` wire contracts, timing, protocol version |
3030
| `DevTools.NUnit.Host` | Native NUnit runtime in the CAD host |
3131
| `DevTools.NUnit.Runner` | CLI controller: find/launch host pipe, discover/run |
32-
| `DevTools.NUnit.Mtp` | MTP framework (`PackageId=DevTools.NUnit`); proxies to Runner |
32+
| `DevTools.NUnit.Mtp` | MTP framework (`PackageId=RevitDevTool.NUnit`); proxies to Runner |
3333
| `DevTools.NUnit.TestAdapter` | VSTest adapter; same Runner/Host contract |
3434

35-
`DevTools.NUnit` is an independent test-platform package. Consumers set
35+
`RevitDevTool.NUnit` is an independent test-platform package. Consumers set
3636
`HostName` / `HostVersion` / launch timeouts; the package does not read this
3737
repo's `UseRevit` / `UseAutoCad`. MTP never loads into the CAD host, so it is
3838
not ILRepacked. `Microsoft.Testing.Platform` is compile-only
@@ -51,7 +51,7 @@ Four live samples — two adapters × two hosts. Do not mix MTP and VSTest on on
5151

5252
| Sample | Adapter | Host |
5353
|--------|---------|------|
54-
| `samples/DevTools.NUnit.SampleTests` | MTP (`DevTools.NUnit`) | Revit |
54+
| `samples/DevTools.NUnit.SampleTests` | MTP (`RevitDevTool.NUnit`) | Revit |
5555
| `samples/DevTools.NUnit.Civil3D.SampleTests` | MTP | Civil 3D |
5656
| `samples/DevTools.NUnit.VSTest.SampleTests` | VSTest (`DevTools.NUnit.TestAdapter`) | Revit |
5757
| `samples/DevTools.NUnit.VSTest.Civil3D.SampleTests` | VSTest | Civil 3D |
@@ -112,7 +112,7 @@ Runner ships under the ApplicationPlugins bundle `Contents` folder (publish
112112
| Probe load | **Also shadows**: zip test folder → `%TEMP%\RevitTest\` → extract → `Assembly.LoadFile` on the temp copy (then optional zip-back) | Content-addressed generation shadow of test output + Runtime |
113113
| Transport | Own Console + `PipeTestServer`/`PipeTestClient` (process-named pipe) | Existing `DevToolsPipeServer` + `IHostContextExecutor` |
114114
| IDE surface | VS-oriented + EnvDTE attach | MTP + VSTest samples; no debugger integration |
115-
| Package | ricaun NuGet ecosystem | `DevTools.NUnit` (MTP) NuGet, versioned in the MTP csproj; VSTest adapter in-tree |
115+
| Package | ricaun NuGet ecosystem | `RevitDevTool.NUnit` (MTP) NuGet, versioned in the MTP csproj; VSTest adapter in-tree |
116116
| Hosts | Revit-focused product | Revit + AutoCAD family on shared DevTools platform |
117117

118118
**Conflict / coexistence (what actually breaks):**
@@ -127,7 +127,7 @@ Runner ships under the ApplicationPlugins bundle `Contents` folder (publish
127127
- Both can load different `nunit.framework` identities in the same Revit (Dynamo,
128128
DevTools host, ricaun Application). DevTools avoids `NUnit.Engine`
129129
`FrameworkController` for that reason.
130-
- A project that references both ricaun’s VSTest adapter and `DevTools.NUnit`
130+
- A project that references both ricaun’s VSTest adapter and `RevitDevTool.NUnit`
131131
can split ownership; keep host-test projects on one framework.
132132

133133
Do not depend on `ricaun.NUnit` / `ricaun.RevitTest` packages for DevTools NUnit.
@@ -165,13 +165,13 @@ options; one intended adapter package aligned with the rest of RevitDevTool.
165165

166166
| Package | Publish status |
167167
|---------|----------------|
168-
| `DevTools.NUnit` (`DevTools.NUnit.Mtp`) | Independent of installer tags. Version = csproj `<Version>`. Workflow: `PublishNUnit.yml` |
168+
| `RevitDevTool.NUnit` (`DevTools.NUnit.Mtp`) | Independent of installer tags. Version = csproj `<Version>`. Workflow: `PublishNUnit.yml` |
169169
| `DevTools.NUnit.TestAdapter` | **Not published** — in-tree VSTest samples only |
170170
| Core / Host / Runner | Not consumer NuGet APIs |
171171

172172
Bump `<Version>` in `source/DevTools.NUnit.Mtp/DevTools.NUnit.Mtp.csproj`, commit,
173173
then run **Actions → Publish NUnit**. The workflow reads that property, packs
174-
`DevTools.NUnit.{version}.nupkg`, and pushes nuget.org via
174+
`RevitDevTool.NUnit.{version}.nupkg`, and pushes nuget.org via
175175
[Trusted Publishing](https://learn.microsoft.com/en-us/nuget/nuget-org/trusted-publishing)
176176
(OIDC; no long-lived API key). Uncheck **Push to nuget.org** to pack-only.
177177
Do not use installer tags or `scripts/pack.ps1` for this package. Local pack:
@@ -188,7 +188,7 @@ One-time nuget.org setup before the first push:
188188
Optional later: store that name as repo secret `NUGET_USER`.
189189
This repo is public; the policy should show **Active** after Create.
190190

191-
Consumers add NUnit, `DevTools.NUnit`, and `Microsoft.Testing.Platform.MSBuild`;
191+
Consumers add NUnit, `RevitDevTool.NUnit`, and `Microsoft.Testing.Platform.MSBuild`;
192192
install [RevitDevTool](https://github.com/trgiangv/RevitDevTool); set the host-run
193193
properties (`HostName`, `HostVersion`, `HostLaunch`, timeouts); and keep a
194194
test-directory `global.json` with `"test": { "runner": "Microsoft.Testing.Platform" }`

samples/DevTools.NUnit.Civil3D.SampleTests/DevTools.NUnit.Civil3D.SampleTests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<HostLaunchTimeout>360</HostLaunchTimeout>
1111
</PropertyGroup>
1212

13-
<Import Project="..\..\source\DevTools.NUnit.Mtp\build\DevTools.NUnit.targets"/>
13+
<Import Project="..\..\source\DevTools.NUnit.Mtp\build\RevitDevTool.NUnit.targets"/>
1414

1515
<ItemGroup>
1616
<PackageReference Include="Microsoft.Testing.Platform.MSBuild"/>

samples/DevTools.NUnit.SampleTests/DevTools.NUnit.SampleTests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<HostLaunchTimeout>360</HostLaunchTimeout>
1111
</PropertyGroup>
1212

13-
<Import Project="..\..\source\DevTools.NUnit.Mtp\build\DevTools.NUnit.targets"/>
13+
<Import Project="..\..\source\DevTools.NUnit.Mtp\build\RevitDevTool.NUnit.targets"/>
1414

1515
<ItemGroup>
1616
<PackageReference Include="Nice3point.Revit.Toolkit" VersionOverride="$(RevitVersion).*"/>

scripts/pack-nunit.ps1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<#
22
.SYNOPSIS
3-
Pack the DevTools.NUnit NuGet package from DevTools.NUnit.Mtp.
3+
Pack the RevitDevTool.NUnit NuGet package from DevTools.NUnit.Mtp.
44
.DESCRIPTION
55
Uses <Version> in source/DevTools.NUnit.Mtp/DevTools.NUnit.Mtp.csproj.
66
Does not push. Does not run the RevitDevTool installer pack pipeline.
@@ -25,14 +25,14 @@ if ([string]::IsNullOrWhiteSpace($version)) {
2525
throw "Could not read Version from $csproj"
2626
}
2727

28-
Write-Host "Packing DevTools.NUnit $version"
28+
Write-Host "Packing RevitDevTool.NUnit $version"
2929
dotnet pack $csproj -c Release -o $outDir
3030
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
3131

32-
$nupkg = Get-ChildItem -LiteralPath $outDir -Filter "DevTools.NUnit.$version.nupkg" |
32+
$nupkg = Get-ChildItem -LiteralPath $outDir -Filter "RevitDevTool.NUnit.$version.nupkg" |
3333
Select-Object -First 1
3434
if (-not $nupkg) {
35-
throw "Expected $outDir/DevTools.NUnit.$version.nupkg"
35+
throw "Expected $outDir/RevitDevTool.NUnit.$version.nupkg"
3636
}
3737

3838
Write-Host "Packed $($nupkg.FullName)"

source/DevTools.NUnit.Mtp/DevTools.NUnit.Mtp.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<AppendTargetFrameworkToOutputPath>true</AppendTargetFrameworkToOutputPath>
77
<RootNamespace>DevTools.NUnit.Mtp</RootNamespace>
88
<AssemblyName>DevTools.NUnit.Mtp</AssemblyName>
9-
<PackageId>DevTools.NUnit</PackageId>
9+
<PackageId>RevitDevTool.NUnit</PackageId>
1010
<!-- Bump this before running .github/workflows/PublishNUnit.yml.
1111
Independent of the RevitDevTool installer GitVersion. -->
1212
<Version>0.0.1</Version>
@@ -22,8 +22,8 @@
2222
</PropertyGroup>
2323

2424
<ItemGroup>
25-
<None Include="build\DevTools.NUnit.props" Pack="true" PackagePath="build\"/>
26-
<None Include="build\DevTools.NUnit.targets" Pack="true" PackagePath="build\"/>
25+
<None Include="build\RevitDevTool.NUnit.props" Pack="true" PackagePath="build\"/>
26+
<None Include="build\RevitDevTool.NUnit.targets" Pack="true" PackagePath="build\"/>
2727
<None Include="README.md" Pack="true" PackagePath="\"/>
2828
</ItemGroup>
2929

source/DevTools.NUnit.Mtp/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# DevTools.NUnit
1+
# RevitDevTool.NUnit
22

33
Runs NUnit tests inside a live Revit or AutoCAD-family host. Requires
44
[RevitDevTool](https://github.com/trgiangv/RevitDevTool) (the host-test
@@ -15,7 +15,7 @@ controller ships in that installer). Do not also reference
1515
<HostLaunchTimeout>360</HostLaunchTimeout>
1616
</PropertyGroup>
1717
<ItemGroup>
18-
<PackageReference Include="DevTools.NUnit" />
18+
<PackageReference Include="RevitDevTool.NUnit" />
1919
<PackageReference Include="Microsoft.Testing.Platform.MSBuild" />
2020
<PackageReference Include="NUnit" />
2121
</ItemGroup>

source/DevTools.NUnit.Mtp/build/DevTools.NUnit.props renamed to source/DevTools.NUnit.Mtp/build/RevitDevTool.NUnit.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
<ItemGroup>
2020
<TestingPlatformBuilderHook Include="51ad4b4c-87f1-4554-9aa4-e7a54bd732f5">
21-
<DisplayName>DevTools.NUnit</DisplayName>
21+
<DisplayName>RevitDevTool.NUnit</DisplayName>
2222
<TypeFullName>DevTools.NUnit.Mtp.TestingPlatformBuilderHook</TypeFullName>
2323
</TestingPlatformBuilderHook>
2424
</ItemGroup>

source/DevTools.NUnit.Mtp/build/DevTools.NUnit.targets renamed to source/DevTools.NUnit.Mtp/build/RevitDevTool.NUnit.targets

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
11
<Project>
2-
<Import Project="$(MSBuildThisFileDirectory)DevTools.NUnit.props"
2+
<Import Project="$(MSBuildThisFileDirectory)RevitDevTool.NUnit.props"
33
Condition="'$(DevToolsNUnitPropsImported)' != 'true'"/>
44

55
<Target Name="DevToolsNUnitRejectConflictingTestFrameworks"
66
BeforeTargets="PrepareForBuild;Build"
77
Condition="'$(IsTestProject)' == 'true' or '$(IsTestingPlatformApplication)' == 'true'">
88
<Error
99
Condition="@(PackageReference->AnyHaveMetadataValue('Identity', 'NUnit3TestAdapter'))"
10-
Text="DevTools.NUnit cannot share a test project with NUnit3TestAdapter. Remove the VSTest adapter reference." />
10+
Text="RevitDevTool.NUnit cannot share a test project with NUnit3TestAdapter. Remove the VSTest adapter reference." />
1111
<Error
1212
Condition="@(PackageReference->AnyHaveMetadataValue('Identity', 'ricaun.RevitTest.TestAdapter'))"
13-
Text="DevTools.NUnit cannot share a test project with ricaun.RevitTest.TestAdapter. Keep host-test projects on one framework." />
13+
Text="RevitDevTool.NUnit cannot share a test project with ricaun.RevitTest.TestAdapter. Keep host-test projects on one framework." />
1414
<Error
1515
Condition="@(PackageReference->AnyHaveMetadataValue('Identity', 'NUnit.Microsoft.Testing.Platform'))"
16-
Text="DevTools.NUnit cannot share a test project with NUnit.Microsoft.Testing.Platform. DevTools owns host execution." />
16+
Text="RevitDevTool.NUnit cannot share a test project with NUnit.Microsoft.Testing.Platform. DevTools owns host execution." />
1717
<Error
1818
Condition="@(PackageReference->AnyHaveMetadataValue('Identity', 'Microsoft.Testing.Extensions.VSTestBridge'))"
19-
Text="DevTools.NUnit cannot share a test project with Microsoft.Testing.Extensions.VSTestBridge." />
19+
Text="RevitDevTool.NUnit cannot share a test project with Microsoft.Testing.Extensions.VSTestBridge." />
2020
</Target>
2121

2222
<Target Name="GenerateDevToolsNUnitHostOptions"
2323
BeforeTargets="PrepareForBuild;Build"
2424
Condition="'$(IsTestingPlatformApplication)' == 'true'">
2525
<Error
2626
Condition="'$(HostName)' == ''"
27-
Text="DevTools.NUnit test projects must declare &lt;HostName&gt; (for example Revit) in the .csproj." />
27+
Text="RevitDevTool.NUnit test projects must declare &lt;HostName&gt; (for example Revit) in the .csproj." />
2828
<Error
2929
Condition="'$(HostVersion)' == ''"
30-
Text="DevTools.NUnit test projects must declare &lt;HostVersion&gt; in the .csproj (for example &lt;HostVersion&gt;2024&lt;/HostVersion&gt; or &lt;HostVersion&gt;$(RevitVersion)&lt;/HostVersion&gt;)." />
30+
Text="RevitDevTool.NUnit test projects must declare &lt;HostVersion&gt; in the .csproj (for example &lt;HostVersion&gt;2024&lt;/HostVersion&gt; or &lt;HostVersion&gt;$(RevitVersion)&lt;/HostVersion&gt;)." />
3131

3232
<PropertyGroup>
3333
<_DevToolsNUnitRunnerPath Condition="'$(DevToolsNUnitRunnerPath)' != ''">$(DevToolsNUnitRunnerPath)</_DevToolsNUnitRunnerPath>

0 commit comments

Comments
 (0)