Satellite Assembly Not Working Properly
-
Hello guys. I used following tutorial as a guide for adding/modifying a satellite assembly. Creating Satellite Assemblies for Desktop Apps. I am able to create 1- new
.resx
file 2- create a.resource
file from it 3- and create satellite assembly from the.resource
file. I use following two commands for creating assemblies 1: resgen string.en-US.resx 2: al /target:lib /embed:string.en-US.resources /culture:PATH TO DEBUG\en-US\TestApp.resources.dll I create a new folder for culture I am interested in, in the Debug folder and place the newly created satellite assembly in it. When I run it, I get the exception Could not find any resources for the specified culture or the neutral culture. Make sure "TestApp.string.resources" was correctly embedded or linked into assembly "TestApp" at compile time or that all the satellite assemblies required are loadable and fully signed. One thing of interest here is: if I just recompile my project then changes made are picked up. But if I don't recompile my project then running the .EXE from debug folder gives this exception. WHAT COULD BE WRONG ??? (hopefully I described well) Thanks for any input.This world is going to explode due to international politics, SOON.
-
Hello guys. I used following tutorial as a guide for adding/modifying a satellite assembly. Creating Satellite Assemblies for Desktop Apps. I am able to create 1- new
.resx
file 2- create a.resource
file from it 3- and create satellite assembly from the.resource
file. I use following two commands for creating assemblies 1: resgen string.en-US.resx 2: al /target:lib /embed:string.en-US.resources /culture:PATH TO DEBUG\en-US\TestApp.resources.dll I create a new folder for culture I am interested in, in the Debug folder and place the newly created satellite assembly in it. When I run it, I get the exception Could not find any resources for the specified culture or the neutral culture. Make sure "TestApp.string.resources" was correctly embedded or linked into assembly "TestApp" at compile time or that all the satellite assemblies required are loadable and fully signed. One thing of interest here is: if I just recompile my project then changes made are picked up. But if I don't recompile my project then running the .EXE from debug folder gives this exception. WHAT COULD BE WRONG ??? (hopefully I described well) Thanks for any input.This world is going to explode due to international politics, SOON.
The exception mesage says that resources are completely missing - not only for a specific culture. I'd suggest to get the project running without satellite assemblies first, and then add them. By the way, en-US is typically the default culture, unless you explicitely set it to something else.
-
The exception mesage says that resources are completely missing - not only for a specific culture. I'd suggest to get the project running without satellite assemblies first, and then add them. By the way, en-US is typically the default culture, unless you explicitely set it to something else.
Yes. Everything is working fine if I run it without satellite assemblies. Then I add the assemblies and run it again, it works again. Now I make a small change in the
en-US.resx
file. I generate xxxx.resources file from this .resx file and xxxx.resources.dll file (satellite assembly) from the resultant .resouces file. I simply replace the old satellite assembly with the new one. It gives the said exception. Unless I recompile the project, I won't work. What am I doing wrong here?This world is going to explode due to international politics, SOON.
-
Yes. Everything is working fine if I run it without satellite assemblies. Then I add the assemblies and run it again, it works again. Now I make a small change in the
en-US.resx
file. I generate xxxx.resources file from this .resx file and xxxx.resources.dll file (satellite assembly) from the resultant .resouces file. I simply replace the old satellite assembly with the new one. It gives the said exception. Unless I recompile the project, I won't work. What am I doing wrong here?This world is going to explode due to international politics, SOON.
If I understand you correctly, you do a change in the main resource of the project but don't compile it. Then you manually propagate the change to the satellite assemblies. This means your satellite assemblies contain strings that are not in the main assembly. I assume that this is the problem leading to the exception. And if you compile the project again, so that the main assembly matches the satellite assemblies again, it will work. If this is what's happening, I think the behavior is by design.
The good thing about pessimism is, that you are always either right or pleasently surprised.
-
If I understand you correctly, you do a change in the main resource of the project but don't compile it. Then you manually propagate the change to the satellite assemblies. This means your satellite assemblies contain strings that are not in the main assembly. I assume that this is the problem leading to the exception. And if you compile the project again, so that the main assembly matches the satellite assemblies again, it will work. If this is what's happening, I think the behavior is by design.
The good thing about pessimism is, that you are always either right or pleasently surprised.
I change something in satellite assembly ( change in
.resx
--> generate.resources
--> generate.dll
using VS command line). No change in main assembly. Do I have to recompile the whole project again ORR just updating the satellite assembly should suffice ? In my case, I have to recompile whole project whereas I think I should just update the satellite assembly and application should run. What am I doing wrong here ??This world is going to explode due to international politics, SOON.