Issue with RevitAddInUtility for Revit 2019 and customized installer

Issue with RevitAddInUtility for Revit 2019 and customized installer

m.vallee
Advocate Advocate
1,728 Views
10 Replies
Message 1 of 11

Issue with RevitAddInUtility for Revit 2019 and customized installer

m.vallee
Advocate
Advocate

Hi,

 

I am migrating my Revit plugin to version 2019.1 of the API, and I am struggling with the update of the deployment part in Visual Studio.

My setup project uses another project called "RegisterRevitAddin" to write/delete needed manifest files at the required locations for each installed Revit version, using the RevitAddInUtility DLL (please see this link). So as I've been doing for the last 3 or 4 years without any problem, I've changed the reference to RevitAddInUtility to use the new version, and made a few changes in my custom actions' code to support Revit 2019 manifest registration. Then I've successfully recompiled both projects and tried to execute the installer on my machine. I have the following error : "Error 1001. Unable to load file or assembly 'RevitAddInUtility, Version=19.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependancies. The specified file could not be found."

 

What's strange is that the DLL is correctly referenced in the "Detected dependancies" of the Setup project. 

The only difference I see between 2018 and 2019 versions of the DLL is the "processorArchitecture" tag when adding the reference in the C# project : for 2018 it is "MSIL", for 2019 it is "AMD64".

 

Do you know if any changes have been made in this DLL ?

Do you have an idea of what it could be ?

 

Thanks for your help.

 

Accepted solutions (1)
1,729 Views
10 Replies
Replies (10)
Message 2 of 11

zhong_wu
Autodesk Support
Autodesk Support

What is the version of your Visual Studio? 2015 or 2017? Maybe you can check the post https://thebuildingcoder.typepad.com/blog/2018/04/compiling-the-revit-2019-sdk-samples.html to see if helps. 

 

I also met the mismatch problem between "MSIL" and "AMD64" during compiling, but it works fine during runtime, so I don't think that's a problem. If the problem still exist, maybe you can simplify your project and share me the minimal reproducible sample code for investigation. 


John Wu
Developer Technical Services
Autodesk Developer Network


0 Likes
Message 3 of 11

m.vallee
Advocate
Advocate
I use Visual Studio Professional 2017. I know the processor architecture mismatch warnings can be ignored because I have some in my main C# project (the plugin itself). The issue is with my setup project, referencing the project output of RegisterRevitAddin - another C# project that enables me to write manifest files thanks to RevitAddinUtility DLL. For some reasons when executing the custom actions written in this C# project, the installer cannot find the DLL... It has been working fine for years with the other versions of the DLL, so I tried to find what differs, and the only thing I saw was the processor architecture associated with the reference in the .csproj file. I tried to compile the RegisterRevitAddin with "x64" instead of "AnyCPU", with no luck.
0 Likes
Message 4 of 11

m.vallee
Advocate
Advocate

So am I the only one to use the RevitAddInUtility DLL for generating on-the-fly the required manifest files ? 🙂

0 Likes
Message 5 of 11

m.vallee
Advocate
Advocate

Update : this really seems to come from the RevitAddInUtility DLL itself, as the same kind of problem occurs when I execute the RevitAddInUtility Sample from the Revit 2019.1 SDK.

 

 

 

0 Likes
Message 6 of 11

m.ferino
Explorer
Explorer

I agree with you so much Max! The same as you. I cannot make work a simple setup project qith my installer class calling the RevitAddInApplication class to do all the stuff for the manifests.

 

I have been using RevitAddInUtility for many years and since version 2019, it is no more MSIL. As an installer class is by default executed as x86, it's a trap, excepting going deeper in installUtil.exe

https://blogs.msdn.microsoft.com/heaths/2006/02/01/64-bit-managed-custom-actions-with-visual-studio/

Something so old. Go back to 2006?

 

Unbelievable to get here and make RevitInstallUtil unusable !!! This must be a compilation directive error in the release.  I hope Autodesk will correct that very soon.

Message 7 of 11

m.vallee
Advocate
Advocate

Hi,

 

Could someone from Autodesk take this problem into consideration? This is really annoying...

 

Thanks in advance.

Best regards

Maxime

0 Likes
Message 8 of 11

jeremytammik
Autodesk
Autodesk
Accepted solution

Dear Maxime,

 

Thank you for your query.

 

I am glad to hear that you find the RevitAddinUtility useful.

 

I am very sorry that we have been so slow in answering this, or rather, not answered it at all beyond the initial misunderstanding statements.

 

That is an error on our part. I will point it out to Zhong.

 

I noticed this now due to the new thread submitted by your colleague Martial Ferino:

 

https://forums.autodesk.com/t5/revit-api-forum/revitaddinutility-is-no-longer-built-as-msil-assembly...

 

In fact, this issue has also already been submitted and discussed previously by other developers, e.g., in a comment on The Building Coder blog:

 

http://thebuildingcoder.typepad.com/blog/2018/04/compiling-the-revit-2019-sdk-samples.html#comment-3...

 

As I said there, I logged the issue REVIT-132227 [RevitAddInUtility.dll should be 32 bit] with our development team for this on your behalf as it requires further exploration and possibly a modification to our software. Please make a note of this number for future reference.

 

This issue is scheduled to be fixed in the next major release of Revit, which should not be all that far away.

 

In fact, I should think that you can grab the future version of RevitAddinUtility from the beta forum pre-release right now, today.

 

I have also added your new notes to that issue to ensure the developers are aware of its importance.

 

I hope this helps.

 

Best regards,

 

Jeremy

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 9 of 11

m.vallee
Advocate
Advocate

Hi Jeremy,

 

I managed to download the "Dec2018" version of Revit 2020 beta, took the RevitAddinUtility dll from the install package and it turned out to be AnyCPU-built.

Problem solved.

 

Thanks!

Maxime

 

0 Likes
Message 10 of 11

Anonymous
Not applicable

Hi Jeremy,

 

I have met the same question from this dll. But I'm kind of new at ADN. I have tried to search the "Revit 2020 beta" to get the new RevitAddinUtility.dll in forum, but truly I can't find it. Could you tell me how to get the beta version or where could I find the new RevitAddinUtility.dll in forum?

 

Thanks very much!

 

Yousheng

0 Likes
Message 11 of 11

jeremytammik
Autodesk
Autodesk

Dear Yousheng,

 

Thank you for your query.

 

You should be able to register here for the Revit pre-release, in the Autodesk beta forum:

 

https://feedback.autodesk.com

 

I hope this helps.

 

Best regards,

 

Jeremy

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder