Addin manager debugging problem

Addin manager debugging problem

Anonymous
Not applicable
1,731 Views
5 Replies
Message 1 of 6

Addin manager debugging problem

Anonymous
Not applicable

Good day,

I am building my addin with .NET Core. In Revit I am using adding manager to load my .dll files. When I start Revit and attach to it for debugging, it works like a charm but after several build updates I cannot reach my debug point because the .dll file in addin manager does not update. The only way to debug again is to restart revit and load .dll file to addin manager again. Any ideas why does that happen? Any advice is appreciated 🙂

0 Likes
Accepted solutions (2)
1,732 Views
5 Replies
Replies (5)
Message 2 of 6

jeremytammik
Autodesk
Autodesk
Accepted solution

Please read the existing discussion and let us know whether that helps you solve the issue:

 

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

 



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

Message 3 of 6

Kennan.Chen
Advocate
Advocate

First, I really doubt that you can successfully compile the project. According to my knowledge, a .NET Core project cannot reference RevitAPI.dll which is compiled against .NET Framework. I guess your project is targeting .NET Standard which will make sense.

 

To continue debugging, you can try to rebuild the project or make a small bit of change to your code and build again.

Message 4 of 6

Anonymous
Not applicable

You definetely can and I think You should use that for multi-targeting purposes (write 1 code, have 4-5 versions).

The template can be found here, try it out:

https://github.com/Equipple/vs-templates-revit-addin/releases

After trying some solutions, suggested by Mr.Tammik my problem eased a bit but was not solved completely. I clear the cache files from time to time

0 Likes
Message 5 of 6

jlpgy
Advocate
Advocate
Accepted solution

Hi:

As far as I have experienced:

If you are using Add-in Manager, you can modify only one .dll file at one time.

For example, you have some implementations in AAA.dll (let's say: ImplementAAA() method), and you have a TestAAA() method in AAA.dll as an testing entry of ImplementAAA(), it's OK to modify all these above mentioned codes in the AAA.dll.

If you have some method TestAAA_Outside() in BBB.dll, from the 2nd time you call it from add-in manager, it won't hit break points.

 

Those were all my experience. I'm not sure of 100% correctness, neither do I know why it behaves like this.

In our product, we have some code files in every .csproj project. If testing ImplementAAA() in AAA.dll, modify only AAA project. If testing ImplementBBB() in BBB.dll, create a TestBBB() method inside BBB project.

 

I have not yet found out any better ways of debugging with Add-In Manager.

 

单身狗;代码狗;健身狗;jolinpiggy@hotmail.com
Message 6 of 6

Anonymous
Not applicable

I tried to build 1 dll. instead of all revit versions and it works 1 hour before I saw your suggestion. What You say is true and I do not even need to close Revit from time to time. Even if I did not try that before your message, it would have solved my problem. Kudo's for You