Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure Publish or Package fails without errors

I am trying to publish or package our webrole into Azure, after migrating from SDK 2.5 to 2.7 (2.5 was working fine even though I am not sure if it is related). This is the error I have from the Build in the Output window :

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 ==========

I have searched for an anwer and came up with this link 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 where they state that it could be due to an OutOfMemoryException, and the fix is to build on a high end x64 system. I'm building on a core i7 16gig of ram really good computer so I don't think it comes from this. I also installed the windows 7 hotfix that fixes the emulator issue from largeaddressaware switch just in case but it did not help. Thank you

like image 682
lxnt Avatar asked Aug 06 '15 10:08

lxnt


People also ask

How do I find errors of failed deployments?

Azure Resource Manager enables you to view your deployment history. You can examine specific operations in past deployments and see which resources were deployed. This history contains information about any errors.

How do I publish my Azure service?

If you have an Azure cloud service project: Create or open an Azure cloud service project in Visual Studio. In Solution Explorer, right-click the project, and, from the context menu, select Publish.


1 Answers

Ok, I managed to solve the problem and here is how. Actually, the issue is -even if totally not obvious- related to the diagnostics configuration. What I did is increase verbosity for MSBuild output :

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

which uncovered this :

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

Then, the fix is to add :

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

in your ServiceDefinition.csdef and the correct implementations in your csfgs files. After this, it all builds, packages and publishes.

Now, I am not sure if this question is a duplicate of Azure SDK v2.7 diagnostics issue is preventing publish/package because the title of the question in the link's post is already a step forward, and making the connection between this issue and the azure diagnostic configuration is really not that obvious, given visual studio's default minimal output.

Thanks everyone

like image 95
lxnt Avatar answered Nov 15 '22 15:11

lxnt