Error while using 'ngen install .. '
I am trying to create a native image for my application usin NGEN . but its showing dependency errors like
Failed to load dependency interop.office.kmgp of assembly interop.word开发者_开发知识库.kmgp , Version=8.1.0.0, Culture=neutral, PublicKeyToken=3afac4595eedae9b because of the following error : The system cannot find the file specified. (Exception from HRESULT: 0x800
70002)
Failed to load dependency interop.vbide.kmgp of assembly interop.word.kmgp , Version=8.1.0.0, Culture=neutral, PublicKeyToken=3afac4595eedae9b because of the following error : The system cannot find the file specified. (Exception from HRESULT: 0x8007
0002)
Failed to load dependency Microsoft.Synchronization of assembly Microsoft.Synchronization.Files, Version=0.94.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91 because of the following error : The located assembly's manifest definition does notmatch the assembly reference. (Exception from HRESULT: 0x80131040)
Failed to load dependency Microsoft.Synchronization of assembly Microsoft.Synchronization.MetadataStorage, Version=0.94.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91 because of the following error : The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
but the fact is , these dlls are not referred in the application . Please advise , how do i get rid of this .
Edited ,
forget about my application , whats wrong here , i am only registering only one dll .
ngen install C:\VSSTEST\Binaries\Microsoft.Synchronization.MetadataStorage.dll /ExeConfig:"C:\Program Files\ABC\Bin\ABC.exe"
Microsoft (R) CLR Native Image Generator - Version 4.0.30319.1
Copyright (c) Microsoft Corporation. All rights reserved.
Installing assembly C:\VSSTEST\Binaries\Microsoft.Synchronization.MetadataStorage.dll
Failed to load dependency Microsoft.Synchronization of assembly Microsoft.Synchronization.MetadataStorage, Version=0.94.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91 because of the following error : The located assembly's manifest definition
does not match the assembly reference. (Exception from HRESULT: 0x80131040)
All compilation targets are up to date.
They may be not referenced directly but one of the referenced assemblies is referencing them. Just make sure you have those assemblies as your application probably won't run properly without them.
Update:
Your second error means that probably Microsoft.Synchronization.Metadata has a wrong version. The actual version in Binaries folder is 0.94.0.0, but the application referenced a different version.
精彩评论