App.config is not deployed to Windows Azure with VisualStudio Online

I am using Visual Studio Online to deploy my project to Windows Azure automatically. Really the steps to configure the integration between Visual Studio Online and Azure are very easy but after the first deployment I realized one of the worker role was recycling continuously.

The first test to do was to deploy a version from Visual Studio 2013 by pushing a package manually. I can check the application is working perfectly and the worker role doesn’t have any issue on the deployment.

I thought it might be any issue with any nuget’s package so editing the .csproj file I realized that I had the following reference:
<Import Project=”..packagesMicrosoft.Bcl.Build.1.0.13toolsMicrosoft.Bcl.Build.targets” Condition=”Exists(‘..packagesMicrosoft.Bcl.Build.1.0.13toolsMicrosoft.Bcl.Build.targets’)” /> <Target Name=”EnsureBclBuildImported” BeforeTargets=”BeforeBuild” Condition=”‘$(BclBuildImported)'” == “”> <Error Condition=”!Exists(‘..packagesMicrosoft.Bcl.Build.1.0.13toolsMicrosoft.Bcl.Build.targets’)” Text=”This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=317567.” HelpKeyword=”BCLBUILD2001″ /> <Error Condition=”Exists(‘..packagesMicrosoft.Bcl.Build.1.0.13toolsMicrosoft.Bcl.Build.targets’)” Text=”The build restored NuGet packages. Build the project again to include these packages in the build. For more information, see http://go.microsoft.com/fwlink/?LinkID=317568.” HelpKeyword=”BCLBUILD2002″ /> </Target>
I have removed these lines and the worker role is deployed with no errors.

Note: If you update Bcl.Build via Nuget, it will also update your project file and the following will need to be done again.

Microsoft has wrote about this as well:

http://blogs.msdn.com/b/dotnet/archive/2013/06/12/nuget-package-restore-issues.aspx

Good coding.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>