0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

「中央ディレクトリが壊れています」という意味不明なエラーが出たときの対処方法

Posted at

「中央ディレクトリが壊れています」という意味不明なエラーが出たときの対処方法

C# のプロジェクトをビルドしている途中で以下のようなエラーが出た場合の対処方法です.

C:\xxx\.nuget\NuGet.targets(100,9): error : 中央ディレクトリが壊れています。 [C:\xxx\yyy\zzz.csproj]
C:\xxx\.nuget\NuGet.targets(100,9): error :   ファイルの先頭よりも前にファイル ポインターを移動しようとしました。 [C:\xxx\yyy\zzz.csproj]
C:\xxx\.nuget\NuGet.targets(100,9): error MSB3073: コマンド ""C:\xxx\.nuget\NuGet.exe" install "C:\xxx\yyy\packages.config" -source ""  -NonInteractive -RequireConsent -solutionDir "C:\xxx\ "" はコード 1 で終了しました。 [C:\xxx\yyy\zzz.csproj]

おそらく0バイトの .nupkg ファイルが出来ているので、ソリューションの中の packages フォルダを削除して、再取得させましょう.

中央ディレクトリとは、zip 形式の central directory のことです.

0
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
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?