Visual Studio Template Bug

Visual Studio Template Bug

tdant
Collaborator Collaborator
485 Views
4 Replies
Message 1 of 5

Visual Studio Template Bug

tdant
Collaborator
Collaborator

I think I found an issue with the VS Inventor Project template. If a space is used in the project name at launch, the .addin assembly file replaces the space with an underscore when mapping to the .dll. This causes and error and prevents loading when Inventor activates it.

 

This drove me crazy yesterday, so I hope it'll save someone else some headache. Also, whoever is in control of that template might want to take a peek at it.

0 Likes
486 Views
4 Replies
Replies (4)
Message 2 of 5

smilinger
Advisor
Advisor

It's not a bug I think. Generally the project name is used as the namespace name and dll name by default in Visual Studio, namespace name cannot have spaces, and Visual Studio will replace spaces with underscore automatically for namespace.

 

The Inventor template replace spaces for both the namespace and the assembly name, make it more consistent. If you insist using spaces in assembly name, then you should name you namespace and assembly name in the project settings manually.

0 Likes
Message 3 of 5

tdant
Collaborator
Collaborator

VS is using spaces by default in my file names (see attached screenshot), including the .dll. That's what caused the headache in the first place. Once I manually replaced the underscore with a space in the addin assembly, it worked perfectly.

 

Maybe this is due to VS being a later version than the template? I'm using VS2017, Windows 7, and Inventor 2017.

0 Likes
Message 4 of 5

Frederick_Law
Mentor
Mentor

I stop using space in my Project Name to avoid this problem.

0 Likes
Message 5 of 5

christopher.pepin
Advocate
Advocate

It is frustrating that 6 years down the line and this bug is still present.

0 Likes