从VS2012 RC部署我的ASP.NET MVC 3应用程序时,我不断收到以下错误。我猜测我的代码中的某些内容是不正确的,但是,我无法从错误信息中确定问题代码所在的位置。此代码建立在我的家庭和工作PC上。任何帮助?
d:\temp\zb5bedyk.2dr\temp\root\6b14f900\b1889a38\App_Web_nrwr2tuj.0.cs(37): error CS1041: Identifier expected; 'long' is a keyword
d:\temp\zb5bedyk.2dr\temp\root\6b14f900\b1889a38\App_Web_nrwr2tuj.0.cs(37): error CS1519: Invalid token '>' in class, struct, or interface member declaration
[HttpCompileException]: d:\temp\zb5bedyk.2dr\temp\root\6b14f900\b1889a38\App_Web_nrwr2tuj.0.cs(37): error CS1041: Identifier expected; 'long' is a keyword
at System.Web.Compilation.AssemblyBuilder.Compile()
at System.Web.Compilation.WebDirectoryBatchCompiler.CompileAssemblyBuilder(AssemblyBuilder builder)
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.PrecompileWebDirectoriesRecursive(VirtualDirectory vdir, Boolean topLevel)
at System.Web.Compilation.BuildManager.PrecompileAppInternal(VirtualPath startingVirtualDir)
at System.Web.Compilation.BuildManager.PrecompileApp(VirtualPath startingVirtualDir)
at System.Web.Compilation.BuildManager.PrecompileApp(ClientBuildManagerCallback callback)
at System.Web.Compilation.BuildManagerHost.PrecompileApp(ClientBuildManagerCallback callback)
at System.Web.Compilation.BuildManagerHost.PrecompileApp(ClientBuildManagerCallback callback)
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)
An error occurred during the website precompile. Precompilation failed with exit code 1
答案 0 :(得分:0)
如果您不需要,可以选择在应用程序设置中禁用预编译。
另请注意,AppHarbor基础架构上尚未安装.NET 4.5(很快就会安装),因此您可能需要将项目投射到4.0。