Visual Studio 2015 Cordova Project includes customization and production files

I am using Visual Studio 2015 Cordova to connect to Azure Mobile Services. I'm setting up the "staging" and "production" of the Mobile Service,

ex:

https://mystaging.azuremobileservices.net  

https://myproduction.azuremobileservices.net

      

and I am using the following code in staging deployment

var client = new WindowsAzure.MobileServiceClient('https://mystaging.azuremobileservices.net', 'mykey');

// var client = new WindowsAzure.MobileServiceClient('https://myproduction.azuremobileservices.net', 'mykey');

      

and the following for production deployment

// var client = new WindowsAzure.MobileServiceClient('https://mystaging.azuremobileservices.net', 'mykey');

var client = new WindowsAzure.MobileServiceClient('https://myproduction.azuremobileservices.net', 'mykey');

      

Do I have to manually comment and uncomment the code to have a different deployment configuration?

I can't find where to set up the test / staging / production configuration in a Visual Studio 2015 RC Cordova project.

Can anyone suggest any suggestion for this configuration management in VS2015 Cordova?

Many thanks.

+3


source to share





All Articles