Skip to content

Conversation

@cunhamauro
Copy link

Summary of the Pull Request

What is this about:
Add support for deploying the Revit add-in into a versioned folder by appending the assembly version to the deployment directory name.

Description:
This change introduces the AppendVersion and VersionDelimiter properties to the MSBuild targets. When enabled (and when AssemblyVersion is available), local deployment publishes the add-in into a versioned subfolder (e.g. MyAddin_1.2.3) and automatically updates the .addin manifest so the Assembly path points to the versioned folder. When AppendVersion is disabled or no version is available, the existing non-versioned behavior is preserved.
Additionally, some MSBuild property conditional 'boolean' comparisons were updated to consistently use quoted string comparisons ('e.g.' =='true') where they were previously missing, for safety.

Quality Checklist

  • [✅] My code follows the style guidelines of this project
  • [✅] I have performed a self-review of my own code
  • [✅] My changes generate no new warnings

Update all Condition expressions to use '$(Property)' string comparisons for true/false and empty checks, instead of relying on unquoted property expansions.
Added `AppDataDeployDir` to specify the deployment directory for Revit add-ins. Updated the copying and cleaning processes to use the new path instead of the previous hardcoded location, ensuring proper management of add-in files during the build process.
Introduce the AppendVersion property (with an optional VersionDelimiter) to deploy the add-in into a versioned folder instead of using the bare assembly name. When this is enabled, the manifest’s Assembly path and the clean step are updated to target the versioned folder.
Update Readme.md to include a new section on enabling versioned folder deployment for Revit add-ins. Document the default local deployment behavior, how to use the AppendVersion property as well as the optional VersionDelimiter, and provide an example XML configuration.
…er + fixed AddinManifestFileName for consistent .addin file targeting across all tasks)
@Nice3point
Copy link
Owner

This project will be migrated to Msbuild SDK, and this repo will be removed. I'm going to change the structure a bit and update User modifiable properties.

Btw i dont like implementation with powershell. powershell is a Windows specific tool, i always prefer crossplatform solutions

@Nice3point
Copy link
Owner

you can describe what you need, i'll try to add support for something. as i can see some PRs are overcoding and can be solved without the extra code

@cunhamauro
Copy link
Author

Hello @Nice3point👋
First of all, thank you very much for your reply and also for the amazing tools you develop.

It would be great if Revit.Build.Tasks had an option to append the version to the add-in folder name (and update the path in the manifest accordingly), similar to what I did in this PR.

Some less critical, but still useful, features would be:

  • Allowing the choice of deploying to either AppData or ProgramData;
  • Having a more flexible way to locate the .addin manifest.

Thank you very much once again!

@Nice3point
Copy link
Owner

Having a more flexible way to locate the .addin manifest.

In the current version:
https://github.com/Nice3point/Revit.Build.Tasks/blob/main/source/Nice3point.Revit.Build.Tasks/targets/Nice3point.Revit.Publish.targets#L22
in your .csproj just add a new additional Item <RootItem Include="$(ProjectDir)/Youpath/Manifestname..addin"/>. This library adds a default path and you can add any items you want.

Allowing the choice of deploying to either AppData or ProgramData;

this is not available in the current version, but will be available in the new SDK https://github.com/Nice3point/RevitTemplates/blob/develop/source/Nice3point.Revit.Sdk/Sdk/Nice3point.Revit.Publish.targets#L16

Release end of the December i guess.

.csproj file significantly cleaner now
https://github.com/Nice3point/RevitTemplates/blob/develop/source/Nice3point.Revit.Templates/Nice3point.Revit.AddIn.Module/Nice3point.Revit.AddIn.csproj

@cunhamauro cunhamauro marked this pull request as draft December 18, 2025 11:09
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.

2 participants