2010-07-28 8 views
6

Khi áp dụng chuyển hướng ràng buộc trong app.config của dự án thử nghiệm. Thời gian chạy từ chối tuân theo lệnh chuyển hướng và tiếp tục tìm kiếm các phiên bản cũ của hội đồngchuyển hướng ràng buộc không hoạt động trong dự án thử nghiệm

<runtime> 
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> 
    <dependentAssembly> 
     <assemblyIdentity name="Msdcc.Common" publicKeyToken="9d9c15280f7f1425"/> 
     <bindingRedirect oldVersion="0.0.0.0-2.4.0.0" newVersion="2.4.0.0"/> 
    </dependentAssembly> 
    </assemblyBinding> 
</runtime> 

tôi cũng đã nghe nói về không gian tên mặc định tạo ra vấn đề (từ một người đàn ông rất khôn ngoan) vì vậy tôi thêm "xmlns =" urn: schemas-microsoft-com: asm.v1 ". Đã cố gắng chạy trường hợp thử nghiệm vẫn không đi. Mở ra Fusion Log Viewer kiểm tra vấn đề và thắc mắc của tự hỏi nó là cho đến khi tìm kiếm các dll cũ. Thông điệp thực sự hữu ích đưa ra dưới đây đã được giải mã bằng cách sử dụng bài đăng này http://msdn.microsoft.com/en-us/magazine/dd727509.aspx

*** Assembly Binder Log Entry (28/07/2010 @ 18:59:36) *** 

The operation failed. 
Bind result: hr = 0x80131040. No description available. 

Assembly manager loaded from: C:\WINNT\Microsoft.NET\Framework\v2.0.50727\mscorwks.dll 
Running under executable C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe 
--- A detailed error log follows. 

=== Pre-bind state information === 
LOG: User = BELGACOM\id820374 
LOG: DisplayName = Msdcc.Common, Version=2.2.0.0, Culture=neutral, PublicKeyToken=9d9c15280f7f1425 
(Fully-specified) 
LOG: Appbase = file:///c:/data/source/explorev1/explore.root/explore/euc.explore.domainobjectstest/bin/debug 
LOG: Initial PrivatePath = NULL 
LOG: Dynamic Base = NULL 
LOG: Cache Base = NULL 
LOG: AppName = NULL 
Calling assembly : (Unknown). 
=== 
LOG: This is an inspection only bind. 
LOG: Using application configuration file: c:\data\source\explorev1\explore.root\explore\euc.explore.domainobjectstest\bin\debug\euc.explore.domainobjectstest.dll.config 
LOG: Using machine configuration file from C:\WINNT\Microsoft.NET\Framework\v2.0.50727\config\machine.config. 
LOG: GAC Lookup was unsuccessful. 
LOG: Attempting download of new URL file:///c:/data/source/explorev1/explore.root/explore/euc.explore.domainobjectstest/bin/debug/Msdcc.Common.DLL. 
LOG: Assembly download was successful. Attempting setup of file: c:\data\source\explorev1\explore.root\explore\euc.explore.domainobjectstest\bin\debug\Msdcc.Common.dll 
LOG: Entering run-from-source setup phase. 
LOG: Assembly Name is: Msdcc.Common, Version=2.4.0.0, Culture=neutral, PublicKeyToken=9d9c15280f7f1425 
WRN: Comparing the assembly name resulted in the mismatch: Minor Version 
ERR: The assembly reference did not match the assembly definition found. 
ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated. 

MyMặc dùProcess

này đã cho tôi suy nghĩ tại sao nó vẫn không làm chuyển hướng lắp ráp nếu liên kết có mặt trong tập tin cấu hình của tôi.

Vì vậy, newbie rằng tôi chỉ quyết định tôi sẽ làm chính xác những gì ông già nói với tôi để làm và loại bỏ các khai báo không gian tên từ các yếu tố cấu hình và hey presto nó làm việc. xmlns = "http://schemas.microsoft.com/.NetConfiguration/v2.0"

MyCâu hỏi sau câu chuyện rất dài này là từ những gì tôi hiểu được khai báo không gian tên chỉ được cho gây rối với các Intellisense tại sao nó screwing xung quanh với các ràng buộc lắp ráp ???

+0

bạn sử dụng VS nào? –

+0

xin lỗi Lukas cho câu trả lời thực sự muộn là sử dụng vs2008 SP1. –

+0

Bạn có tìm thấy giải pháp nào cho vấn đề này ...? – Syska

Trả lời