Skip to content

Open-source Revit MCP server: let Claude and other AI assistants read and edit BIM models, with human approval on every change.

Fix hosted add-in builds with dotnet SDK

A. Sam Mohammad1aae8a2f1840
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 24e71bb..f98922d 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -20,7 +20,7 @@ jobs:
steps:
- name: Checkout repository
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
+ uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
@@ -58,7 +58,7 @@ jobs:
steps:
- name: Checkout repository
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
+ uses: actions/checkout@v5
- name: Set up .NET
uses: actions/setup-dotnet@v5
diff --git a/.github/workflows/download-metrics.yml b/.github/workflows/download-metrics.yml
index d62a75a..9542029 100644
--- a/.github/workflows/download-metrics.yml
+++ b/.github/workflows/download-metrics.yml
@@ -18,7 +18,7 @@ jobs:
steps:
- name: Checkout repository
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
+ uses: actions/checkout@v5
- name: Update release download metrics
shell: pwsh
diff --git a/.github/workflows/publish-mcp.yml b/.github/workflows/publish-mcp.yml
index 5affaee..d73e157 100644
--- a/.github/workflows/publish-mcp.yml
+++ b/.github/workflows/publish-mcp.yml
@@ -15,7 +15,7 @@ jobs:
steps:
- name: Checkout code
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
+ uses: actions/checkout@v5
- name: Synchronize release artifact metadata
if: github.event_name == 'release'
diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml
index 7ea527a..ff6c0ec 100644
--- a/.github/workflows/publish-pypi.yml
+++ b/.github/workflows/publish-pypi.yml
@@ -12,7 +12,7 @@ jobs:
steps:
- name: Checkout code
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
+ uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
diff --git a/scripts/build-addin.ps1 b/scripts/build-addin.ps1
index fcf07ed..c4da601 100644
--- a/scripts/build-addin.ps1
+++ b/scripts/build-addin.ps1
@@ -25,38 +25,18 @@ if (-not (Test-Path $projectPath)) {
exit 1
}
-# Find msbuild using vswhere
-$vsWherePath = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"
-
-if (Test-Path $vsWherePath) {
- $msbuild = & $vsWherePath -latest -requires Microsoft.Component.MSBuild -find MSBuild\**\Bin\MSBuild.exe | Select-Object -First 1
-}
-else {
- # Fallback to dotnet build if vswhere not available
- Write-Host "vswhere not found, using dotnet build..." -ForegroundColor Yellow
- $msbuild = "dotnet"
- $buildCommand = "build"
-}
-
-if (-not $msbuild) {
- Write-Error "MSBuild or dotnet not found. Install Visual Studio Build Tools or .NET SDK."
+$dotnet = Get-Command dotnet -ErrorAction SilentlyContinue
+if (-not $dotnet) {
+ Write-Error "dotnet not found. Install the .NET SDK versions documented for the selected Revit release."
exit 1
}
Write-Host "Building AEC Model Bridge for Revit $RevitVersion ($Configuration)..." -ForegroundColor Cyan
-if ($msbuild -like "*dotnet*") {
- & $msbuild build $projectPath `
- -c $Configuration `
- -p:RevitVersion=$RevitVersion `
- -v:minimal
-}
-else {
- & $msbuild $projectPath `
- /p:Configuration=$Configuration `
- /p:RevitVersion=$RevitVersion `
- /v:minimal
-}
+& $dotnet.Source build $projectPath `
+ -c $Configuration `
+ -p:RevitVersion=$RevitVersion `
+ -v:minimal
if ($LASTEXITCODE -ne 0) {
Write-Error "Build failed with exit code $LASTEXITCODE"