https://github.com/alvpickmans/multiversion-revit-plugin-sample
After failing to tweak MSBUID settings properly in .csproj file for almost a month... I came awesome template to create multi version plugins... I think this is my best bet and it has everything I need.
I had no luck compiling this sample file and have the following errors
warning MSB3246: Resolved file has a bad image, no metadata, or is otherwise inaccessible. Could not load file or assembly 'RevitAPILink.dll' or one of its dependencies. The module was expected to contain an assembly manifest.
warning MSB3246: Resolved file has a bad image, no metadata, or is otherwise inaccessible. Could not load file or assembly 'RevitAPIUILink.dll' or one of its dependencies. The module was expected to contain an assembly manifest.
warning MSB3246: Resolved file has a bad image, no metadata, or is otherwise inaccessible. Could not load file or assembly 'RevitDB.dll' or one of its dependencies. The module was expected to contain an assembly manifest.
warning MSB3246: Resolved file has a bad image, no metadata, or is otherwise inaccessible. Could not load file or assembly 'RevitUI.dll' or one of its dependencies. The module was expected to contain an assembly manifest.
I have the SDK installed and under it all of the DLLs show up (Even ones with warnings above) See image below. Any ideas?
Solved! Go to Solution.
Solved by pablo.derendinger. Go to Solution.
Solved by jeremy_tammik. Go to Solution.
I checked the repository you point out and see that you have not raised an issue for your problem there yet.
I would suggest that would be the first place to go.
Here are some other alternatives to my simple add-in wizard:
https://github.com/jeremytammik/VisualStudioRevitAddinWizard#alternatives
If you have any luck with the one you picked, please let us know and I can add it to the list.
Thank you!
Thanks for the link! I'll post this on alvpickman GitHub and while I wait for a response I will try another method from your link.
Got this to work!
Also came across this article from the author of this template too:
https://www.matterlab.co/post/multiversion-revit-plugins-explained
Thank you very much for pointing out this extremely helpful article!
I added it for future reference to the VisualStudioRevitAddinWizard list of alternatives:
https://github.com/jeremytammik/VisualStudioRevitAddinWizard#alternatives
Hi! I would like to share our experience with multi version projects.
After a lot of work with scripting and pre/post build steps we found a solution that works like a charm.
We use a shared project with all the code and a "build" project per each revit version.
Each build version will have their specific Revit dlls from nuget.
To support new version we just copy csproj, change it's name and nuget references.
To support changes in the API, we use compile rules to ignore deprecated features.
At the end of the day we have a single snl with a csproj per Revit version. Works perfectly under a CI/CD workflow.
Hope you find it useful.
Thank you for your good and simple advice. I added it to the blog post:
https://thebuildingcoder.typepad.com/blog/2021/10/dll-as-resource-and-multi-version-add-ins.html#4.2
Very interesting approach, thank you for sharing!