1

I'd like to modify my source code of asp.net project directly in the virtual os on Azure platform, but I cannot find the C# files.

Can anyone help?

Nelson
  • 49,283
  • 8
  • 68
  • 81

2 Answers2

4

The cs code-behinds are compiled into bin\appname.dll when you publish to Azure, you can't edit them "live." Any edits will be overwirtten anyway if the instance recycles.

hollystyles
  • 4,979
  • 2
  • 36
  • 38
  • It depends how big your app is and how good your connection is. Definitely need to test thoroughly before deployment to production :) – hollystyles Sep 17 '12 at 10:22
  • I don't know how to figure out the different database in my computer and the VM. The connection string used in the VM will cause problems when I test in my computer. – Jervis.Qian Sep 17 '12 at 10:29
  • @user1677233: You'll have to write code that will use the right connection string depending on whether the code is running on Azure. – sharptooth Sep 17 '12 at 10:36
  • @user1677233: http://stackoverflow.com/questions/4224040/visual-studio-2010-can-apply-debug-or-release-transformations-to-web-config-but/4226683#4226683 – hollystyles Sep 17 '12 at 10:42
2

The code is all compiled up before it is deployed. It needs to do this for many reasons, not least of which is to make sure everything that you need to run the code, is included with it.

Also - if your instance gets recycled, any changes you make to an instance of a virtual machine will be lost.

Deploying takes ages (like 20-30 minutes or so after everything is compiled), but it's the only way you can guarantee that all instances are running the right version of the code, since the deployed VM will be run as-is every time an instance starts or cycles.

Scott Earle
  • 660
  • 9
  • 21