2012-08-13 60 views
2

當從VS2012 RC部署我的ASP.NET MVC 3應用程序時,我不斷收到下面的錯誤。我猜我的代碼中的某些內容不正確,但是,我無法從錯誤信息確定問題代碼所在的位置。此代碼建立在我的家庭和工作電腦上。任何幫助?模糊的預編譯錯誤

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

如果您不需要它,您可以選擇在應用程序設置中禁用預編譯。

另請注意,.NET 4.5尚未安裝在AppHarbor基礎結構上(即將推出),因此您可能需要將項目降至4.0。

+0

感謝您的回覆。該應用程序是.NET 4.0。我會嘗試禁用預編譯,但它已經通過在我的視圖中找到幾個錯誤而保存了我。我會在本地機器上嘗試更多的測試。我不打算再活一週。再次感謝。 – Paul 2012-08-13 05:16:24