Debugging with AddInManager in 2019

Debugging with AddInManager in 2019

MGO-Norsyn
Advocate Advocate
2,530 Views
7 Replies
Message 1 of 8

Debugging with AddInManager in 2019

MGO-Norsyn
Advocate
Advocate

Hi all

I am experiencing a problem debugging add-ins in 2019.

It seems that revit 2019 copies add-in dlls to a temporary location, for example: C:\Users\user\AppData\Local\Temp\RevitAddins\MyRibbonPanel-Executing-20180422_234613_5616

When I recompile after a change in source, the code in Temp folder does not change and it seems that the AddInManager executes old code (my breakpoints are never reached) until I restart Revit.

Is this intentional or am I missing something?

0 Likes
Accepted solutions (1)
2,531 Views
7 Replies
Replies (7)
Message 2 of 8

jeremytammik
Autodesk
Autodesk

Dear Mgo,

 

Thank you for your report.

 

This issue was already reported and discussed in another thread here in the forum:

 

https://forums.autodesk.com/t5/revit-api-forum/addin-manager-multiple-support-dll-s/m-p/6660050

 

The development team created a ticket for that issue, REVIT-129984 [Addin Manager: auto unload DLLs before reloading them -- 13857937].

 

Please make a note of this number.

 

I added your input to that.

 

If you have a business case for your request to raise its importance, that will help:

 

You are welcome to request an update on the status of this issue or to provide additional information on it at any time quoting this change request number.

 

This issue is important to me. What can I do to help?

 

This issue needs to be assessed by our engineering team and prioritised against all other outstanding change requests. Any information that you can provide to influence this assessment will help. Please provide the following where possible:

 

  • Impact on your application and/or your development.
  • The number of users affected.
  • The potential revenue impact to you.
  • The potential revenue impact to Autodesk.
  • Realistic timescale over which a fix would help you.
  • In the case of a request for a new feature or a feature enhancement, please also provide detailed Use cases for the workflows that this change would address.

 

This information is extremely important. Our engineering team have limited resources, and so must focus their efforts on the highest impact items. We do understand that this will cause you delays and affect your development planning, and we appreciate your cooperation and patience.

 

Best regards,

 

Jeremy



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

Message 3 of 8

MGO-Norsyn
Advocate
Advocate

Hi, thanks for the reply.

Unfortunately, I don't have the time to post a detailed bug report. But the problem is probably related to the one described in the linked discussion. I also have an assembly, which hosts my buttons, which then calls other assemblies to execute commands. Those secondary assemblies does not get loaded.

Right now it is completely impossible for me to debug efficiently, I might check out the workaround posted in the linked discussion when I get the time.

0 Likes
Message 4 of 8

jeremytammik
Autodesk
Autodesk

Dear Michail,

 

Thank you for your update and sorry to hear that you have so little time.

 

Please take a look at the other suggestions provided by The Building Coder for addressing Edit and Continue, Debug without Restart and Live Development:

 

http://thebuildingcoder.typepad.com/blog/about-the-author.html#5.49

 

I hope some of them are useful for you as well.

 

Best regards,

 

Jeremy

 



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

0 Likes
Message 5 of 8

MGO-Norsyn
Advocate
Advocate
Accepted solution

Hi, thank you for your concern.

I actually resolved the immediate issue.

I was reading the other thread about the AIM and people were talking about the Assembly version in AssemblyInfo.cs.

I actually was missing AssemblyInfo.cs in both my main ribbon loader and the project which refused to update via AIM.

So I added AssemblyInfo.cs to both projects and set: [assembly: AssemblyVersion("2019.1.1.*")].

This actually fixed the problem immideately. I haven't tested anything further though.

0 Likes
Message 6 of 8

jeremytammik
Autodesk
Autodesk

Dear Michail,

 

Thank you for your update and congratulations on implementing the effective workaround.

 

Please note another thread discussing this same topic, a development issue raised with the Revit development team and the same workaround that you describe recommended by them as well in the follow-up thread:

 

https://forums.autodesk.com/t5/revit-api-forum/revit-2019-addin-manager-cannot-load-external-dll/m-p...

 

Best regards,

 

Jeremy

 



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

0 Likes
Message 7 of 8

Anonymous
Not applicable

Cache is very cruel to us.

I think best solution that Addin Manager must be clean all temp files when closing Revit.

Orelse, I have to manually clean up temp files or calls bat cmd to do when closing my external application.

@MGO-Norsyn @jeremytammik 

0 Likes
Message 8 of 8

Anonymous
Not applicable
Of course, Debuging your command by using xxx.addin is very easy idea.
0 Likes