I have the following configuration file:
<?xml version="1.0"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-
com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Foo" />
<publisherPolicy apply="no" />
<bindingRedirect oldVersion="1.0.0.0"
newVersion="1.1.0.0" />
<codeBase version="1.1.0.0"
href="file:///C:\Projects\Version\1.1
\Foo\bin\Debug\Foo.dll" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
The application is in C:\Projects\Version\bin\debug.
Fuslogvw indicates the following:
*** Assembly Binder Log Entry (12/20/2002 @ 11:15:35 AM)
***
The operation failed.
Bind result: hr = 0x80131041. No description available.
Assembly manager loaded from:
C:\WINNT\Microsoft.NET\Framework\v1.1.4322\fusion.dll
Running under executable
C:\Projects\Version\bin\Debug\Version.exe
--- A detailed error log follows.
=== Pre-bind state information ===
LOG: DisplayName = Foo, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=null
(Fully-specified)
LOG: Appbase = C:\Projects\Version\bin\Debug\
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = NULL
Calling assembly : Version, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=null.
===
LOG: Processing DEVPATH.
LOG: DEVPATH is not set. Falling through to regular bind.
LOG: Policy not being applied to reference at this time
(private, custom, partial, or location-based assembly
bind).
LOG: Post-policy reference: Foo, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null
LOG: Attempting download of new URL
file:///C:/Projects/Version/1.1/Foo/bin/Debug/Foo.dll.
LOG: Assembly download was successful. Attempting setup of
file: C:\Projects\Version\1.1\Foo\bin\Debug\Foo.dll
LOG: Entering run-from-source setup phase.
ERR: The private assembly was located outside of appbase.
Source Url =
file:///C:/Projects/Version/1.1/Foo/bin/Debug/Foo.dll.
LOG: Private assembly found in invalid location.
ERR: Failed to complete setup of assembly (hr =
0x80131041). Probing terminated.
The error indicates that the assembly is located outside
of the appbase. How do I set the appbase so that it
includes the new version?
Thank you.
Kevin
From what you have described, I can see that the foo.dll is not signed and
so it is a weakly named assembly. As by design,a Weakly named assembly can
only be deployed into the application's base directory or one of its
subdirectories. So in order to achieve your goal, you should sign the
assembly foo.dll. You may refer to the following link:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/ht
ml/gngrfcodebase.asp
This posting is provided "AS IS" with no warranties, and confers no rights.
Regards,
Bill Cheng
Microsoft Support Engineer
--------------------
| Content-Class: urn:content-classes:message
| From: "Kevin Burton" <rkevin...@charter.net>
| Sender: "Kevin Burton" <rkevin...@charter.net>
| Subject: Binding with application configuration file.
| Date: Fri, 20 Dec 2002 09:20:48 -0800
| Lines: 80
| Message-ID: <05dc01c2a84c$233c4b10$8df82ecf@TK2MSFTNGXA02>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Thread-Index: AcKoTCM8JYukrRSTSYCWlZHechALDQ==
| Newsgroups: microsoft.public.dotnet.framework.clr
| NNTP-Posting-Host: TK2MSFTNGXA02 10.40.1.51
| Path: cpmsftngxa06!TK2MSFTNGP08!cpmsftngxa09
| Xref: cpmsftngxa06 microsoft.public.dotnet.framework.clr:5374
| X-Tomcat-NG: microsoft.public.dotnet.framework.clr