Question

I was curious if anyone had any problems creating unit tests around using the ResourceManager. I am using Visual Studio test edition and it appears that the satellite assemblies don't get loaded during the test. When I try to get a resource for another culture, the test always fails and the resource manager always falls back to the default culture. The exact same code runs fine within the normal application.

Was it helpful?

Solution

I've had similar problems in the past with satellite assemblies. Try adding the satellite assemblies to the unit projects dependecies. In Visual Studio Test -- Edit Test Run configuration. Select Deployment and add the files here.

On executing all applications, dlls, etc are copied to a special directory. Strong named dll's may be ignored as these are expected to be in the GAC.

OTHER TIPS

That got me going in the right direction. Adding the files to the deployment config didn't help, but disabling deployment did work.

For future reference, Visit this blog post and scroll down to the section "Managing Test Runs" for details of creating a test configuration and how to disable the deployment

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top