「[[マイクロソフト系技術情報 Wiki>http://techinfoofmicrosofttech.osscons.jp/]]」は、「[[Open棟梁Project>https://github.com/OpenTouryoProject/]]」,「[[OSSコンソーシアム .NET開発基盤部会>https://www.osscons.jp/dotNetDevelopmentInfrastructure/]]」によって運営されています。 -[[戻る>MSBuild]] * 目次 [#s9e930b3] #contents *概要 [#meba2b9a] 構築の度に、ハマるのでメモ。 以下のようなエラーが出た場合の対処。 *.csproj(200,3): error MSB4019: インポートされたプロジェクト~ "...\Program Files\MSBuild\Microsoft\VisualStudio\v...\WebApplications\Microsoft.WebApplication.targets" が見つかりませんでした。~ <Import> 宣言のパスが正しいかどうか、およびファイルがディスクに存在しているかどうかを確認してください。 *詳細 [#w78ca1c9] -MSB4019でググると、「WebApplicationsフォルダをコピー」という対応が発見できる。 -確かに --エラーが起きた環境には、~ Visual Studioバージョンに対応するMicrosoft.WebApplication.targetsは存在せず、 --エラーが起きない環境には、~ Visual Studioバージョンに対応するMicrosoft.WebApplication.targetsは存在した。 **WebApplicationsフォルダをコピー [#n4fda0e2] -「WebApplicationsフォルダをコピー」で対応可能。 -以下のWebApplicationsフォルダを、v15.0以下にコピー --C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\WebApplications --C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v15.0\ **Build Tools for Visual Studioを個別にインストール [#ke6e90b9] 通常の「Visual Studio」のインストレーションで上記フォルダがインストールされるとか、~ 「Build Tools for Visual Studio」を個別にインストールすることで解決するとか、~ 情報があり、以下を色々と試してみたが、結論としては解決しなかった。 -以下から、Visual Studio ブートストラップ(vs_buildtools.exe)を取得する。~ https://aka.ms/vs/15/release/vs_buildtools.exe -Visual Studio ブートストラップ(vs_buildtools.exe)を起動してインストール --Visual C++ Build Toolsをチェックし、以下オプションをチェックしてインストール。 ---C++/CLI サポート ---デスクトップ C++ 用 Windows 10 SDK -以下のような方法もあるらしいが、解決しなかった。 --以下のコマンドで、Build Tools for Visual Studioをインストールする。 vs_buildtools.exe --add Microsoft.VisualStudio.Workload.MSBuildTools --quiet *参考 [#if2d66a3] **WebApplicationsフォルダをコピー [#x503f1cc] -MSBuildをコマンドで呼ぶとエラーする。~ MSB4019 Microsoft.WebApplication.targetsが~ 見つかりませんでした | naichilab - Android iOSアプリ開発メモ~ https://naichilab.blogspot.com/2015/03/msbuild-msb4019-microsoftwebapplication.html **Build Tools for Visual Studio [#eebe16eb] -Microsoft.WebApplication.targets references non-existent file after clean install - Developer Community~ https://developercommunity.visualstudio.com/content/problem/56756/microsoftwebapplicationtargets-references-non-exis.html --visual studio 2017 - How can I install the VS2017 version of msbuild on a build server without installing the IDE? - Stack Overflow~ https://stackoverflow.com/questions/42696948 ---Visual Studio のネットワーク ベース インストールを作成する - Visual Studio | Microsoft Docs~ https://docs.microsoft.com/ja-jp/visualstudio/install/create-a-network-installation-of-visual-studio --Windows 10 で Build Tools for Visual Studio 2017 のインストール~ https://www.kunihikokaneko.com/dblab/toolchain/vc15buildtool.html -Visual StudioなしにWindows上でコンパイルする~ https://www.infoq.com/jp/news/2016/12/vsbt **旧情報 [#x157b4d1] -c# - External VS2013 build error "error MSB4019: The imported project <path> was not found" - Stack Overflow~ https://stackoverflow.com/questions/19718281/external-vs2013-build-error-error-msb4019-the-imported-project-path-was-not ---- Tags: [[:テスト]], [[:デバッグ]], [[:デプロイ]], [[:.NET開発]]