【问题标题】:Azure packaging failed - Missing assemblies - Root: Solution fails to build in releaseAzure 打包失败 - 缺少程序集 - 根:解决方案无法在发布中构建
【发布时间】:2013-01-31 16:12:45
【问题描述】:

我刚刚将我的 MVC 应用程序移植到 Azure,将其添加为 Web 角色,但无法打包 Azure 项目。

它抱怨我位于解决方案文件夹中的解决方案中的工作流项目缺少程序集:

Application (Solution)
    | Application.Workflows (Solution Folder)
         | Application.Workflows.Registration (Workflow Project)
    | Application.Azure (Cloud Service Project)
    | Application.Web (MVC project)

在首先确保相关程序集将Copy Local 设置为true 之后,我深入挖掘发现我无法在发布模式下构建Application.Workflows.Registration 项目,这是我尝试将解决方案打包的模式。(调试构建工作正常。)

Warning Could not resolve this reference. Could not locate the assembly "Application.DataAccess" (SAME FOR Application.EntityModel). Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.    

该警告会导致大量此类错误:

Error The type or namespace name 'DataAccess' does not exist in the namespace 'Application' (are you missing an assembly reference?)    C:\Source Control\Application\Application.Workflows.Registration\Membership.cs

同样,该解决方案在调试中构建良好,我查看了配置管理器,调试/发布配置是相同的

【问题讨论】:

    标签: visual-studio-2012 solution release-builds azure-packaging


    【解决方案1】:

    好的,我解决了这个问题。

    它抱怨的两个程序集被 bin/Debug 引用,即使是发布版本。我必须重新添加选择了“发布”配置的两个程序集,以便从 bin/Release 中引用它们

    【讨论】:

    • 完全相同的问题,但不同的解决方案。我不得不从第一个失败的项目中手动删除 packages.config 文件,并使用包管理器控制台重新安装引用。我遇到了 EntityFramework 的问题。 +1 提示,这对我有一点帮助。
    猜你喜欢
    • 2019-01-02
    • 1970-01-01
    • 2015-10-20
    • 1970-01-01
    • 1970-01-01
    • 2022-01-23
    • 1970-01-01
    • 2015-05-15
    • 1970-01-01
    相关资源
    最近更新 更多