AppHarbor生成“无法找到类型或命名空间名称'JQueryUIHelpers'......”

时间:2014-07-09 15:44:53

标签: deployment appharbor

我有一个小的应用程序,在本地工作正常,但部署到AppHarbor时会产生标题中显示的错误..我记得当我第一次安装JqueryUi时在本地遇到一些麻烦,但我认为在我重新启动Visual Studio后解决了或类似的东西..你们中的任何人可能有类似的问题吗?

我在web.config中添加了命名空间:

<namespaces>
        <add namespace="JQueryUIHelpers" />
        <add namespace="System.Web.Mvc" />
        <add namespace="System.Web.Mvc.Ajax" />
        <add namespace="System.Web.Mvc.Html" />.....

这是编译器输出:

C:\Windows\SysWOW64\inetsrv> "C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc.exe" /t:library /utf8output /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Activities\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Activities.dll" /R:"D:\websites\da\7909c\18846\0x0001\_AspNetTemporaryFiles\root\94f6edf5\4b3c4129\assembly\dl3\404eafc3\6006998c_149ccf01\Raven.Client.Lightweight.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Web\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Web.dll" /R:"D:\websites\da\7909c\18846\0x0001\_AspNetTemporaryFiles\root\94f6edf5\4b3c4129\assembly\dl3\7138b32b\3027d28c_149ccf01\System.Web.WebPages.Deployment.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Data.DataSetExtensions\v4.0_4.0.0.0__b77a5c561934e089\System.Data.DataSetExtensions.dll" /R:"D:\websites\da\7909c\18846\0x0001\_AspNetTemporaryFiles\root\94f6edf5\4b3c4129\assembly\dl3\89cd7249\90e55f8c_149ccf01\Microsoft.Owin.Security.Cookies.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ComponentModel.DataAnnotations\v4.0_4.0.0.0__31bf3856ad364e35\System.ComponentModel.DataAnnotations.dll" /R:"D:\websites\da\7909c\18846\0x0001\_AspNetTemporaryFiles\root\94f6edf5\4b3c4129\assembly\dl3\62b95f03\32845d8c_149ccf01\Microsoft.Owin.Host.SystemWeb.dll" /R:"D:\websites\da\7909c\18846\0x0001\_AspNetTemporaryFiles\root\94f6edf5\4b3c4129\assembly\dl3\fb8c6daa\4ca8648c_149ccf01\Microsoft.Owin.Security.Google.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Activation\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Activation.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_32\System.Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.Extensions\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.Extensions.dll" /R:"D:\websites\da\7909c\18846\0x0001\_AspNetTemporaryFiles\root\94f6edf5\4b3c4129\assembly\dl3\20a4533f\32845d8c_149ccf01\Microsoft.Owin.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.CSharp\v4.0_4.0.0.0__b03f5f7f11d50a3a\Microsoft.CSharp.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.WorkflowServices\v4.0_4.0.0.0__31bf3856ad364e35\System.WorkflowServices.dll" /R:"D:\websites\da\7909c\18846\0x0001\_AspNetTemporaryFiles\root\94f6edf5\4b3c4129\assembly\dl3\87b36314\ece9d68c_149ccf01\System.Web.WebPages.Razor.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml.Linq\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.Linq.dll" /R:"D:\websites\da\7909c\18846\0x0001\_AspNetTemporaryFiles\root\94f6edf5\4b3c4129\assembly\dl3\49252b65\70fb858c_149ccf01\Newtonsoft.Json.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Serialization\v4.0_4.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll" /R:"D:\websites\da\7909c\18846\0x0001\_AspNetTemporaryFiles\root\94f6edf5\4b3c4129\assembly\dl3\0d9f6c15\1e26298c_149ccf01\EntityFramework.dll" /R:"D:\websites\da\7909c\18846\0x0001\_AspNetTemporaryFiles\root\94f6edf5\4b3c4129\assembly\dl3\543b1400\76c1588c_149ccf01\Microsoft.AspNet.Identity.EntityFramework.dll" /R:"D:\websites\da\7909c\18846\0x0001\_AspNetTemporaryFiles\root\94f6edf5\4b3c4129\assembly\dl3\589ff20b\8a1f8d8c_149ccf01\Raven.Abstractions.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.DynamicData\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.DynamicData.dll" /R:"D:\websites\da\7909c\18846\0x0001\_AspNetTemporaryFiles\root\94f6edf5\4b3c4129\assembly\dl3\fc957551\ee46628c_149ccf01\Microsoft.Owin.Security.dll" /R:"D:\websites\da\7909c\18846\0x0001\_AspNetTemporaryFiles\root\94f6edf5\4b3c4129\assembly\dl3\9bd44ba8\2cbe8a8c_149ccf01\Owin.dll" /R:"D:\websites\da\7909c\18846\0x0001\_AspNetTemporaryFiles\root\94f6edf5\4b3c4129\assembly\dl3\7e36e868\f2afa98c_149ccf01\System.Web.Helpers.dll" /R:"D:\websites\da\7909c\18846\0x0001\_AspNetTemporaryFiles\root\94f6edf5\4b3c4129\App_global.asax.3cvyzdd5.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel\v4.0_4.0.0.0__b77a5c561934e089\System.ServiceModel.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.IdentityModel\v4.0_4.0.0.0__b77a5c561934e089\System.IdentityModel.dll" /R:"D:\websites\da\7909c\18846\0x0001\_AspNetTemporaryFiles\root\94f6edf5\4b3c4129\assembly\dl3\7a68e581\ae72ae8c_149ccf01\System.Web.Mvc.dll" /R:"D:\websites\da\7909c\18846\0x0001\_AspNetTemporaryFiles\root\94f6edf5\4b3c4129\assembly\dl3\29542930\aa09678c_149ccf01\Microsoft.Owin.Security.MicrosoftAccount.dll" /R:"D:\websites\da\7909c\18846\0x0001\_AspNetTemporaryFiles\root\94f6edf5\4b3c4129\assembly\dl3\53ef68df\1860568c_149ccf01\Microsoft.AspNet.Identity.Core.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.WebPages.Deployment\v4.0_2.0.0.0__31bf3856ad364e35\System.Web.WebPages.Deployment.dll" /R:"D:\websites\da\7909c\18846\0x0001\_AspNetTemporaryFiles\root\94f6edf5\4b3c4129\assembly\dl3\f9bdca0d\4ca8648c_149ccf01\Microsoft.Owin.Security.Facebook.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.Web.Infrastructure\v4.0_1.0.0.0__31bf3856ad364e35\Microsoft.Web.Infrastructure.dll" /R:"D:\websites\da\7909c\18846\0x0001\_AspNetTemporaryFiles\root\94f6edf5\4b3c4129\assembly\dl3\363589e5\66cc6b8c_149ccf01\Microsoft.Owin.Security.Twitter.dll" /R:"D:\websites\da\7909c\18846\0x0001\_AspNetTemporaryFiles\root\94f6edf5\4b3c4129\assembly\dl3\83282a8f\086b698c_149ccf01\Microsoft.Owin.Security.OAuth.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Activities\v4.0_4.0.0.0__31bf3856ad364e35\System.Activities.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll" /R:"D:\websites\da\7909c\18846\0x0001\_AspNetTemporaryFiles\root\94f6edf5\4b3c4129\assembly\dl3\314d6807\b6950c8c_149ccf01\aPhoto_web.dll" /R:"D:\websites\da\7909c\18846\0x0001\_AspNetTemporaryFiles\root\94f6edf5\4b3c4129\assembly\dl3\6edf7fb4\26f8b78c_149ccf01\System.Web.Optimization.dll" /R:"D:\websites\da\7909c\18846\0x0001\_AspNetTemporaryFiles\root\94f6edf5\4b3c4129\assembly\dl3\3005cea1\8e88d48c_149ccf01\System.Web.WebPages.dll" /R:"D:\websites\da\7909c\18846\0x0001\_AspNetTemporaryFiles\root\94f6edf5\4b3c4129\assembly\dl3\5092a3eb\401cbf8c_149ccf01\System.Web.Razor.dll" /R:"D:\websites\da\7909c\18846\0x0001\_AspNetTemporaryFiles\root\94f6edf5\4b3c4129\assembly\dl3\593a6b71\58340a8c_149ccf01\Antlr3.Runtime.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.ApplicationServices\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.ApplicationServices.dll" /R:"D:\websites\da\7909c\18846\0x0001\_AspNetTemporaryFiles\root\94f6edf5\4b3c4129\assembly\dl3\f2b6764b\6c923e8c_149ccf01\EntityFramework.SqlServer.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_32\System.EnterpriseServices\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll" /R:"D:\websites\da\7909c\18846\0x0001\_AspNetTemporaryFiles\root\94f6edf5\4b3c4129\assembly\dl3\a41d28a0\646fe08c_149ccf01\WebGrease.dll" /R:"D:\websites\da\7909c\18846\0x0001\_AspNetTemporaryFiles\root\94f6edf5\4b3c4129\assembly\dl3\e9e2f7aa\d4225b8c_149ccf01\Microsoft.AspNet.Identity.Owin.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.WebPages.Deployment\v4.0_1.0.0.0__31bf3856ad364e35\System.Web.WebPages.Deployment.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_32\System.Web\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Web.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.Services\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll" /out:"D:\websites\da\7909c\18846\0x0001\_AspNetTemporaryFiles\root\94f6edf5\4b3c4129\App_Web_index.cshtml.a8d08dba.r8ksypcy.dll" /D:DEBUG /debug+ /optimize- /w:4 /nowarn:1659;1699;1701;612;618 /warnaserror-  "D:\websites\da\7909c\18846\0x0001\_AspNetTemporaryFiles\root\94f6edf5\4b3c4129\App_Web_index.cshtml.a8d08dba.r8ksypcy.0.cs" "D:\websites\da\7909c\18846\0x0001\_AspNetTemporaryFiles\root\94f6edf5\4b3c4129\App_Web_index.cshtml.a8d08dba.r8ksypcy.1.cs"


    Microsoft (R) Visual C# Compiler version 4.0.30319.18408

    for Microsoft (R) .NET Framework 4.5
    Copyright (C) Microsoft Corporation. All rights reserved.

    d:\websites\da\7909c\18846\0x0001\_aspnettemporaryfiles\root\94f6edf5\4b3c4129\App_Web_index.cshtml.a8d08dba.r8ksypcy.0.cs(23,11): error CS0246: The type or namespace name 'JQueryUIHelpers' could not be found (are you missing a using directive or an assembly reference?)

1 个答案:

答案 0 :(得分:0)

显然 JqueryUI 针对的是 .NetFrameWork 错误版本

解决方案是在Web应用程序中更改目标.NET框架版本。为此,

  1. 右键单击项目
  2. 点击属性。
  3. 单击左侧的应用程序选项卡(如果尚未选择)
  4. 从下拉菜单中选择正确的目标.NET框架。
  5. <强> P.S: 这个答案最初由OP发布,在问题本身中。我只是将其作为答案发布,因为我也遇到了同样的问题并以这种方式解决了。