Register Add-in using network share?

Register Add-in using network share?

Anonymous
Not applicable
877 Views
4 Replies
Message 1 of 5

Register Add-in using network share?

Anonymous
Not applicable

Hi all

 

If I register my add-in using a local path, RegAsm /codebase c:\MyCompany\InventorAddinName.dll, it works fine and is loaded by Inventor when it starts.

However, some of our customers want to use a "shortcut" installation and have the add-in located on a share on their intranet but when I try to use, RegAsm /codebase \\ServerName\MyCompanyShare\InventorAddinName.dll, the Add-in will not load.

 

Add-in written in c#, used by Inventor 2012 professional 64bit.

 

So the questions:

Does Inventor support add-ins located on a network share?

If so, how do I make it work?

 

Thanks in advance

Stefan Olofsson

0 Likes
Accepted solutions (1)
878 Views
4 Replies
Replies (4)
Message 2 of 5

jeff.pek
Community Manager
Community Manager

Hi Stefan -

 

This is likely blocked due to security settings in .NET. I think it would be tricky to find a way to make a shared .NET add-in work for all machines you're trying to deploy it to.

 

I think your better bet is to "install" it locally, where the security restrictions aren't as great.

 

Are you trying to use a network-based copy to handle updates? That seems risky, since then you could get into a situation where someone having it open prevents you from updating it.

 

Hope this helps,

  Jeff

0 Likes
Message 3 of 5

Anonymous
Not applicable

Jeff,

 

thanks for the quick reply.

 

I have managed to give the add-in assembly full trust on the intranet and the regasm command executes without error messages (before I had full trust it did give some error messages).

After the register the Add-in manager in Inventor looks like the screenshot below.

As you can see my add-in is in the list but the Location is not even close to the real one. I t should be something like \\MyServer\MyShare\MyCompany.Inventor.Addin.dll. Clicking on it so it gets loaded doesn't help either. 😞

 

So my question remains; does Inventor support loading add-ins from a network share?

 

About the update issue - that is our customers problem, they will have to shut down when they do update the system (this add-in is just a small part of it...).

 

/Stefan

Capture.JPG

0 Likes
Message 4 of 5

jeff.pek
Community Manager
Community Manager
Accepted solution

I think it would be supported, IF .NET would actually allow the add-in's code to load.

 

When you use "regasm" to register an assembly, then you are using an indirect way to access the addin's DLL -- if you were to look in the registry, you would see that it's actually mscoree.dll that's set up as the "InProcServer", and then a separate registry value identifies which DLL is supposed to be loaded. Inventor doesn't know about that.

 

I haven't come across anything that specifically indicates that this is (or is not) supported, but I know it's not common. It *seems* like, with the proper settings, you should be able to get this to work. Sorry I can't give specific guidance on exactly what you need to do.

 

Here's a thread that discusses sort-of-similar problems:

  http://social.msdn.microsoft.com/Forums/en-US/netfxbcl/thread/74d5e2a4-df0c-471d-a278-60455510587c

 

The info here might steer you in a direction that will work.

You might find it helpful to use the FUSLOGVW tool, which ships as part of Visual Studio (in the Windows SDK), to help get more detailed information about the reason for an assembly load failure.

 

Jeff

0 Likes
Message 5 of 5

Anonymous
Not applicable

Jeff, thanks a lot!

 

I got it to work by checking the registry settings and then I was able find where I had made my mistake.

 

Best regards

Stefan Olofsson

0 Likes