Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 671
achekh Avatar asked Nov 23 '11 15:11

achekh


People also ask

How do I use Azure compute emulator?

Using Emulator Express in Visual StudioIn Solution Explorer, right-click the project, and, from the context menu, select Properties. In the projects properties pages, select the Web tab. Under Local Development Server, select Use IIS Express option. Under Emulator, select Use Emulator Express.

What is Windows Azure compute emulator?

Compute Emulator and Storage Emulator are the two tools Microsoft provides to developers to develop and execute cloud applications on local desktop. These tolls are part of the Windows Azure SDK.


2 Answers

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.

like image 76
achekh Avatar answered Nov 12 '22 03:11

achekh


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

/t:Publish /p:PublishDir=\\\mydroplocation\cloudpackage\
like image 24
Paul Yuknewicz - MS Avatar answered Nov 12 '22 04:11

Paul Yuknewicz - MS