0

将文件上传到时出现以下错误AppHarbor

    [HttpCompileException]: d:\temp\f3fkwz4z.mbc\temp\root\0c956e8e\9304c5fb\App_Web_ixu4pbnj.0.cs(43): error CS1009: Unrecognized escape sequence
   at System.Web.Compilation.AssemblyBuilder.Compile()
   at System.Web.Compilation.WebDirectoryBatchCompiler.CompileAssemblyBuilder(AssemblyBuilder builder)
   at System.Web.Compilation.WebDirectoryBatchCompiler.<CompileNonDependentBuildProviders>b__0(AssemblyBuilder assemblyBuilder)
   at System.Web.Compilation.CompilationUtil.CompileParallel(ICollection assemblyBuilders, Action`1 action)
   at System.Web.Compilation.WebDirectoryBatchCompiler.CompileNonDependentBuildProviders(ICollection buildProviders)
   at System.Web.Compilation.WebDirectoryBatchCompiler.Process()
   at System.Web.Compilation.BuildManager.BatchCompileWebDirectoryInternal(VirtualDirectory vdir, Boolean ignoreErrors)
   at System.Web.Compilation.BuildManager.BatchCompileWebDirectory(VirtualDirectory vdir, VirtualPath virtualDir, Boolean ignoreErrors)
   at System.Web.Compilation.BuildManager.PrecompileWebDirectoriesRecursive(VirtualDirectory vdir, Boolean topLevel)
   at System.Web.Compilation.BuildManager.PrecompileWebDirectoriesRecursive(VirtualDirectory vdir, Boolean topLevel)
   at System.Web.Compilation.BuildManager.PrecompileWebDirectoriesRecursive(VirtualDirectory vdir, Boolean topLevel)
   at System.Web.Compilation.BuildManager.PrecompileAppInternal(VirtualPath startingVirtualDir, IEnumerable`1 excludedVirtualPaths)
   at System.Web.Compilation.BuildManager.PrecompileApp(VirtualPath startingVirtualDir, IEnumerable`1 excludedVirtualPaths)
   at System.Web.Compilation.BuildManager.PrecompileApp(ClientBuildManagerCallback callback, IEnumerable`1 excludedVirtualPaths)
   at System.Web.Compilation.BuildManagerHost.PrecompileApp(ClientBuildManagerCallback callback, List`1 excludedVirtualPaths)
   at System.Web.Compilation.BuildManagerHost.PrecompileApp(ClientBuildManagerCallback callback, List`1 excludedVirtualPaths)
   at System.Web.Compilation.ClientBuildManager.PrecompileApplication(ClientBuildManagerCallback callback, Boolean forceCleanBuild)
   at System.Web.Compilation.ClientBuildManager.PrecompileApplication(ClientBuildManagerCallback callback)
   at System.Web.Compilation.Precompiler.Main(String[] args)

虽然我的项目中不存在这样的文件,但它是 我不明白错误来自哪里的Asp.Net MVC4项目EntityFramework

4

1 回答 1

1

您看到的那个奇怪的文件名是 AppHarbor 在您部署时编译您的 cshtml/vbhtml 文件。这些文件中的任何错误(错误的模型属性调用,甚至错误的 HTML)都可能导致这些文件的构建失败并提供一些非常神秘的错误。

尝试将 MvcBuildViews 属性设置为 true(这是通过 Phil Haack 执行此操作的方法),看看您是否可以使用 Visual Studio 来帮助本地化和纠正错误。

于 2013-11-05T06:17:42.260 回答