Click to See Complete Forum and Search --> : Provider Model
hoagers34
August 29th, 2008, 09:52 PM
I have implemented a provider and everything works as long as my provider assembly is in the same directory as my C# Windows Application. Is there a way in the app.config to point to my provider assembly if it is in a different directory? Does it have to be in the same directory?
Thanks.
JonnyPoet
August 31st, 2008, 07:41 AM
I have implemented a provider and everything works as long as my provider assembly is in the same directory as my C# Windows Application. Is there a way in the app.config to point to my provider assembly if it is in a different directory? Does it have to be in the same directory?
Thanks.When changing the directory where your ssambly is you only need torenew the adress of the assembly in the references list of your project. Open them, deete the wrong one and add the new adress of your assembly by using the right click drop down menue.
darwen
August 31st, 2008, 08:05 AM
This won't work with depoyment.
Recommended practice for .NET deployment is to install all necessary dependent assembly dlls with your application.
However you can add entries to the app.config to tell the application to look elsewhere for an assembly dll.
Have a look at the codebase ('http://msdn.microsoft.com/en-us/library/efs781xb.aspx') element of the app.config file (name this file <exe name>.exe.config). You need to use the href attribute with the path of your assembly.
Don't be tempted to use the GAC (global assembly cache). This should only be used in cases when there's a very, very good reason to. The main reason for this is that it overrides whatever is in the app.config of an application. You also have to be very strict with the versioning of the assemblies if you're going to use the GAC. It's best avoided.
Darwen.
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.