Error loading resources

Error loading resources

Ed__Jobe
Mentor Mentor
1,147 Views
3 Replies
Message 1 of 4

Error loading resources

Ed__Jobe
Mentor
Mentor

I created a test project with my new template and I get the following error when trying to netload it.

NETLOAD
Cannot load assembly. Error details: System.Resources.MissingManifestResourceException: 
Could not find any resources appropriate for the specified culture or the neutral culture.  
Make sure "TID_.TID_Test.resources" was correctly embedded or linked into assembly "Acad2023PluginCSharp1" at compile time, or that all the satellite assemblies required are loadable and fully signed.

Attached is the test solution. I tried some things I found on stack overflow, but they haven't worked. I even tried deleting the resources.resx file, but that didn't help either. Got any ideas?

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

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

SENL1362
Advisor
Advisor
Accepted solution
Caused by the line: [CommandMethod("TID", "CommandNameGlobal", "CommandNameLocalized", CommandFlags.Modal)]
Remove "CommandNameGlobal", "CommandNameLocalized" and you're problem is gone.
have a look at https://www.keanw.com/2009/06/registering-autocad-commands-with-localized-names-using-net.html
0 Likes
Message 3 of 4

_gile
Consultant
Consultant
Accepted solution

Hi,

 

As you use a CommandMethod  attribute overload which takes a localizedNameId argument, you have to add at least one resource file to the project names MyCommands.resx. In this file you have to add an entry which key is: CommandNameLocalized.

 

_gile_0-1668672594229.png

 

 

If you want to add some localized command names, you have to add a resource file for each localized name, with the same key and a, possibly, different value (e.g. MyCommands.fr.resx with CommandNameLocalized = DIT).

 

_gile_1-1668672840244.png

 

The CommandMethod Attribute should be like this if tou want "TID" to be the global name.

[CommandMethod("CMDS_GROUP", "TID", "CommandNameLocalized", CommandFlags.Modal)]

 

 



Gilles Chanteau
Programmation AutoCAD LISP/.NET
GileCAD
GitHub

0 Likes
Message 4 of 4

Ed__Jobe
Mentor
Mentor

Thanks guys. I guess I was trying to make my template too generic.

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

0 Likes