LoginSignup
2
1

More than 1 year has passed since last update.

Visual Studio2019からVisual Studio2022に移行したら"NETSDK1004"が吐かれてビルドが通らなくなった話

Last updated at Posted at 2022-01-02

これまで、MSBuildを使ってVSCode上でビルドできるようにしていた。
しかし、PCを新調してVisual Studio2022に移行した結果タイトルのようなエラーが出た。

エラー内容

terminal
 error NETSDK1004: 資産ファイル ~~\project.assets.json' が見つかりません。NuGet パッ 
ケージの復元を実行して、このファイルを生成してください。

原因

NuGetパッケージを復元する必要があった模様。

どうすればいいのか

プロジェクトのslnファイルがあるディレクトリで

terminal
dotnet restore

と実行したら解決された。

参考

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1