Add-in The assembly does not exist

Add-in The assembly does not exist

atis.sed
Advocate Advocate
1,742 Views
9 Replies
Message 1 of 10

Add-in The assembly does not exist

atis.sed
Advocate
Advocate

Hi, 

I created Revit 2023 add-in which creates two buttons and a panel under Add-ins tab. On my home computer everything works fine, when I installed this on my work pc, the first times it ran fine, but then it started to pop up this massage at startup. Panel is made with no buttons. Anny ideas what may cause that? Tried to reinstall the add-in with no success. 

atissed_0-1654694909383.png

 

Accepted solutions (1)
1,743 Views
9 Replies
Replies (9)
Message 2 of 10

swfaust
Advocate
Advocate

Check to make sure the dll actually exists and that the path you are giving it in the button data is correct.  Could be that your assembly got deleted or moved somehow, or it may be using a relative path and the current folder got changed somehow?  It may be harder to tell if this is a full install and it doesn't do it during debug, but in short, this is just saying that there is no file at the path it was given for the command when you try to construct the button.

Message 3 of 10

atis.sed
Advocate
Advocate

Thank you! I will check that!

Message 4 of 10

sragan
Collaborator
Collaborator
0 Likes
Message 5 of 10

swfaust
Advocate
Advocate
That's a different message though. That one is about the assembly being found but not containing the designated class. This question is about the dll assembly itself not being found.
0 Likes
Message 6 of 10

sragan
Collaborator
Collaborator
You are correct, and when I posted that to the other thread, I'm not sure i noticed it was a class not found error.

When the DLL is locked by windows security, I'm pretty sure an "Assembly does not exist" message is generated.

So that solution probably applies to this thread more than the other thread. And its a simple thing to check.
Message 7 of 10

atis.sed
Advocate
Advocate

Hi, thanks for reply, just checked and the .dll is not blocked. 

atissed_0-1654701251120.png

 

Message 8 of 10

sragan
Collaborator
Collaborator

Spelling errors are the most common cause, although if it ran once, it seems like a spelling error is unlikely, unless something was changed when you reinstalled.


And case matters too.  Toolset is not the same as toolset.   And of course spaces also matter.  We can't see the exact file name its looking for in your error message, but I notice the error message lists the name with spaces and a small t, while the file name has no spaces, and a capital T.

 

File and assembly names must match exactly.

 

Message 9 of 10

atis.sed
Advocate
Advocate
Accepted solution

@sragan @swfaust 

I was hardcoding the path to .dll.. Now I tried this solution https://forums.autodesk.com/t5/revit-api-forum/get-location-of-executing-dll/td-p/7681220 to get dynamic path of the .dll. For now it works, tomorrow I will test this on my work PC.

Message 10 of 10

swfaust
Advocate
Advocate

That's the basic system I've always used and haven't had an issue.  Hopefully it should fix it for you...