Fix all-users addin manifest path for Revit 2027+#3277
Open
tay0thman wants to merge 3 commits intopyrevitlabs:developfrom
Open
Fix all-users addin manifest path for Revit 2027+#3277tay0thman wants to merge 3 commits intopyrevitlabs:developfrom
tay0thman wants to merge 3 commits intopyrevitlabs:developfrom
Conversation
Contributor
Author
|
@jmcouffin I had to recreate this PR because my earlier commits, combined with Copilot edits, were a total mess. Copilot review is welcome. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates pyRevit’s all-users add-in manifest folder resolution to match Revit 2027+’s new discovery rules, ensuring pyrevit attach --allusers writes manifests to the location Revit will actually load.
Changes:
- Updated
RevitAddons.GetRevitAddonsFolder()to use%ProgramFiles%\Autodesk\Revit\Addins\<year>for all-users manifests on Revit 2027+ (and keep%ProgramData%for ≤2026). - Updated unit tests to validate the new post-2027 all-users path behavior and the 2026/2027 boundary.
- Refreshed distributed binaries under
bin/for net48/net8 outputs.
Reviewed changes
Copilot reviewed 2 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| dev/pyRevitLabs/pyRevitLabs.TargetApps.Revit/RevitAddons.cs | Switches 2027+ all-users add-in manifest base folder to the new shared Program Files location; preserves legacy behavior for ≤2026 and per-user installs. |
| dev/pyRevitLabs/pyRevitLabs.UnitTests/pyRevitLabs.UnitTests.RevitAddons.cs | Updates tests to assert the new Program Files-based structure for 2027+ and verify the 2026/2027 boundary. |
| bin/pyRevitLabs.TargetApps.Revit.dll | Updated compiled binary reflecting the path changes. |
| bin/netfx/pyRevitLabs.TargetApps.Revit.dll | Updated net48 binary reflecting the path changes. |
| bin/netcore/pyRevitLabs.TargetApps.Revit.dll | Updated net8.0-windows binary reflecting the path changes. |
dev/pyRevitLabs/pyRevitLabs.UnitTests/pyRevitLabs.UnitTests.RevitAddons.cs
Show resolved
Hide resolved
dev/pyRevitLabs/pyRevitLabs.UnitTests/pyRevitLabs.UnitTests.RevitAddons.cs
Show resolved
Hide resolved
…vitAddons.cs Co-authored-by: Copilot <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
fixes #3275
%ProgramData%\Autodesk\Revit\Addins\2027C:\Program Files\Autodesk\Revit 2027\AddIns\C:\Program Files\Autodesk\Revit\Addins\2027The current
GetRevitAddonsFolder()builds the second path (install-dir based) for 2027+--allusersattachments, which Revit rejects with "not signed as internal addin".Revit 2027 journal explicitly states:
Fix
Simplified
GetRevitAddonsFolder()inRevitAddons.csto use the correct shared path for Revit 2027+:Removed the
RevitProduct.ListInstalledProducts()registry lookup which was building the wrong base path.Changed files
dev/pyRevitLabs/pyRevitLabs.TargetApps.Revit/RevitAddons.cs— core path fixbin/,bin/netcore/,bin/netfx/)Testing
pyrevit attach <clone> default --installed --allusersplaces manifest atC:\Program Files\Autodesk\Revit\Addins\2027\%ProgramData%path (unchanged)%APPDATA%) unchanged for all versionspyrevit envshows correct attachment info for all Revit versions (2023–2027)