Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Multi-version Revit Template

7 REPLIES 7
SOLVED
Reply
Message 1 of 8
EATREVITPOOPCAD
959 Views, 7 Replies

Multi-version Revit Template

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?

 

EATREVITPOOPCAD_0-1632461278538.png

 

 

The definition of insanity is doing the same thing over and over again and expecting different results
7 REPLIES 7
Message 2 of 8

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!

  

Jeremy Tammik, Developer Advocacy and Support, The Building Coder, Autodesk Developer Network, ADN Open
Message 3 of 8

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. 

The definition of insanity is doing the same thing over and over again and expecting different results
Message 4 of 8

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

 

The definition of insanity is doing the same thing over and over again and expecting different results
Message 5 of 8

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

  

Jeremy Tammik, Developer Advocacy and Support, The Building Coder, Autodesk Developer Network, ADN Open
Message 6 of 8

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.

Message 7 of 8

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

  

Jeremy Tammik, Developer Advocacy and Support, The Building Coder, Autodesk Developer Network, ADN Open
Message 8 of 8

Very interesting approach, thank you for sharing!

The definition of insanity is doing the same thing over and over again and expecting different results

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Rail Community