タイトルのメッセージが表示され、Nugetパッケージの復元をするもビルドできなくなる現象が発生した まれにプロジェクト情報が壊れることがあるらしい
Visual Studio2015で作成したプロジェクトを2019で開いたことが原因?
自分の場合は、下記のA/B/C行を削除したらビルドできるようになった
<?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Import Project="hogehoge" /> <!-- A:使用していないプロジェクト --> <Import Project="fugafuga" /> <!-- 省略 --> <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> <PropertyGroup> <ErrorText>このプロジェクトは、このコンピューター上にない NuGet パッケージを参照しています。それらのパッケージをダウンロードするには、[NuGet パッケージの復元] を使用します。詳細については、http://go.microsoft.com/fwlink/?LinkID=322105 を参照してください。見つからないファイルは {0} です。</ErrorText> <!-- B --> </PropertyGroup> <Error Condition="hogehoge" /> <!-- C --> </Target> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project>