2012-06-14 15 views
6

Mam rozwiązanie Visual Studio 2010, które zawiera bibliotekę klas (ProjectA) i dwa projekty Sharepoint (ProjectB & ProjectC). Zlecenie zależne to ProjectB, odwołujące się do ProejctA i ProjectC, zarówno ProjectA & ProjectB.Błąd wiązania zespołu: Wynik wiązania: hr = 0x80070002. System nie może znaleźć określonego pliku

na jednym komputerze deweloperskim pojawia się następujący błąd, gdy próbuje zbudować ProjectC:

Compilation failed. Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.

Patrząc w dzienniku fuzji i zauważyć następujący błąd:

* Assembly Binder Log Entry (14/06/2012 @ 09:38:32) *

The operation failed.

Bind result: hr = 0x80070002. The system cannot find the file specified.

Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll

Running under executable C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe

--- A detailed error log follows.

=== Pre-bind state information === LOG: User = DOMAIN\username

LOG: DisplayName = ProjectB, Version=0.0.0.0, Culture=neutral, PublicKeyToken=aaaaaaaaaaaaaaaa, processorArchitecture=MSIL (Fully-specified)

LOG: Appbase = file:///C:/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/

LOG: Initial PrivatePath = NULL

LOG: Dynamic Base = NULL

LOG: Cache Base = NULL

LOG: AppName = devenv.exe

Calling assembly : (Unknown).

LOG: This bind starts in default load context.

LOG: Using application configuration file: C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe.Config

LOG: Using host configuration file:

LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.

LOG: Post-policy reference: ProjectB, Version=0.0.0.0, Culture=neutral, PublicKeyToken=aaaaaaaaaaaaaaaa, processorArchitecture=MSIL

LOG: GAC Lookup was unsuccessful.

LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/ProjectB.DLL. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/ProjectB/ProjectB.DLL. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/PublicAssemblies/ProjectB.DLL. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/PublicAssemblies/ProjectB/ProjectB.DLL. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/PrivateAssemblies/ProjectB.DLL. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/PrivateAssemblies/ProjectB/ProjectB.DLL. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/CommonExtensions/Microsoft/TemplateProviders/ProjectB.DLL. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/CommonExtensions/Microsoft/TemplateProviders/ProjectB/ProjectB.DLL. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/PrivateAssemblies/DataCollectors/ProjectB.DLL. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/PrivateAssemblies/DataCollectors/ProjectB/ProjectB.DLL. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/PrivateAssemblies/DataCollectors/x86/ProjectB.DLL. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/PrivateAssemblies/DataCollectors/x86/ProjectB/ProjectB.DLL. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/CommonExtensions/Microsoft/Editor/ProjectB.DLL. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/CommonExtensions/Microsoft/Editor/ProjectB/ProjectB.DLL. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/CommonExtensions/Platform/Debugger/ProjectB.DLL. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/CommonExtensions/Platform/Debugger/ProjectB/ProjectB.DLL. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/ProjectB.EXE. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/ProjectB/ProjectB.EXE. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/PublicAssemblies/ProjectB.EXE. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/PublicAssemblies/ProjectB/ProjectB.EXE. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/PrivateAssemblies/ProjectB.EXE. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/PrivateAssemblies/ProjectB/ProjectB.EXE. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/CommonExtensions/Microsoft/TemplateProviders/ProjectB.EXE. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/CommonExtensions/Microsoft/TemplateProviders/ProjectB/ProjectB.EXE. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/PrivateAssemblies/DataCollectors/ProjectB.EXE. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/PrivateAssemblies/DataCollectors/ProjectB/ProjectB.EXE. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/PrivateAssemblies/DataCollectors/x86/ProjectB.EXE. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/PrivateAssemblies/DataCollectors/x86/ProjectB/ProjectB.EXE. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/CommonExtensions/Microsoft/Editor/ProjectB.EXE. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/CommonExtensions/Microsoft/Editor/ProjectB/ProjectB.EXE. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/CommonExtensions/Platform/Debugger/ProjectB.EXE. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/CommonExtensions/Platform/Debugger/ProjectB/ProjectB.EXE. LOG: All probing URLs attempted and failed.

próbowałem:

  1. Usunięcie odwołania do ProjectB i ponowne dodanie obu:
    • a) jako odniesienie projektu
    • b) jako odniesienia ręcznego bezpośrednio do folderu debugowania projectB
  2. Ręczne wprowadzanie ProjectB.dll do GAC
  3. Zmiana "Copy Local" opcja z true na false (i powrót do True)

i tylko (2) umieszczenie zestawu w GAC pozwala ProjectC zbudować. Dlaczego nie znajduje zespołu tak jak powinien (i czy działa na innych urządzeniach)?

+0

są wszystkie 64bit maszyn, czy tylko ten jeden? –

+0

Wszystkie są 64-bitowe Windows Server 2008 R2 – mundeep

Odpowiedz

3

Okazuje się przyczynę zespół nie mógł być znaleziony dlatego jesteśmy Delayed Signing the Assemblies oznacza to, że:

Because the assembly does not have a valid strong name signature, the verification of that signature must be turned off. You can do this by using the –Vr option with the Strong Name tool.

ja już to zrobione dla wszystkich wymaganych kluczy publicznych jednak tylko w komendzie x64 Visual Studio skłonić. Potrzebne było również dodanie pominięcia weryfikacji dla x86 w wersji x86 programu Visual Studio Command Prompt.

ja tylko udało się znaleźć tego powodu próbuje konkretny scenariusz oparty build/rozmieszczania polecenia Zauważyłem następujący wyjątek z jednego z zestawów testowych:

Could not load file or assembly 'ProjectC.Tests, Version=0.0.0.0, Culture=neutral, PublicKeyToken=e72f8d3506b83180' or one of its dependencies. Strong name validation failed. (Exception from HRESULT: 0x8013141A)

3

PublicKeyToken = aaaaaaaaaaaaaa może być inna lub może być inną wersją zestawu. Myślę, że powinieneś używać Fusion Log Viewer to Debug zgodnie z opisem i mam nadzieję, że rozwiążesz swój problem.

+1

a) Fusion Log jest powyżej tego, co rozumiem z tego, że sprawdza GAC, a następnie z jakiegoś powodu foldery IDE zamiast folderów bin projektu. (b) Jak wspomniano powyżej, jeśli ręcznie umieściłem zestaw ProjectB w GAC, zostanie on znaleziony (co oznacza, że ​​klucz jest poprawny) - Właśnie ręcznie sprawdziłem (sn-T) i klucz jest taki sam. – mundeep

+0

możesz wkleić klucz, który sprawdziłeś za pomocą (sn-T), a także numer wersji zestawu. – MMK

+0

Więc usunąłem dll ProjectB z GAC i próbowałem zbudować ponownie otrzymuję następujące informacje w fuzji: === Informacje o stanie pre-bind === LOG: Użytkownik = DOMENA \ nazwa użytkownika LOG: DisplayName = ProjectB, wersja = 0,0.0, Culture = neutral, PublicKeyToken = e72f8d3506b83180, processorArchitecture = MSIL (w pełni określony) LOG: Appbase = plik: /// C:/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/ .. ... LOG: Odwołanie do polisy: ProjectB, wersja = 0.0.0.0, Culture = neutral, PublicKeyToken = e72f8d3506b83180, processorArchitecture = MSIL LOG: Wyszukiwanie GAC nie powiodło się. – mundeep

Powiązane problemy