我刚刚将我的 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
同样,该解决方案在调试中构建良好,我查看了配置管理器和调试/发布配置是相同的