I also bumped to this problem. I was receiving the following error, when trying to publish MVCForum 1.7:
Copying file App_DataNuGetBackupHello.txt to objReleasePackagePackageTmpApp_DataNuGetBackupHello.txt failed. Could not find file 'App_DataNuGetBackupHello.txt'.
Fran?ois Breton's comment helped me achieve the solution.
It's simple:
Open your .csproj
file with a text editor (Notepad, Notepad++) Visual Studio will open it as a project.
Press Ctrl
+ F
and search for the file of the problem. In my case the file was "Hello.txt" without commas.
Under the <ItemGroup>
it resided:
<ItemGroup>
<Content Include="App_DataNuGetBackupHello.txt" />
<Content Include="ContentadminAdmin.css">
<DependentUpon>Admin.scss</DependentUpon>
</Content>
...More code omitted due to brevity.
I deleted the <Content Include="App_DataNuGetBackupHello.txt" />
line, and voila! Visual Studio allowed me to Preview before publishing!
It will end like this:
<ItemGroup>
<Content Include="ContentadminAdmin.css">
<DependentUpon>Admin.scss</DependentUpon>
</Content>
...More code omitted due to brevity.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…