问题
Trying to launch my project on appharbor and it fails with this:
"D:\temp\cijsrn4n.1kq\input\TinyBlogMvc4.sln" (default target) (1) -> "D:\temp\cijsrn4n.1kq\input\TinyBlogMvc4\TinyBlogMvc4.csproj" (default target) (2) -> (_CopyWebApplicationLegacy target) -> C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\WebApplica tions\Microsoft.WebApplication.targets(178,5): error MSB3021: Unable to copy file "obj\Debug\build.force" to "D:\temp\cijsrn4n. 1kq\output_PublishedWebsites\TinyBlogMvc4\obj\Debug\build.force". Could not find a part of the path 'obj\Debug\build.force'. [D:\temp\cijsrn4n.1kq\input\TinyBlogMvc4\TinyBlogMvc4.csproj] C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\WebApplica tions\Microsoft.WebApplication.targets(178,5): error MSB3021: Unable to copy file "obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache" to "D:\temp\cijsrn4n. 1kq\output_PublishedWebsites\TinyBlogMvc4\obj \Debug\DesignTimeResolveAssemblyReferencesInput.cache". Could not find a part of the path 'obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache'. [D:\temp\cijsrn4n. 1kq\input\TinyBlogMvc4\TinyBlogMvc4.csproj]
0 Warning(s) 2 Error(s)
It builds on my pc just fine, any ideas what I'm missing?
.NET Framework version is 4.0
回答1:
I've created project from scratch and then compared and found this:
<Content Include="obj\Debug\build.force" />
How it appeared there, have no idea, but that was the reason.
回答2:
I had the same problem and I solved removed from the .csproj file these rows:
<Content Include="obj\Debug\AqAUI.csproj.FileListAbsolute.txt" />
<Content Include="obj\Debug\AqAUI.csprojResolveAssemblyReference.cache" />
<Content Include="obj\Debug\build.force" />
<Content Include="obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache" />
回答3:
It looks like the _CopyWebApplicationLegacy
target in your project file is causing problems. If you don't need it, consider removing it. Alternatively, you should fix the path issue. It looks like an invalid path is generated: output_PublishedWebsites
should probably be output\_PublishedWebsites
. There are suggestions on how to debug stuff like this in the FAQ
来源:https://stackoverflow.com/questions/11953741/appharbor-fails-to-publish-asp-net-mvc-4-application