私はインストールの過程でカスタムアクションを実行するWIXインストーラを持っています。私はWIXインストーラを実行し、それはその最初のカスタムアクションに遭遇すると、インストーラが出て失敗し、次のように私はMSIログにエラーが表示されます。カスタムアクションを持つWIXインストーラ:「現在ロードされているランタイムよりも新しいランタイムによって構築され、ロードできません」
Action start 12:03:53: LoadBCAConfigDefaults. SFXCA: Extracting custom action to temporary directory: C:\DOCUME~1\ELOY06~1\LOCALS~1\Temp\MSI10C.tmp-\ SFXCA: Binding to CLR version v2.0.50727 Calling custom action WIXCustomActions!WIXCustomActions.CustomActions.LoadBCAConfigDefaults Error: could not load custom action class WIXCustomActions.CustomActions from assembly: WIXCustomActions System.BadImageFormatException: Could not load file or assembly 'WIXCustomActions' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded. File name: 'WIXCustomActions' at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) at System.AppDomain.Load(String assemblyString) at Microsoft.Deployment.WindowsInstaller.CustomActionProxy.GetCustomActionMethod(Session session, String assemblyName, String className, String methodName)
を...上から特定の問題は、「システムがあります.BadImageFormatException:ファイルまたはアセンブリ 'WIXCustomActions'またはその依存関係の1つを読み込めませんでした。このアセンブリは、現在ロードされているランタイムより新しいランタイムによって構築され、ロードできません。
エラーの言葉は、間違って参照されている.NETフレームワークなど(私はカスタムアクションとその依存関係の両方で3.5をターゲットにしています)のようなものを示していますが、変更する場所を特定できませんこの問題に対処する。何か案は?
....ない、これが役立つかどうかわからしかし、それは私がカスタムアクション関数を含む.dllファイルのパッケージを作成するために実行CustomActionsパッケージバッチファイルです:===========
====
コール "C:\ Program Files \ MicrosoftビジュアルStudio 10.0 \ VC \ vcvarsall.bat"
@echo「C CD
上:\開発\トランク\ PortalsDev \ CSHARP \ production \ Installers \ WIX \ customactions \ PAServicesWIXCustomActions "CSC /対象:図書館/ R: "C:\プログラムファイルは、WindowsにインストーラのXML V3.6 \ SDK \ microsoft.deployment.windowsinstaller.dll \": "C:開発\ \トランク\ PortalsDev \ CSHARP \/rでプロダクション\ Installers \ WIX \ customactions \ PAServicesWIXCustomActions \ bin \ Debug \ eLoyalty.PortalLib.dll "/ out:" C:¥development¥trunk¥PortalsDev¥csharp¥production¥Installers¥WIX¥customizations¥PAServicesWIXCustomActions¥bin¥Debug¥WIXCustomActions .dllは "CustomActions.cs
CD "C:\プログラムファイル\ WindowsインストーラのXML V3.6用の\ SDK"
makesfxca" C:開発\ \トランク\ PortalsDev \ CSHARP \生産\インストーラ\ WIX \ customactions \ PAServicesWIXCustomActions \ bin \ Debug \ BatchCustomerAnalysisWIXCustomActionsPackage.dll "" c:\ program files \ Windowsインストーラーxml v3.6 \ sdk \ x86 \ sfxca.dll "C:\開発\トランク\ PortalsDev \ csharp \ production \ Installers \ WIX \ customactions \ PAServicesWIXCustomActions \ bin \ Debug \ WIXCustomActions.dll" customaction.config Microsoft .Deployment.WindowsInstaller.dll
答えは不明ですが、package.batとは何ですか?同じエラーが発生していますが、私のプロジェクトにはこのような.batファイルはありません。 – user145400