Coordinator
Aug 23, 2010 at 10:53 AM
Edited Aug 25, 2010 at 6:48 AM
|
Hi,
<<why there are 2 configsources>>.
Yes, The configsources under allusers is used by TridentExecutionService to connect to registry.
<<why GetProviders return an empty list.>>
The design loading the providers is based on reflection. When the GetProvider function is called, it looks for the entire file name which starts from
"Microsoft.Research.DataLayer.DataProviders.*.dll"
in the current execution folder. If it not able to find any providers in the execution folder, it checks for AlternateProviderPath property. If it is able to find the providers in this path then it loads the
providers.
If at all it is not able to find any provider(s) in both executable and alternate provider path. It throws a ProviderNotFound exception and exits the application.
The reason why it works well in your application is that you might have added reference to the DatalayerProvMSFT(Microsoft.Research.DataLayer.DataProviders.Microsoft.dll) into your project. So when the application
is built the references are built and are copied to execution folder. So when the executable loads it will be able to find the provider dll in its execution path and will load the providers.
But when we are trying to run unit test case, the execution context of the might be different and the GetProviders function could not be able find any providers. You can try adding the reference to the provider
to the project.
If by adding the reference does not work. Then we need to set the AllternateProviderPath of the connection to the path where the provider dll’s could be found.
You can set the AlternateProvider path using the property
AlternateProviderLocation
exposed in ConnectionManager class.
ConnectionManager.AlternateProviderLocation = “”;
// Path where provider dlls are stored.
Please try the above methods and let us know if this resolved your issue. If not then can you please provide us with the unit test code which you’re trying to execute?
Thanks,
Trident Support Team
|