Wednesday, 28 August 2013

Could not load type '' (blank) error when trying to reference .NET assembly in NAV2013

Could not load type '' (blank) error when trying to reference .NET
assembly in NAV2013

I've created an assembly that I want to be able to call from C/SIDE in the
Role-Tailored Client in Dynamics NAV2013.
I've got this all working locally but when trying to deploy to the server
I can't compile the codeunit that references the .NET assembly
I have a variable of type DotNet but when trying to choose a subtype I get
this error:
Could not load type '' <-- nothing between the single quotes!
I've followed all steps in the MSDN guide (save exporting the types I want
to use) I've got this working locally. I can actually get it running by
installing the assembly into the GAC, but I don't want to have to do this
when it should work otherwise
(the add in is also registered in the Client Add-in table and is
strong-named with the correct public key token in the table)
These are the things I've tried:
Building for .NET 4.5, 4 and 3.5 all of which worked locally but not on
server
Dropping the dll in the client and service add-ins folder
Dropping the dll into windows/system32 folders
Running everything as administrator (dev environment, service etc etc -
I'm logged on as a domain administrator)
Ripping clumps of my own hair out
All the assembly does is calls out to some webservices and a couple of
other things, I just can't work out why I can't get it to work
I suspect it's permission related since installing to GAC seems to make it
happy
Any ideas?
Thanks in advance

No comments:

Post a Comment