エラー MSB4062:「GenerateAndPersistAppInfoTask」タスクをロードできませんでした
-
21-09-2019 - |
質問
TFS で構築されたソリューションに多数の Office アドイン プロジェクトを追加しましたが、現在は機能しなくなっています。Visual Studio と TFS 2008 (SP1) を使用しています。以下の各ターゲットに 1 つずつ、計 4 つのプロジェクトが追加されました。
- ワード2003
- ワード2007
- エクセル2003
- エクセル2007
ビルド ログには次のことが報告されます...
C:\Program Files\MSBuild\Microsoft.VisualStudio.OfficeTools2.targets(116,9): error MSB4062: The "GenerateAndPersistAppInfoTask" task could not be loaded from the assembly Microsoft.VisualStudio.Tools.Applications.Hosting, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a. Could not load file or assembly 'Microsoft.VisualStudio.Tools.Applications.Hosting, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. Confirm that the <UsingTask> declaration is correct, and that the assembly and all its dependencies are available.
Microsoft.VisualStudio.Tools.Applications.Runtime.v9.0.dll はサーバー上に存在し、GAC に正しくインストールされています。Visual Studio Tools for Office (2005 および 3.0) もすべてインストールされています。サーバー上にリモートで Visual Studio を実行している場合、これらのアドインの 1 つを再作成し、正常にコンパイルできます。
助けて、行き詰まった!
解決
私判明はMicrosoft.VisualStudio.Tools.Applications.Hosting.dllがGACにインストール必要。私はすでにMicrosoft.VisualStudio.Tools.Applications.Hosting.v9.0.dllがインストールされていたが、これは互換性のあるバージョンではありませんでした。
所属していません StackOverflow