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

时间:2015-08-06 10:12:10

标签: c# azure visual-studio-2013

我尝试将我们的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 ==========

我搜索了一个anwer并想出了这个链接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 16gig ram非常好的计算机,所以我不认为它来自于此。我还安装了Windows 7修复程序,以防万一,以防万一,但它没有帮助修复来自largeaddressaware开关的模拟器问题。 谢谢

1 个答案:

答案 0 :(得分:15)

好的,我设法解决了问题,这是如何解决的。 实际上,问题是 - 即使完全不明显 - 与诊断配置有关。 我所做的是增加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 diagnostics issue is preventing publish/package重复,因为链接帖子中问题的标题已经向前迈出了一步,并将此问题与鉴于visual studio的默认最小输出,azure诊断配置确实不那么明显。

谢谢大家