By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,193 Members | 1,718 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,193 IT Pros & Developers. It's quick & easy.

GAC: Problems accessing versioned DLL remotely...

P: n/a
We are developing .net C# clients for our internal company users. We are
trying to minimize installation and management of EXE and DLL's on individual
user PC's since it creates additional work each time any of those files
change, so we choose to use a central server approach. We don't physically
deploy exe files to each users PC, rather, we deploy new versions of an exe
to a centralized server and place shortcut links on user' desktop pointing to
the exe files. We are now developing shared assemblies used by all .net
client applications, and we want to use versioning in the GAC to run
concurrent libraries file versions on the same machine. The issue is that
when the user clicks on the client exe shortcut on their machine, the
application crashes because it can't find the DLL's registered in the remote
machines GAC where the exe is physically located. The error is justified
since the application is searching the local users GAC for the DLL, and
that's the cause of the error.

I was able to sort of get around this problem by adding the following to my
app.config:

<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="TestDLL" publicKeyToken="2e1a90fa65aa5704" />
<publisherPolicy apply="yes" />
<codeBase version="2.0.0.19171"
href="\\tools-dev\dotnet\TestDLL.dll" />
</dependentAssembly>
</assemblyBinding>

The client application resolved the location of the DLL back to the machine
where the exe resides, tools-dev. The issue with this approach is that if I
create a new version of TestDLL, I can't copy it to the same folder location
since it will overwrite the existing version. As I said, we are using the GAC
so that we can have multiple versions of the DLL on the same machine. Doesn't
this approach go against the GAC? I should not need to specify the file name,
or perhaps I am missing something.
Thanks,
Raffi
May 11 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.