Azure发布或包失败,没有错误

本文关键字:失败 有错误 包失败 Azure | 更新日期: 2023-09-27 18:06:50

我正在尝试将我们的webrole发布或打包到Azure中,从SDK 2.5迁移到2.7(2.5工作正常,即使我不确定它是否相关)。这是我从输出窗口中的构建中得到的错误:

3>------ Build started: Project: MyProject.Azure, Configuration: Production Any CPU ------
4>------ Publish started: Project: MyProject.Azure, Configuration: Production Any CPU ------
4>C:'Program Files (x86)'MSBuild'12.0'bin'Microsoft.Common.CurrentVersion.targets(1697,5): warning MSB3270: There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "msshrtmi, Version=2.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=AMD64", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.
4>      Transformed Web.config using E:'Legacy'Main'Azure'MyProject.Front'Web.Production.config into obj'Production'TransformWebConfig'transformed'Web.config.
4>Done building project "MyProject.Azure.ccproj" -- FAILED.
4>
4>Build FAILED.
========== Build: 3 succeeded, 0 failed, 25 up-to-date, 0 skipped ==========
========== Publish: 0 succeeded, 1 failed, 0 skipped ==========

我已经搜索了一个答案,并提出了这个链接http://blogs.msdn.com/b/narahari/archive/2012/03/30/windows-azure-package-creation-or-publish-fails-with-build-failed-message-in-visual-studio-output-window.aspx他们说这可能是由OutOfMemoryException引起的,修复方法是在高端x64系统上构建。我用的是i7 16g的内存,非常好的电脑,所以我不认为它来自于这个。为了以防万一,我还安装了windows 7热修复程序,修复了largeaddressaware switch的模拟器问题,但它没有帮助。谢谢你

Azure发布或包失败,没有错误

好的,我设法解决了这个问题,下面是如何解决的。实际上,这个问题与诊断配置有关——即使完全不明显。我所做的是增加MSBuild输出的冗长性:

Tools > Options > Projects and Solutions > Build and Run > MSBuild project build output verbosity : Diagnostic

发现了这个:

Failed to produce diagnostics extension's config for MyProject.Azure'diagnostics.wadcfgx. 
Error : Value cannot be null. Parameter name: input

然后,修正是添加:

<Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString"/>

在你的ServiceDefinition。Csdef和CSFGS文件中的正确实现。在此之后,它将进行构建、打包和发布。

现在,我不确定这个问题是否是Azure SDK v2.7诊断问题的重复,因为在链接的帖子中问题的标题已经向前迈出了一步,并且在这个问题和Azure诊断配置之间建立联系真的不那么明显,给定visual studio的默认最小输出。

谢谢大家