私もこの問題にぶつかりました。MVCForum 1.7 を公開しようとすると、次のエラーが表示されました。
ファイル App_Data\NuGetBackup\Hello.txt を obj\Release\Package\PackageTmp\App_Data\NuGetBackup\Hello.txt にコピーできませんでした。ファイル 'App_Data\NuGetBackup\Hello.txt' が見つかりませんでした。
François Breton のコメントは、解決策を達成するのに役立ちました。
それは簡単です:
ファイルをテキスト エディター (メモ.csproj
帳、メモ帳++) で開きます。Visual Studio はファイルをプロジェクトとして開きます。
Ctrl
+を押しF
て、問題のファイルを検索します。私の場合、ファイルはコンマなしの「Hello.txt」でした。
それが存在するの下<ItemGroup>
に:
<ItemGroup>
<Content Include="App_Data\NuGetBackup\Hello.txt" />
<Content Include="Content\admin\Admin.css">
<DependentUpon>Admin.scss</DependentUpon>
</Content>
...More code omitted due to brevity.
私は行を削除しました<Content Include="App_Data\NuGetBackup\Hello.txt" />
、そして出来上がり!Visual Studio では、公開前にプレビューできました。
次のように終了します。
<ItemGroup>
<Content Include="Content\admin\Admin.css">
<DependentUpon>Admin.scss</DependentUpon>
</Content>
...More code omitted due to brevity.