Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/elixir/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Msbuild Appharbor无法发布asp.net mvc 4应用程序_Msbuild_Appharbor - Fatal编程技术网

Msbuild Appharbor无法发布asp.net mvc 4应用程序

Msbuild Appharbor无法发布asp.net mvc 4应用程序,msbuild,appharbor,Msbuild,Appharbor,尝试在appharbor上启动我的项目,但失败原因如下: “D:\temp\cijsrn4n.1kq\input\TinyBlogMvc4.sln”(默认目标) (1) -> “D:\temp\cijsrn4n.1kq\input\TinyBlogMvc4\TinyBlogMvc4.csproj”(默认值 目标)(2)->(CopyWebApplicationLegacy目标)-> C:\ProgramFiles(x86)\MSBuild\Microsoft\VisualStudio\v10.0

尝试在appharbor上启动我的项目,但失败原因如下:

“D:\temp\cijsrn4n.1kq\input\TinyBlogMvc4.sln”(默认目标) (1) -> “D:\temp\cijsrn4n.1kq\input\TinyBlogMvc4\TinyBlogMvc4.csproj”(默认值 目标)(2)->(CopyWebApplicationLegacy目标)-> C:\ProgramFiles(x86)\MSBuild\Microsoft\VisualStudio\v10.0\WebApplica tions\Microsoft.WebApplication.targets(178,5):错误MSB3021:无法 将文件“obj\Debug\build.force”复制到“D:\temp\cijsrn4n”。 1kq\output\u PublishedWebsites\TinyBlogMvc4\obj\Debug\build.force”。 找不到路径“obj\Debug\build.force”的一部分。 [D:\temp\cijsrn4n.1kq\input\TinyBlogMvc4\TinyBlogMvc4.csproj] C:\ProgramFiles(x86)\MSBuild\Microsoft\VisualStudio\v10.0\WebApplica tions\Microsoft.WebApplication.targets(178,5):错误MSB3021:无法 复制文件 “obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache”到 “D:\temp\cijsrn4n.1kq\output\u PublishedWebsites\TinyBlogMvc4\obj \Debug\DesignTimeResolveAssemblyReferencesInput.cache”。找不到 道路的一部分 'obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache'。 [D:\temp\cijsrn4n.1kq\input\TinyBlogMvc4\TinyBlogMvc4.csproj]

它建立在我的电脑上很好,你知道我缺少什么吗


.NET Framework版本为4.0

项目文件中的
\u CopyWebApplicationLegacy
目标可能导致问题。如果你不需要它,考虑移除它。或者,您应该修复路径问题。生成的路径似乎无效:
output\u PublishedWebsites
可能应该是
output\\u PublishedWebsites
。在我从头开始创建的项目中,有一些关于如何调试类似的东西的建议,然后比较发现:



我不知道它是如何出现的,但这就是原因。

我也遇到了同样的问题,我从.csproj文件中删除了这些行:

<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" />

我在常见问题解答中找到了构建命令行appharbor正在使用什么,它帮助我在我的开发pc上重新创建了这个问题。问题是,我找不到任何直接指向CopyWebApplicationLegacy目标的引用。如果我试图从命令行生成空的MVC项目,它可以生成,我已经比较了项目文件,没有发现任何可疑的内容。至少对我来说,在
obj
目录上选择“Include in project”会导致Visual Studio添加有问题的行。
<Content Include="obj\Debug\build.force" />
<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" />