Skip to content

Fix all-users addin manifest path for Revit 2027+#3276

Closed
tay0thman wants to merge 0 commit intopyrevitlabs:developfrom
tay0thman:fix/revit-2027-allusers-addin-path
Closed

Fix all-users addin manifest path for Revit 2027+#3276
tay0thman wants to merge 0 commit intopyrevitlabs:developfrom
tay0thman:fix/revit-2027-allusers-addin-path

Conversation

@tay0thman
Copy link
Copy Markdown
Contributor

@tay0thman tay0thman commented Apr 7, 2026

Fix all-users addin manifest path for Revit 2027+

Problem

Revit 2027 changed how all-users add-in manifests are discovered. The previous three paths behave as follows:

fixed #3275

Path Revit 2027 Behavior
%ProgramData%\Autodesk\Revit\Addins\2027 Ignored — journal says "won't be loaded"
C:\Program Files\Autodesk\Revit 2027\AddIns\ Rejected — reserved for signed internal add-ins only
C:\Program Files\Autodesk\Revit\Addins\2027 Works — new shared third-party location

The current GetRevitAddonsFolder() builds the second path (install-dir based) for 2027+ --allusers attachments, which Revit rejects with "not signed as internal addin".

Revit 2027 journal explicitly states:

Add-in manifest file from: C:\ProgramData\Autodesk\Revit\Addins\2027\pyRevit.addin, won't be loaded. All-users Add-in manifest files must be installed to: C:\Program Files\Autodesk\Revit\Addins\2027

Fix

Simplified GetRevitAddonsFolder() in RevitAddons.cs to use the correct shared path for Revit 2027+:

C:\Program Files\Autodesk\Revit\Addins\<year>

Removed the RevitProduct.ListInstalledProducts() registry lookup which was building the wrong base path.

Changed files

  • dev/pyRevitLabs/pyRevitLabs.TargetApps.Revit/RevitAddons.cs — core path fix
  • Updated binary files (bin/, bin/netcore/, bin/netfx/)

Testing

  • pyrevit attach <clone> default --installed --allusers places manifest at C:\Program Files\Autodesk\Revit\Addins\2027\
  • Revit 2027 loads pyRevit tab successfully from the new path (no signing errors)
  • Revit 2026 and earlier still use %ProgramData% path (unchanged)
  • Per-user path (%APPDATA%) unchanged for all versions
  • pyrevit env shows correct attachment info for all Revit versions (2023–2027)

@devloai
Copy link
Copy Markdown
Contributor

devloai bot commented Apr 7, 2026

Unable to trigger custom agent "Code Reviewer". You have run out of credits 😔
Please upgrade your plan or buy additional credits from the subscription page.

@tay0thman tay0thman requested a review from jmcouffin April 7, 2026 21:25
@tay0thman
Copy link
Copy Markdown
Contributor Author

@jmcouffin minor fix, but a copilot review still welcomed.

@jmcouffin jmcouffin self-assigned this Apr 7, 2026
@jmcouffin jmcouffin requested a review from Copilot April 7, 2026 21:29
@jmcouffin
Copy link
Copy Markdown
Contributor

Please wait before merging. I need to validate actual wip do not work with Revit 2027.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates pyRevit’s Revit add-in manifest placement logic to match Revit 2027+’s new all-users discovery rules, ensuring --allusers attachments are written to the shared third-party location that Revit 2027 actually loads.

Changes:

  • Simplified RevitAddons.GetRevitAddonsFolder() to route Revit 2027+ all-users manifests to C:\Program Files\Autodesk\Revit\Addins\<year>.
  • Removed the install-dir/registry-based path construction for Revit 2027+ all-users attachments (now uses the fixed shared location).
  • Updated shipped binaries (bin/netfx, bin/netcore) to reflect the code change.

Reviewed changes

Copilot reviewed 1 out of 5 changed files in this pull request and generated 2 comments.

File Description
dev/pyRevitLabs/pyRevitLabs.TargetApps.Revit/RevitAddons.cs Adjusts all-users add-in manifest folder logic for Revit 2027+ to the new shared location.
bin/netfx/pyRevitLabs.TargetApps.Revit.dll Rebuilt binary containing the updated add-ins path logic (net48).
bin/netcore/pyRevitLabs.TargetApps.Revit.dll Rebuilt binary containing the updated add-ins path logic (net8.0-windows).

@tay0thman
Copy link
Copy Markdown
Contributor Author

Please wait before merging. I need to validate actual wip do not work with Revit 2027.

I won't merge anything.

jmcouffin
jmcouffin previously approved these changes Apr 7, 2026
@jmcouffin
Copy link
Copy Markdown
Contributor

@tay0thman did some tests + reviewed, logic seems fine.
Please address the copilot comments if you can, then OK to merge.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 5 changed files in this pull request and generated 1 comment.

@tay0thman tay0thman force-pushed the fix/revit-2027-allusers-addin-path branch from e134730 to eed6aac Compare April 7, 2026 22:37
@tay0thman
Copy link
Copy Markdown
Contributor Author

@jmcouffin I pushed a new commit

@tay0thman tay0thman force-pushed the fix/revit-2027-allusers-addin-path branch from 338e5a8 to 90c6199 Compare April 7, 2026 23:59
@tay0thman
Copy link
Copy Markdown
Contributor Author

@jmcouffin these DLL conflicts are sticky, can you compile them when merging?

@tay0thman tay0thman closed this Apr 8, 2026
@tay0thman tay0thman force-pushed the fix/revit-2027-allusers-addin-path branch from 003af2a to 48d2de8 Compare April 8, 2026 01:02
@tay0thman tay0thman deleted the fix/revit-2027-allusers-addin-path branch April 8, 2026 01:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Revit 2027 Addins Path

3 participants