How to run application in azure emulator in development mode without visual studio
Asked Answered
I

2

8

I need to involve some markup and javascript people to help development team on azure asp.net MVC project.

Essentially what I need is for each person to run a local instance of the azure application to be able to make changes to content files (chtml/css/js) and test/debug them, just like if it's started in VisualStudio (Ctrl+F5).

While it's easy to provide source code to all parties so that each person has its own working copy - we use svn, I came across an issue with running local copy of the application in dev fabric.

I don't want to install Visual Studio for everybody because it's time consuming, and too expensive just for the purpose of starting up dev fabric. These people don't use VisualStudio for html/css/js. And all the tools necessary available using SDKs: MSBuild, Azure, WIF, whatever.

I even managed to run dev fabric with the application using

MSBuild.exe Azure\Azure.ccproj /t:Publish
CSRun.exe Azure\csx\Debug Azure\bin\Debug\ServiceConfiguration.cscfg

Everything works well except of one thing - the content files are all copied under Azure\obj\Debug\WebRole folder together with all binary files.

This is different from the VisualStudio build - there the folder contains only binary files, while content files remain on their places. This is much more convenient way of making changes because files not only immediately available for debug once saved, but can also be easily checked-in/out from source control.

I reviewed CSPack reference and for sure it should allow scenario I want, but it's difficult to figure out how to achieve it. I suspect there must be a way of making such deployment using MSBuild (as long is VisualStudio heavily relies on it for all building/deployment actions), but I can't seem to find a way of telling it what I want.

Does anybody know either proper way of running CSPack to repeat VisualStudio debug deployment scenario, or proper target/parameters for MSBuild to run azure project the same way VisualStudio does?

Maybe there's a way to peek the actual command line executed inside of the VisualStudio build?

Instanter answered 23/11, 2011 at 15:51 Comment(2)
Feels like a to heavyweight environment for just markup/css/content. It might be easier to have a separate project with just what they need and then integrate their work with the rest offline (or in the build server). My 0.02.Cristiecristin
I agree. If it's just a web site you're working with there's no reason why it has to run in the emulator. If it's talking to storage then you can point them at Azure rather than dev storage and there are work arounds for just about all other dependencies.Algae
I
4

Ok, after few hours of digging into Microsoft.WindowsAzure.targets and some additional dancing with tambourine I found the magic switches:

MSBuild.exe Azure\Azure.ccproj /p:PackageForComputeEmulator=true /p:PackageWebRole=False

This packages application just like VisualStudio does. Note, the azure build logic distinguishes targets Build and Publish and applies different rules depending on whether one, another or both have been specified. For my scenario it must have been Build (the default) only.

Instanter answered 24/11, 2011 at 0:18 Comment(0)
L
2

Alternatively have you tried passing the p:PublishDir=Directory in your orginal msbuild argument example, e.g.:

/t:Publish /p:PublishDir=\\\mydroplocation\cloudpackage\
Linda answered 8/1, 2012 at 1:59 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.