質問

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?

役に立ちましたか?

解決

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.

他のヒント

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

/t:Publish /p:PublishDir=\\\mydroplocation\cloudpackage\
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top