Debug Add-in Visual Basic 2015

Debug Add-in Visual Basic 2015

TA.Fehr
Advocate Advocate
1,140 Views
3 Replies
Message 1 of 4

Debug Add-in Visual Basic 2015

TA.Fehr
Advocate
Advocate

I've made a bunch of add-ins for inventor and for some reason I have one that will not debug. I've started other add-ins from scratch and copied the settings meticulously but still nothing.

The add-in loads, updates on build but will not debug.

 

It was working until something changed at which point I can't get it back. I've even gone back on my previous git versions and saved backups but I still cant get it run in debug mode.

 

I've looked through every tutorial and help  file I can find and I can't see anything I'm doing wrong.

 

Currently my build output path is pointing to C:\ProgramData\Autodesk\ApplicationPlugins

This is because my add-in is already in the appstore and I want to overwrite the store location with the current build.

I have my post-build set to:

call "%VS140COMNTOOLS%vsvars32"
			mt.exe -manifest "$(ProjectDir)$(ProjectName).X.manifest" -outputresource:"$(TargetPath)";#2
			XCopy "$(TargetPath)" "%AppData%\Autodesk\ApplicationPlugins\$(TargetName)\" /Y /R
		    XCopy "$(ProjectDir)Autodesk.$(ProjectName).Inventor.addin" "%AppData%\Autodesk\ApplicationPlugins\$(TargetName)\" /Y /R
	

I've also tried to revert all of these settings to the default settings like what the template has, but it still will not debug. (even though the template file will run just fine)

 

Every time it runs, the breakpoint says that the symbols haven't been loaded.

 

The only thing I can think of is that somewhere in the registry, there is something that is either blocking or re-directing visual studio's connection to the StandardAddInServer.vb located in the .dll file. The reason I think this is because if I make another add-in in the same location, it notifies me that StandardAddInServer.vb was found in the second add-in files and not the add-in I'm debugging.

0 Likes
Accepted solutions (1)
1,141 Views
3 Replies
Replies (3)
Message 2 of 4

bradeneuropeArthur
Mentor
Mentor
try the output to:
Copy the Add In File to:
C:\ProgramData\Autodesk\Inventor 20##\Addins
Copy the dll File to:
C:\Program Files\Autodesk\Inventor 20##\Bin

Search for all files you have copied and delete them first to avoid duplicates...

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 3 of 4

TA.Fehr
Advocate
Advocate

I did what you suggested but to no avail.

The add-in loads just fine no matter where i put the files, and it runs with the latest updates, but I cannot get it into the debug environment.

 

For some reason, the breakpoint keeps finding a copy of StandardAddinServer.vb in a separate add-in file I have stored in "%AppData%\Autodesk\ApplicationPlugins". (which is not where the .dll is pointing) If I delete these files the breakpoint states that no symbols have been loaded.

 

So I tried changed my output path from "bin\debug" to "C:\ProgramData\Autodesk\Inventor 2019\Addins\" to other various locations in which Inventor searches  for add-ins with the same results.

I also added/removed/modified the build output from the default settings, to nothing, to any permutation I can think of but still with the same results.

 

Lastly I tried making a blank add-in directly from the template. This seems to work just as long as I don't name it "AutoSave" which is the name of the add-in that I need to make. I can call it "AutoSave2" or anything else and everything works fine. Which makes me think there's something inside Inventor that's keeping Visual Studio from using the same .dll for debugging.

 

I'm literally pulling out my remaining hair because this shouldn't be this difficult.

0 Likes
Message 4 of 4

TA.Fehr
Advocate
Advocate
Accepted solution

I wound up solving the issue.

 

I built an add-in from the template on a separate machine and added components of the original bit by bit. It turns out the problem came when I added the RestSharp.dll reference. Once this reference was added, it seemed as if Inventor remembered the add-in GUID and refused to share the .dll with VS. This meant that I could compile and used the add-in but I couldn't debug it.

 

When I found this, I started a new add-in from the template and pulled the latest RestSharp.dll from the site and added the remaining components from the old add-in. So now I have it up and running, it's technically a different add-in because the GUID has changed. I may try to change it back to the original and see if it still works so anyone who has already downloaded it won't have to re-authorize, but at least I have it working the way it should again.

0 Likes