binding an assembly by using config-file and codebase - problem

H

hvsegoo

Hi out there in the www.

I have a difficult problem, I'm trying to explain:

I have the need to run an VB6-file, which uses an assembly. I created
a VB6.exe.config file and entered the needed assemblys in it. This all
works great, as long as i use any pathname without special charcters
in it, i. e ampersand.
If I use a codebase with an ampersand in the pathname, it does not
pick the wanted assembly.
Here is my config-file:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="GPS_MGBASE_WRAPPER" culture="neutral"
publicKeyToken="c7ff7ce1ef683d3e"/>
<codeBase version="2007.1.0.9" href="file:///c:/Te&amp;st/
GPS_MGBASE_WRAPPER.dll"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

As you see, i already have replaced my ampersand (the real pathname is
c:\Te&st\) with &amp;, but I also tries this: & and this &38; and this
%26

Here is what I read out of the logfile of fuslogvw:

*** Protokolleintrag für Assembly-Binder (04.10.2007 @ 17:19:01) ***

Fehler bei diesem Vorgang.
Ergebnis der Bindung: hr = 0x80070002. Das System kann die angegebene
Datei nicht finden.

Der Assemblymanager wurde geladen aus: C:\WINDOWS\Microsoft.NET
\Framework\v2.0.50727\mscorwks.dll
Als EXE-Datei ausgeführt. C:\Dokumente und Einstellungen\schalscha
\Eigene Dateien\Visual Studio 2005\Projects\TESTCOMDLL1\TESTCOMDLL1\bin
\Release\TEST.exe
--- Ein detailliertes Fehlerprotokoll folgt.

=== Zustandsinformationen vor Bindung ===
LOG: Benutzer = NETZWERK\schalscha
LOG: DisplayName = GPS_MGBASE_WRAPPER, Version=2007.1.0.9,
Culture=neutral, PublicKeyToken=c7ff7ce1ef683d3e
(Fully-specified)
LOG: Appbase = file:///C:/Dokumente und Einstellungen/schalscha/Eigene
Dateien/Visual Studio 2005/Projects/TESTCOMDLL1/TESTCOMDLL1/bin/
Release/
LOG: Ursprünglicher PrivatePath = NULL
LOG: DynamicBase = NULL
LOG: CacheBase = NULL
LOG: AppName = TEST.exe
Aufruf von Assembly : (Unknown).
===
LOG: Diese Bindung startet im default-Load-Kontext.
LOG: Es wurde versucht, die Anwendungskonfigurationsdatei von
file:///C:/Dokumente und Einstellungen/schalscha/Eigene Dateien/Visual
Studio 2005/Projects/TESTCOMDLL1/TESTCOMDLL1/bin/Release/
TEST.exe.config herunterzuladen.
LOG: Die Anwendungskonfigurationsdatei (C:\Dokumente und Einstellungen
\schalscha\Eigene Dateien\Visual Studio 2005\Projects
\TESTCOMDLL1\TESTCOMDLL1\bin\Release\TEST.exe.config) wurde gefunden.
LOG: Die Anwendungskonfigurationsdatei wird verwendet: C:\Dokumente
und Einstellungen\schalscha\Eigene Dateien\Visual Studio 2005\Projects
\TESTCOMDLL1\TESTCOMDLL1\bin\Release\TEST.exe.config
LOG: Die Computerkonfigurationsdatei von C:\WINDOWS\Microsoft.NET
\Framework\v2.0.50727\config\machine.config wird verwendet.
LOG: Verweis nach der Richtlinie: GPS_MGBASE_WRAPPER,
Version=2007.1.0.9, Culture=neutral, PublicKeyToken=c7ff7ce1ef683d3e
LOG: Die Suche im GAC war nicht erfolgreich.
LOG: Download von neuem URL file:///c:/Test/GPS_MGBASE_WRAPPER.dl.
LOG: Fehler bei allen Such-URLs.

(Sorry this is in German)
Interesting here is the line before the last one:

Here we can read file:///c:/Test/GPS_MGBASE_WRAPPER.dl.
Interesting is, that the ampersand in Te&st is missing, AND the second
l in the file-extension is missing.

Unfortunaltely I cannot change the pathname, because this is the
def.path of an third-prty app.

Anybody any idea how to tell the CLR to use this path? I have looked
into mscorcfg.msc, and there is the correct path.

I have run out of ideas.

Thanks for any hint.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top