<rss xmlns:a10="http://www.w3.org/2005/Atom" version="2.0"><channel xml:base="http://blog.jimmychandra.com/"><title>Incoherent Rambling</title><description>Latest blog posts</description><a10:link href="http://blog.jimmychandra.com/" /><item><guid isPermaLink="true">http://blog.jimmychandra.com/post/can-you-have-multiple-version-of-javascript-package-running-side-by-side-if-you-are-using-modern-web-package-manager-tool</guid><link>http://blog.jimmychandra.com/post/can-you-have-multiple-version-of-javascript-package-running-side-by-side-if-you-are-using-modern-web-package-manager-tool</link><a10:author><a10:name /></a10:author><title>Can You Have Multiple Version of JavaScript Package Running Side-By-Side If You Are Using “Modern” Web Package Manager Tool?</title><description>&lt;h3&gt;The Problem&lt;/h3&gt; &lt;p&gt;Recently, at work, we ran into an issue where a particular package update (angular-bootstrap) broke one of our crucial features.  Apparently, as mentioned here: &lt;a title="https://github.com/angular-ui/bootstrap/wiki/Migration-guide-for-prefixes" href="https://github.com/angular-ui/bootstrap/wiki/Migration-guide-for-prefixes"&gt;https://github.com/angular-ui/bootstrap/wiki/Migration-guide-for-prefixes&lt;/a&gt;, the newer version (since 0.14.0) requires the directive selector to be prefixed with “&lt;font face="Courier New"&gt;uib-&lt;/font&gt;“. &lt;/p&gt; &lt;h3&gt;Potential Solutions&lt;/h3&gt; &lt;p&gt;So, there are some solutions / options here:&lt;/p&gt; &lt;h5&gt;Option 1&lt;/h5&gt; &lt;p&gt;Completely fall back to version 0.13.4 to avoid the prefixing.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Advantage:&lt;/strong&gt; there is very little new code that depends on the newer version where everything is prefixed with “&lt;font face="Courier New"&gt;uib-&lt;/font&gt;“.  So there is really minimal rework to be done to fix this issue.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Disadvantage:&lt;/strong&gt; This locks any new development on the same project to version 0.13.4 and if anything new added afterward, we will not be able to take advantage of that.&lt;/p&gt; &lt;h5&gt;Option 2&lt;/h5&gt; &lt;p&gt;Upgrade the crucial feature to the latest version (i.e. 1.3.3).&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Advantage:&lt;/strong&gt; If anything new implemented in the package, we can take advantage of it.   Latest and greatest, yes!&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Disadvantage: &lt;/strong&gt;You are basically on the upgrade train forever.  Tons of rework and retesting to make sure that legacy code is always working going forward.&lt;/p&gt; &lt;h5&gt;Option 3&lt;/h5&gt; &lt;p&gt;Somehow allow multiple version of the library to be used side-by-side&lt;/p&gt; &lt;p&gt;&lt;b&gt;Advantage:&lt;/b&gt; No major rework need to be done on the crucial feature.  It can stay happy at version 0.13.4.  New custom components / features can be on a newer version of the library (i.e. 1.3.3).  Good isolation.&lt;/p&gt; &lt;p&gt;&lt;b&gt;Disadvantage:&lt;/b&gt; Eh…. &lt;i&gt;*thinking*… *more thinking*&lt;/i&gt;…. nothing… &lt;i&gt;(Well this is not true, we will still need to retouch the crucial feature where we are importing this component since the alias will change in the require / import statements)&lt;/i&gt;&lt;/p&gt; &lt;p&gt;Option 3 is definitely the clear winner here, but the question is … HOW?&lt;/p&gt; &lt;p&gt;So, I’ve looked at the different package managers that come to mind, which are:&lt;/p&gt; &lt;ol&gt; &lt;li&gt;NPM&lt;/li&gt; &lt;li&gt;JSPM&lt;/li&gt; &lt;li&gt;Webpack&lt;/li&gt;&lt;/ol&gt; &lt;h3&gt;Webpack&lt;/h3&gt; &lt;p&gt;Well, let’s rule Webpack out since it’s not really a package manager.  I have to admit I’m not a Webpack user, but looking around the web, I found this article: &lt;a title="http://ilikekillnerds.com/2015/07/jspm-vs-webpack/" href="http://ilikekillnerds.com/2015/07/jspm-vs-webpack/"&gt;http://ilikekillnerds.com/2015/07/jspm-vs-webpack/&lt;/a&gt; which basically tell me straight out that basically, and I am quoting here, “&lt;em&gt;It actually offers almost everything that Jspm does except it is not a package  manager&lt;/em&gt;”.  Then again this article is pretty old (in JavaScript timeframe, LOL), so things might have changed now.  If anyone know any different, let me know…&lt;/p&gt; &lt;p&gt;So that leaves me with only NPM and JSPM.&lt;/p&gt; &lt;h3&gt;JSPM&lt;/h3&gt; &lt;p&gt;Now, at work, we are already using JSPM, so this becomes the first choice for me to investigate.  And from my investigation (which is not much…), basically, I ran &lt;font face="Courier New"&gt;jspm help&lt;/font&gt; on the console and &lt;strong&gt;Ouila!&lt;/strong&gt; I came across this line: &lt;font face="Courier New"&gt;install jquery=…&lt;/font&gt;     Hmm… that looks like aliasing to me, so I gave it a try.  Created a test folder, ran &lt;font face="Courier New"&gt;jspm init&lt;/font&gt;, and then ran &lt;font face="Courier New"&gt;jspm install &lt;/font&gt;&lt;font face="Courier New"&gt;angular-bootstrap0134=angular-bootstrap@0.13.4&lt;/font&gt; and then again &lt;font face="Courier New"&gt;jspm install &lt;/font&gt;&lt;font face="Courier New"&gt;angular-bootstrap133=angular-bootstrap@1.3.3&lt;/font&gt;.  And… guess what?  &lt;strong&gt;It FREAKING works!!! YAY!!&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;In &lt;font face="Courier New"&gt;package.json&lt;/font&gt; I saw:&lt;/p&gt; &lt;p&gt;&lt;font face="Courier New"&gt;"jspm": {&lt;br /&gt;  "dependencies": {&lt;br /&gt;    "angular-bootsrap133": "github:angular-ui/bootstrap-bower@1.3.3",&lt;br /&gt;    "angular-bootstrap0134": "github:angular-ui/bootstrap-bower@0.13.4",&lt;br /&gt;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;Similarly, in system.js config file:&lt;/p&gt; &lt;p&gt;&lt;font face="Courier New"&gt;map: {&lt;br /&gt;    "angular-bootsrap133": "github:angular-ui/bootstrap-bower@1.3.3",&lt;br /&gt;    "angular-bootstrap0134": "github:angular-ui/bootstrap-bower@0.13.4",&lt;/font&gt;&lt;/p&gt; &lt;p&gt;Therefore, now where I need the older version I can just &lt;font face="Courier New"&gt;require(“angular-bootstrap133”)&lt;/font&gt; or in ES2015 syntax: &lt;font face="Courier New"&gt;import “angular-bootstrap133”&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;PERFECT! &lt;/strong&gt;Problem solved.&lt;/p&gt; &lt;p&gt;So…&lt;/p&gt; &lt;h3&gt;NPM&lt;/h3&gt; &lt;p&gt;Just to be complete, I tried to figure out how to do this using plain vanilla NPM… &lt;/p&gt; &lt;p&gt;I looked around on the web and I found this article which is pretty old and it looks a bit promising: &lt;a title="http://blog.izs.me/post/1675072029/10-cool-things-you-probably-didnt-realize-npm" href="http://blog.izs.me/post/1675072029/10-cool-things-you-probably-didnt-realize-npm"&gt;http://blog.izs.me/post/1675072029/10-cool-things-you-probably-didnt-realize-npm&lt;/a&gt;, especially the big bold section titled &lt;strong&gt;1:Handle multiple versions of the same thing at the same time&lt;/strong&gt;.&lt;/p&gt; &lt;p&gt;Looked through &lt;font face="Courier New"&gt;npm help install&lt;/font&gt; documentation as well, but there is nothing there that tell me how to do this…&lt;/p&gt; &lt;p&gt;So, I tried by running &lt;font face="Courier New"&gt;npm install &lt;/font&gt;&lt;font face="Courier New"&gt;angular-ui-bootstrap@0.13.4&lt;/font&gt;&lt;font face="Courier New"&gt; --save&lt;/font&gt; and that net me a &lt;strong&gt;node_module/angular_ui_bootstrap&lt;/strong&gt; folder and the following lines in &lt;font face="Courier New"&gt;package.json&lt;/font&gt;:&lt;/p&gt; &lt;p&gt;&lt;font face="Courier New"&gt;"dependencies": {&lt;br /&gt;   "angular-ui-bootstrap": "^0.13.4",&lt;br /&gt;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;Then I tried again using &lt;font face="Courier New"&gt;npm install &lt;/font&gt;&lt;font face="Courier New"&gt;angular-ui-bootstrap@1.3.3&lt;/font&gt;&lt;font face="Courier New"&gt; --save&lt;/font&gt;, and as expected, it basically override the &lt;strong&gt;node_module/angular_ui_bootstrap&lt;/strong&gt; folder with the newest version and the dependencies line for it is also updated to:&lt;/p&gt; &lt;p&gt;&lt;font face="Courier New"&gt;"dependencies": {&lt;br /&gt;    "angular-ui-bootstrap": "^1.3.3",&lt;/font&gt;&lt;/p&gt; &lt;p&gt;This is &lt;strong&gt;DEFINITELY&lt;/strong&gt; &lt;strong&gt;NOT&lt;/strong&gt; what I want.  So searching further on the web, net me no solution to this.  There are discussions around this topic such as this GitHub issue: &lt;a title="https://github.com/npm/npm/issues/5499" href="https://github.com/npm/npm/issues/5499"&gt;https://github.com/npm/npm/issues/5499&lt;/a&gt;, which looks like this is still not possible using NPM  and &lt;a title="http://stackoverflow.com/questions/26414587/how-to-install-multiple-versions-of-package-using-npm" href="http://stackoverflow.com/questions/26414587/how-to-install-multiple-versions-of-package-using-npm"&gt;http://stackoverflow.com/questions/26414587/how-to-install-multiple-versions-of-package-using-npm&lt;/a&gt;  which again point to JSPM for something like this.  Also found a google group message (&lt;em&gt;couldn’t find it again&lt;/em&gt;) that basically tell you to install the old version, copy it to a folder like angular-ui-bootstrap0134 and install it again so it will override the original folder with version 1.3.3.  Very very messy.   I guess a different approach is to create your own copy of npm package for the different versions and use those instead… again not very good solution.&lt;/p&gt; &lt;h3&gt;Conclusion&lt;/h3&gt; &lt;p&gt;And so… the clear winner here is… JSPM.  Lucky us… we already use JSPM at work &lt;img class="wlEmoticon wlEmoticon-smile" style="border-top-style: none; border-left-style: none; border-bottom-style: none; border-right-style: none" alt="Smile" src="http://blog.jimmychandra.com/posts/files/bf7e844e-1557-4820-9a17-7148f9e3330b.png" /&gt;.&lt;/p&gt;</description><a10:updated>2016-05-26T12:08:40Z</a10:updated></item><item><guid isPermaLink="true">http://blog.jimmychandra.com/post/how-to-force-downgrade-azure-emulator-back-to-previous-version</guid><link>http://blog.jimmychandra.com/post/how-to-force-downgrade-azure-emulator-back-to-previous-version</link><a10:author><a10:name /></a10:author><title>How to Force Downgrade Azure Emulator Back to Previous Version</title><description>&lt;p&gt;At work, we are still doing Cloud Service for our Azure solution which requires the Compute Emulator. &lt;/p&gt; &lt;p&gt;&lt;br&gt;I was helping my co-worker to test his upgrade to Azure SDK 2.9 so we could move on to Visual Studio 2015. At the time, our solution was running on Azure SDK 2.6 and so I installed Azure SDK 2.9 for Visual Studio 2015 and ran the upgraded version of our solution on my machine. It ran just fine but since we wanted to make sure that this is properly tested, we didn't want to commit to using Azure SDK 2.9 yet.&amp;nbsp; Until such point in time, we actually wanted the main development to still use Azure SDK 2.6.&amp;nbsp; This itself is fine since we specifically created an Azure SDK 2.9 Upgrade branch so the affected source code is isolated to that specific branch and the rest are still on 2.6 SDK.&amp;nbsp; This is all well and good until...&lt;/p&gt; &lt;p&gt;&lt;br&gt;When I tried to go back to my own feature branch that is still on Azure SDK 2.6 and started the debugging session, the Azure Compute Emulator did not work any longer.&amp;nbsp; It kept throwing the following "&lt;strong&gt;Error: The installed Microsoft Azure Compute Emulator does not support the role binaries.&lt;/strong&gt;" and suggested that I upgrade my solution to Azure SDK 2.9 which I certainly do not want to do until our test is completed and passing.&lt;/p&gt; &lt;p&gt;&lt;br&gt;I am now in a bind.&amp;nbsp; I can't run and debug my own feature branch due to this problem.&amp;nbsp; Apparently the emulator does not support side-by-side installation and itself has been upgraded to version 2.9 and Emulator 2.9 just don't like 2.6 projects.&amp;nbsp; &lt;em&gt;Sigh&lt;/em&gt;.&lt;/p&gt; &lt;p&gt;&lt;br&gt;After looking around the web for the answer and finding none, I got to thinking that there are about 2 options that I could do to fix this...&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Option 1.&lt;/strong&gt;&amp;nbsp; Use System Restore to go back to a previous state when the SDK 2.9 bits are not yet installed... Unfortunately, the installation didn't create a System Restore point and I didn't do it manually either... so there goes that option.&lt;/p&gt; &lt;p&gt;&lt;br&gt;&lt;strong&gt;Option 2.&lt;/strong&gt;&amp;nbsp; Somehow reinstall Azure Compute Emulator 2.6 and force it to overwrite the current 2.9 Emulator.&amp;nbsp; This seems to be my only option now...&lt;br&gt;So, from previously spelunking attempts, I know the Azure SDK bits is located in "&lt;strong&gt;%PROGRAMFILES%\Microsoft SDKs\Azure\Emulator&lt;/strong&gt;".&amp;nbsp; If my hunch is correct, the bits should be installed here.&amp;nbsp; So, what if I try downloading the 2.6 Compute Emulator installation bit from &lt;a href="https://azure.microsoft.com/en-us/downloads/archive-net-downloads?"&gt;https://azure.microsoft.com/en-us/downloads/archive-net-downloads?&lt;/a&gt; Clicking the Azure SDK for .NET version under April 2015 (version 2.6) link which took me to: &lt;a href="https://go.microsoft.com/fwlink/?linkid=534218&amp;amp;clcid=0x409"&gt;https://go.microsoft.com/fwlink/?linkid=534218&amp;amp;clcid=0x409&lt;/a&gt;. Clicking the big red &lt;strong&gt;Download&lt;/strong&gt; button showed me a bunch of bits which include the &lt;strong&gt;MicrosoftAzureComputeEmulator-x64.exe&lt;/strong&gt; which is exactly what I needed.&amp;nbsp;&amp;nbsp; After downloading the program, I tried running it and got stopped in the middle of installation since a newer version of the emulator is already installed... So, now what do I do?&lt;/p&gt; &lt;p&gt;&lt;br&gt;Well, I tried running that exe using &lt;strong&gt;/?&lt;/strong&gt; options and lo and behold, there is an &lt;strong&gt;/uninstall &lt;/strong&gt;parameter that I can use to uninstall... So, what if I download the 2.9 Compute Emulator installation program and run it with that parameter from Command Prompt... and... Voilà!! All the bits now got removed from inside the "&lt;strong&gt;%PROGRAMFILES%\Microsoft SDKs\Azure\Emulator&lt;/strong&gt;" directory.&amp;nbsp; Great... so now I tried reinstalling the 2.6 Computer Emulator bit using the 2.6 installation bit... and... it got installed just fine.&amp;nbsp; &lt;/p&gt; &lt;p&gt;&lt;br&gt;The final step was to try running my 2.6 solution back from Visual Studio and... YAY, it ran just fine.&amp;nbsp; Problem solved.&lt;/p&gt; &lt;p&gt;&lt;br&gt;I hope this is useful for other people that also run into this issue.&amp;nbsp; Like I mentioned, I couldn't find anywhere on the web that explains this.&lt;br&gt;&lt;/p&gt; &lt;p&gt;Enjoy.&lt;/p&gt;</description><a10:updated>2016-04-27T03:58:22Z</a10:updated></item><item><guid isPermaLink="true">http://blog.jimmychandra.com/post/visual-studio-online-build-failure-user-does-not-have-required-permissions-for-the-service-endpoint</guid><link>http://blog.jimmychandra.com/post/visual-studio-online-build-failure-user-does-not-have-required-permissions-for-the-service-endpoint</link><a10:author><a10:name>jchandra</a10:name></a10:author><title>Visual Studio Online Build Failure: User does not have required permissions for the service endpoint.</title><description>&lt;div&gt;Just encounter that error trying to do continuous delivery last night (as per date of the blog post).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;img src="/posts/files/a9095bf1-03a8-4e46-a4f9-dfd689b9d62f.png" alt="" / /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This might be due to recent changes in Visual Studio Online build system.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If you encounter this problem, try the followings:&lt;/div&gt;&lt;ol&gt;&lt;li&gt;Login to your Visual Studio Online and navigate to the related project collection group where the affected build belongs to.&lt;/li&gt;&lt;li&gt;Click on the cogs (Administer Account) link next to your account name to bring up the Collection Control Panel page. &lt;/li&gt;&lt;li&gt;Click on the &lt;b&gt;Services&lt;/b&gt; tab and expand the endpoint node you are tying to deploy your build to.&lt;/li&gt;&lt;li&gt;Choose &lt;b&gt;Endpoint Administrators&lt;/b&gt; group and click the &lt;b&gt;Add...&lt;/b&gt; button and select &lt;b&gt;Add User&lt;/b&gt;.&lt;/li&gt;&lt;li&gt;In the add user dialog, expand the selection and choose &lt;b&gt;Elastic Build (...) &lt;/b&gt;user.&lt;/li&gt;&lt;li&gt;Requeue your build from VS or from the portal and if there is nothing wrong with your check in, your build should get deployed correctly.  (If this does not work still, try adding the same &lt;b&gt;Elastic Build (...)&lt;/b&gt; user to &lt;b&gt;Endpoint Readers&lt;/b&gt; group as well.&lt;/li&gt;&lt;/ol&gt;</description><a10:updated>2015-08-12T00:18:31Z</a10:updated></item><item><guid isPermaLink="true">http://blog.jimmychandra.com/post/c-6-null-propagation-implemention-in-c-5</guid><link>http://blog.jimmychandra.com/post/c-6-null-propagation-implemention-in-c-5</link><a10:author><a10:name>jchandra</a10:name></a10:author><title>C# 6 Null Propagation Implemention in C# 5?</title><description>&lt;p&gt;I was answering &lt;a href="http://stackoverflow.com"&gt;SO&lt;/a&gt; questions and someone asked how to null guard stuffs when calling a property or a method of something that might be null.&lt;br&gt;&lt;br&gt;I mentioned that C# 6 provides a way to do this by allowing you to use the following syntax: &lt;code&gt;foo?.bar?.baz&lt;/code&gt; which will prevent the code from parsing the rest and erroring out once a null is encounter anywhere in the method / property chain which it is called &lt;b&gt;null-propagation&lt;/b&gt;.&lt;br&gt;&lt;br&gt;So, an idea popped in my mind since C# 6 is not quite there yet, how can we do this in C# 5?&amp;nbsp; After some thinking, I came up with the idea of using lambda expression combined with extension method and some generic magic that I think might work and came up with the following syntax: &lt;code&gt;foo._(_=&amp;gt;_.bar)._(_=&amp;gt;_.baz)&lt;/code&gt;&amp;nbsp; that seems to work okay.&lt;br&gt;&lt;br&gt;The implementation is like so: &lt;/p&gt;
&lt;pre class="brush: csharp; toolbar: false;"&gt;public static class ObjectExtension
{
    //Probably not a good idea to name your method _, but it's the shortest one I can find, I wish it could be _?, but can't :(
    public static K _&amp;lt;T, K&amp;gt;(this T o, Func&amp;lt;T, K&amp;gt; f) 
    {
        try 
        {
            var z = f(o);
            return z;            
        }
        catch(NullReferenceException nex) 
        {
            Trace.TraceError(nex.ToString());
            return default(K);
        }
        
    }
}
&lt;/pre&gt;
&lt;p&gt;&lt;br&gt;The running example can be found below:&lt;/p&gt;&lt;iframe width="100%" height="475" src="https://dotnetfiddle.net/Widget/9R8bku" frameborder="0"&gt;&lt;/iframe&gt;</description><a10:updated>2015-05-15T10:38:16Z</a10:updated></item><item><guid isPermaLink="true">http://blog.jimmychandra.com/post/troubleshooting-azure-cloud-service-that-keep-recycling-after-deployment</guid><link>http://blog.jimmychandra.com/post/troubleshooting-azure-cloud-service-that-keep-recycling-after-deployment</link><a10:author><a10:name /></a10:author><title>Troubleshooting Azure Cloud Service that Keep Recycling After Deployment</title><description>&lt;p&gt;From time to time, and for whatever reason…. like oh…say… your solution contains multiple projects and you decided to upgrade the cloud service project to the latest Azure SDK from version x and for whatever reason you have a reference to a specific Azure SDK component in one or more projects that are not your Web / Worker Role project… Guess what… you might run into this (Role perma-recycling fun)&amp;nbsp; after deploying to Azure that when tested on the development fabric it is working just fine.&lt;/p&gt; &lt;p&gt;&lt;a href="http://blog.jimmychandra.com/posts/files/6dc1849b-9309-42dd-b064-6cd307ee9b71.png"&gt;&lt;img title="perma_recycling" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="perma_recycling" src="http://blog.jimmychandra.com/posts/files/d12717ef-01cf-4a64-9c44-e0161801f970.png" width="832" height="202"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;em&gt;*Digressing* &lt;/em&gt;&lt;/p&gt; &lt;p&gt;You know what, sometimes Azure baffles me.&amp;nbsp; I upgraded my Azure SDK previously and managed to deploy it to the cloud and have it running just fine on one deployment and then when doing another deployment some time after it just refuses to start and start the recycling crap… and this is not a staging slot swap to prod slot thing, it’s direct deployment onto the production slot too.&amp;nbsp; I haven’t deep dive into Azure internal to understand what’s going on when you do deployment, but I think there are optimization steps (to make the deployment process faster perhaps) where sometimes the same VM is being used and when previously it still have the residual DLLs from previous deployment and when this happens, everything work just fine even after the SDK update and you forgot to update the outdated DLL… and sometimes, Azure just says, “… meh… screw you… I’ll drop your bit on a totally new VM and&amp;nbsp; guess what, HAHA!!, the bits that you think will be there is no longer there, so there…” and the recycling crap happens.&lt;/p&gt; &lt;p&gt;Is this what happened? I don’t know… maybe.&amp;nbsp; Some insights into this perhaps or not… &lt;/font&gt;&lt;a title="http://blog.smarx.com/posts/what-happens-when-you-deploy-on-windows-azure" href="http://blog.smarx.com/posts/what-happens-when-you-deploy-on-windows-azure"&gt;http://blog.smarx.com/posts/what-happens-when-you-deploy-on-windows-azure&lt;/a&gt;.&amp;nbsp; Step 2 is a bit ambiguous…&amp;nbsp; Maybe &lt;a href="http://azure.microsoft.com/en-us/documentation/videos/azure-friday/"&gt;Azure Friday&lt;/a&gt; will invite someone to explain how this thing works internally? &lt;em&gt;*Nudge nudge wink wink*&lt;/em&gt;&lt;/p&gt; &lt;p&gt;&lt;em&gt;*More digression*&lt;/em&gt;&lt;/p&gt; &lt;p&gt;&lt;em&gt;&lt;/em&gt;You know what… this reminds me of something else… Sometimes when my Continuous Deployment build got processed by Visual Studio Online, I get this annoying Cannot copied such and such blah error during the build and the build crapped and stopped there. FAIL!&amp;nbsp; And the only thing I need to do is re-queue the build and guess what… It successfully build and deploy… &lt;/p&gt; &lt;p&gt;&lt;img style="float: left; display: inline" src="http://blog.jimmychandra.com/images/onionheads/030_.gif" align="left"&gt;&lt;/p&gt; &lt;p&gt;What the !(*&amp;amp;$&amp;amp;!#!!!&amp;nbsp; My theory… there is a build agent machine that is not configured right… and I was just unlucky to get sent to that agent from time to time.&lt;/p&gt; &lt;p&gt;&lt;em&gt;*End of more digression*&lt;/em&gt;&lt;/p&gt; &lt;p&gt;&lt;em&gt;Geez… what is this… Digression Inception?&lt;/em&gt;&lt;/p&gt; &lt;p&gt;&lt;em&gt;*End Digression*&lt;/em&gt;&lt;/p&gt; &lt;p&gt;&lt;img style="float: left; display: inline" src="http://blog.jimmychandra.com/images/onionheads/006_.gif" align="left"&gt;If you are a newb at Azure like I was previously, you’ll be scratching your head for a looong looong time trying to figure out what the heck is going on…&amp;nbsp; &lt;br&gt;It worked on my machine… Damn it.. &lt;br&gt;&lt;em&gt;*pull hair*&lt;/em&gt; … oh no &lt;em&gt;*bald spot forming*&lt;/em&gt;. &lt;/p&gt; &lt;p&gt;After running into this issue a couple of time and doing searches for answers on stack overflow and what not… You’ll finally realize that you have missing reference and the web / worker role just can’t start your application because of that, which I think is the most likely candidate anyhow…&lt;/p&gt; &lt;p&gt;So, how do you go about troubleshooting this?&lt;/p&gt; &lt;h2&gt;Remote Desktop is Your Friend&lt;/h2&gt; &lt;p&gt;One easy way to do this is via Remote Desktop.&lt;/p&gt; &lt;p&gt;You &lt;strong&gt;DID&lt;/strong&gt; configure remote desktop on that role, did you not…?&lt;/p&gt; &lt;p&gt;&lt;img style="float: left; display: inline" src="http://blog.jimmychandra.com/images/onionheads/002_.gif" align="left"&gt; No?&amp;nbsp; You dummy you, go do it now!&lt;/p&gt; &lt;p&gt;… … …&lt;/p&gt; &lt;p&gt;You &lt;strong&gt;DO &lt;/strong&gt;know how to configure remote desktop for your role, do you not? &lt;br&gt;&lt;img style="float: left; display: inline" src="http://blog.jimmychandra.com/images/onionheads/024_.gif" align="left"&gt;No? &lt;em&gt;*sigh*&amp;nbsp; &lt;/em&gt;Read &lt;a href="https://msdn.microsoft.com/en-us/library/azure/gg443832.aspx"&gt;this&lt;/a&gt;. &lt;br&gt;I’d recommend creating your own client certificate to use for this and &lt;strong&gt;CHECK IT INTO YOUR SOURCE REPOSITORY&lt;/strong&gt;.&amp;nbsp; You never know when you need the certificate again… for example, when you need to redeploy the cloud service to a different Azure subscription and the original certificate is now nowhere to be found for reasons like the original developer who created the certificate on his / her machine left the company, the machine got wiped and YAY… no more certificate copy anywhere…&amp;nbsp; Happened… True story.&lt;/p&gt; &lt;p&gt;So, now that’s out of the way, go launch remote desktop and login…&lt;/p&gt; &lt;p&gt;What? You don’t remember what’s the password for the VM? Are you kidding me? &lt;em&gt;*sigh*&lt;/em&gt;&lt;/p&gt; &lt;p&gt;Go read &lt;a href="http://thetechnologychronicle.blogspot.com.au/2013/09/configure-rdp-for-windows-azure-cloud.html"&gt;this&lt;/a&gt; and follow the instruction on how to reconfigure…&lt;/p&gt; &lt;h2&gt;Event Viewer is Also Your Friend&lt;/h2&gt; &lt;p&gt;Okay… now that you are logged into the remote desktop, go start Event Viewer.&amp;nbsp; If you don’t know how to do this, go quit and sell ice cream in a truck… or ask your boss to hire a DevOps... or go learn how to do it!!&amp;nbsp; Google or Bing maybe… like “How to launch Event Viewer from Windows Server 2012 R2?”…&lt;/p&gt; &lt;p&gt;Got Event Viewer up?&amp;nbsp; Good.&lt;/p&gt; &lt;p&gt;Now go open the Windows Logs node and drill into the Application node and find some errors (such as one that is shown below…)&lt;/p&gt; &lt;p&gt;&lt;a href="http://blog.jimmychandra.com/posts/files/359e90d1-1d43-4281-bc64-6f092efb5e3c.png"&gt;&lt;img title="EventViewer1" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="EventViewer1" src="http://blog.jimmychandra.com/posts/files/4d426c5b-792c-4b43-9ad5-aa20de789642.png" width="1028" height="687"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;AHA!&lt;/strong&gt; See that &lt;strong&gt;FileNotFoundException&lt;/strong&gt;!!! I knew it, File Not Found…. It’s the same thing that is shown in the Azure portal.&lt;/p&gt; &lt;p&gt;&lt;img style="float: left; display: inline" src="http://blog.jimmychandra.com/images/onionheads/071_.gif" align="left"&gt;Yeah…. but… what file?…. Uhm…. &lt;br&gt;What a freaking useless error message.&lt;/p&gt; &lt;p&gt;Okay… maybe we are looking at the wrong place…. Let’s see what else is there…&lt;/p&gt; &lt;p&gt;Let’s try the Applications and Services Logs node… drill drill, aha… Windows Azure/Diagnostics/Bootstrapper node… It’s related to starting up the role right?&amp;nbsp; Bootstrapping = start up, right? Must be here..&lt;/p&gt; &lt;p&gt;&lt;strong&gt;AHA! &lt;/strong&gt;I see some errors.&lt;/p&gt; &lt;p&gt;&lt;a href="http://blog.jimmychandra.com/posts/files/7a3b726a-0354-4e03-ba65-8ea09b8b0bf0.png"&gt;&lt;img title="EventViewer2" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="EventViewer2" src="http://blog.jimmychandra.com/posts/files/32bbe74e-14bc-41a7-a3e0-c2b7f51d6188.png" width="1028" height="687"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;img style="float: left; display: inline" src="http://blog.jimmychandra.com/images/onionheads/076_.gif" align="left"&gt;… WT #(@$! CRuntimeClient: OnRoleStatusCallback #(*@#(&lt;a href="mailto:*@#(*$"&gt;*@#(*$&lt;/a&gt;&amp;nbsp; What the heck does that mean?&lt;/p&gt; &lt;p&gt;Yet more useless crap!&lt;/p&gt; &lt;p&gt;*sigh*&amp;nbsp; Oh well, let’s continue mining…&lt;/p&gt; &lt;p&gt;Applications and Services Logs/Windows Azure… WELL… what do you know… More errors… and this time.. we found GOLD… well, sort of…!&lt;/p&gt; &lt;p&gt;&lt;a href="http://blog.jimmychandra.com/posts/files/f44baf24-b1a2-4662-9143-1904961c951f.png"&gt;&lt;img title="EventViewer3" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="EventViewer3" src="http://blog.jimmychandra.com/posts/files/3485951d-1a74-4807-9b84-12034ce26984.png" width="1028" height="687"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Could not load file or assembly ‘Microsoft.WindowsAzure.ServiceRuntime, Version=2.3.0.0…’ at XXXXXXX.Shared.Configuration….&lt;/p&gt; &lt;p&gt;Now we are going somewhere… &lt;/p&gt; &lt;h2&gt;What’s Next?&lt;/h2&gt; &lt;p&gt;Well, now that you know what it can’t find during the startup, you just need to ensure that the DLL or whatever component the role needs to start is correctly packaged and deployed to Azure.&amp;nbsp; Upgrade the DLL using Nuget and fix your references, and make sure to set the missing reference to be copied always to the bin folder.&lt;/p&gt; &lt;p&gt;&lt;img src="http://i.stack.imgur.com/D2IQI.jpg"&gt;&lt;/p&gt; &lt;p&gt;Check in your changes, trigger your Continuous Delivery build or package it and redeploy manually.&amp;nbsp; Whatever your deployment style is… Hopefully it will work this time…&amp;nbsp; &lt;/p&gt; &lt;p&gt;&lt;img style="float: left; display: inline" src="http://blog.jimmychandra.com/images/onionheads/023_.gif" align="left"&gt;If it doesn’t…, &lt;br&gt;Well, go figure it out. Gave you a clue on how to troubleshoot this… Do I have to hold you hand through all the process? What are you? Kindergarten student? PHAW!&lt;/p&gt;</description><a10:updated>2017-08-02T04:49:45Z</a10:updated></item><item><guid isPermaLink="true">http://blog.jimmychandra.com/post/painful-migration-from-old-blog</guid><link>http://blog.jimmychandra.com/post/painful-migration-from-old-blog</link><a10:author><a10:name /></a10:author><title>Painful Migration From Old Blog</title><description>&lt;p&gt;Had enough.&amp;nbsp; One thing for sure, can’t depend on other people to be reliable when it comes to things that matter to you.&amp;nbsp; The old geeks.netindonesia.net was great but that does not seem to be the case now.&amp;nbsp; I’ve lost contact with the maintainer and previous attempt to get help on getting the blog contents from the server did not go well at all.&lt;/p&gt; &lt;p&gt;So, I am going to migrate the content here the only way I know how… &lt;/p&gt; &lt;p&gt;The Internet Time Machine (web.archive.org) as suggested from this article: &lt;a title="http://webmasters.stackexchange.com/questions/33346/recovering-a-lost-website-with-no-backup" href="http://webmasters.stackexchange.com/questions/33346/recovering-a-lost-website-with-no-backup"&gt;http://webmasters.stackexchange.com/questions/33346/recovering-a-lost-website-with-no-backup&lt;/a&gt;&lt;/p&gt; &lt;p&gt;I’ll not migrate outdated / irrelevant contents, only contents that are of interest to me will be brought over to this new site.&amp;nbsp; Will try to maintain the chronological order.&lt;/p&gt; &lt;p&gt;Enough said… now let’s get to work…&lt;/p&gt;</description><a10:updated>2015-02-21T16:27:51Z</a10:updated></item><item><guid isPermaLink="true">http://blog.jimmychandra.com/post/selective-test-driven-development--unit-testing</guid><link>http://blog.jimmychandra.com/post/selective-test-driven-development--unit-testing</link><a10:author><a10:name /></a10:author><title>Selective Test Driven Development / Unit Testing</title><description>&lt;p&gt;I have to confess that I don’t religiously take on TDD / Unit Testing all the time.&amp;nbsp; Most of the time when prototyping I use regular C# console app or better yet, fire up jsfiddle.net and hack away at the things that I want to proof using JavaScript.&amp;nbsp;&amp;nbsp; Most of the time this workflow do what I need it to do.&amp;nbsp; I can get the result that I want and pretty confident that the code works before I migrate it back to real production code in C#.&amp;nbsp;&amp;nbsp; Perhaps sometimes after I’ll code up some unit tests to get some coverage.&lt;/p&gt; &lt;p&gt;Digressing a bit… I love jsfiddle and things like dotnetfiddle since they allow me to prototype stuffs without having to go through the code, wait for compile and run to see what’s coming out at the other end, but that’s a different story. *Digression mode OFF*&lt;/p&gt; &lt;p&gt;I found that most of the time when I really feel that I need to fall back to TDD / up front unit testing is when dealing with compilcated logic like rules that depends on multiple if statements… like…&lt;/p&gt; &lt;p&gt;If it’s Tuesday and it is raining and you’re wearing red socks then do this&lt;/p&gt; &lt;p&gt;If it’s Tuesday and it is raining and you’re wearing blue socks then do that&lt;/p&gt; &lt;p&gt;If it’s Tuesday but it’s a leap year and it’s between January to March, and you are wearing either black, blue or red sock but also wearing sweater, then do something else.&lt;/p&gt; &lt;p&gt;You get my point…. some codes are just harder to hold in your head and get right.&amp;nbsp;&amp;nbsp; Complex boolean logic is one such thing.&amp;nbsp; This type of code is a perfect candidate for starting with TDD.&lt;/p&gt; &lt;p&gt;I had to work on some brownfield code for a client which has this kind of logic to determine if a node in a treeview or the screen entry is enabled… what a headache :).&amp;nbsp;&amp;nbsp; Unit Testing came to the rescue.&amp;nbsp; The result is… I&amp;nbsp; am more confident now that the boolean logic that I put into the code works as expected since I coded enough test to cover every conceivable scenario of the business rule / requirement.&lt;/p&gt; &lt;p&gt;Agree?&amp;nbsp; Disagree?&lt;/p&gt; &lt;p&gt;What do you do?&lt;/p&gt;</description><a10:updated>2014-07-19T01:00:33Z</a10:updated></item><item><guid isPermaLink="true">http://blog.jimmychandra.com/post/lesson-learnt-upgrading-azure-net-sdk-on-complex-solution</guid><link>http://blog.jimmychandra.com/post/lesson-learnt-upgrading-azure-net-sdk-on-complex-solution</link><a10:author><a10:name /></a10:author><title>Lesson Learnt: Upgrading Azure .Net SDK on Complex Solution</title><description>&lt;h3&gt;What I think how the Azure .Net SDK upgrade tool works behind the scene&lt;/h3&gt; &lt;p&gt;I am not sure if this a 100 % correct, but from the observed behavior at work, upgrading Azure SDK (say from 1.8 to 2.2., or from 2.2 to 2.3, etc.) using the tooling that is integrated into Visual Studio seems to only update the references that belongs to projects that are referenced in the Azure Cloud Service project being upgraded.&amp;nbsp; &lt;strong&gt;Any other Azure DLL references elsewhere in your solution, WILL NOT be updated automatically.&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;For example, your solution looks like so:&lt;/p&gt; &lt;p&gt;Solution A (created using SDK 2.2)&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Cloud Service Project  &lt;ul&gt; &lt;li&gt;Web Project 1  &lt;li&gt;Web Project 2&lt;/li&gt;&lt;/ul&gt; &lt;li&gt;Cloud Library Component (has Azure DLL references i.e. Storage, ServiceRuntime)  &lt;li&gt;Data Access / Repository Component (has Azure DLL references i.e. Storage, Cache)  &lt;li&gt;Web Project 1 (has Azure DLL references i.e. ServiceRuntime, Configuration, Diagnostics)  &lt;li&gt;Web Project 2 (has Azure DLL references i.e. ServiceRuntime, Configuration, Diagnostics, Cache)&lt;/li&gt;&lt;/ul&gt; &lt;blockquote&gt; &lt;p&gt;I know… this is probably not how it should be done, but for the sake argument, this is brown field project that you inherited and tasked to upgrade to the newer and shinier Azure SDK.&amp;nbsp; Ideally, it would be nice if you can centralized the changes to a single project, but in reality, all sort of weird legacy things happen…&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Given the solution structure, what we think Azure upgrade tool does under the cover is something like:&lt;/p&gt; &lt;ol&gt; &lt;li&gt;Figure out what projects are references in the Cloud Service Project.&amp;nbsp; in this case it’s Web Project 1 and Web Project 2.  &lt;li&gt;Update all .cscfg and .csdef file to use the new SDK schema, etc.  &lt;li&gt;For all the projects found in the Cloud Service Project, look at all Azure DLL references in the project reference, and update it to point to the new SDK dll (i.e. in &lt;strong&gt;C:\Program Files\Microsoft SDKs\Windows Azure\.NET SDK\v2.3\ref&lt;/strong&gt;).&amp;nbsp; Look as well in the respective web.config (maybe in app.config as well, not sure) and update and reference to the new Azure SDK dll.&lt;/li&gt;&lt;/ol&gt; &lt;blockquote&gt; &lt;p&gt;To save cost, we use this trick where we have a webrole.cs inside our web project that is sort of doing what additional separate worker roles might do and this will need its own app.config inside the web project in addition to web.config since the webrole.cs will not run in the same application domain&amp;nbsp; / process as the web application itself and therefore will not get its configuration from web.config.&amp;nbsp; Rather, it will pull its configuration from the app.config in that same web project.&amp;nbsp; What we found is that the app.config is not being updated by the Azure .Net SDK upgrade tool.&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;In this case, only Web Project 1 and Web Project 2 Azure dll references are updated.&amp;nbsp; The Cloud Library and Data Access components ARE NOT updated even though they might be referred to by Web Project 1 / 2.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;h3&gt;Azure .Net SDK upgrade choices&lt;/h3&gt; &lt;p&gt;Given the situation, you can choose to:&lt;/p&gt; &lt;ol&gt; &lt;li&gt;Spend the needed time to refactor the solution and try to get all stuffs that relate to Azure centralized in a project, abstract it behind some sort of interface.&amp;nbsp; This could be a nice thing to have.&amp;nbsp; Added benefit is that you can, in theory, abstract out all Azure dependencies in that particular project and deal with a higher level abstraction that will give you an agnostic way to access cloud related stuffs… perhaps this is useful as well if you want to move your cloud dependencies to other cloud vendor such as AWS.  &lt;li&gt;Bite the bullet on the technical debt and manually re-reference the Azure DLL that are skipped by the upgrade tool.&amp;nbsp; Perhaps figure out a way to automate this as well…  &lt;li&gt;Hope that Microsoft to fix their Azure SDK upgrade tool in Visual Studio to crawl Azure dependencies from the entry points and upgrade those references as well.&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;h3&gt;What We Did&lt;/h3&gt; &lt;p&gt;What we did at work was to go with option 2.&amp;nbsp; We manually updated Azure .Net SDK references in Cloud Library and Data Access components to be on par with what is in the tool updated web projects.&amp;nbsp; It would be nice if the tool that comes with the SDK do this automatically... &lt;em&gt;wishful thinking&lt;/em&gt;.&lt;/p&gt; &lt;p&gt;We also toyed around with the idea of pulling the Azure DLL dependencies via nuget package and script them somehow, so the next time around we need to upgrade the Azure SDK, we just do a minor change in the PowerShell script and run it which will cause it to update all the Azure DLL references to the new SDK level.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;h2&gt;Official Azure Nuget Packages Inconsistencies&lt;/h2&gt; &lt;p&gt;Some other weird thing that we found… It’s not very clear which way we should go since half of the Azure DLL can found (officially) as nuget packages such as Storage and Cache, but some others like Service Runtime are referred from the ref folder inside the SDK installation and do not have any official nuget package associated with it.&amp;nbsp; We did find unofficial nuget package for it though such as Unofficial.Microsoft.WindowsAzure.Diagnostics.&lt;/p&gt;</description><a10:updated>2014-04-25T03:47:24Z</a10:updated></item><item><guid isPermaLink="true">http://blog.jimmychandra.com/post/lesson-learnt-azure-continuous-deployment-from-visual-studio-online</guid><link>http://blog.jimmychandra.com/post/lesson-learnt-azure-continuous-deployment-from-visual-studio-online</link><a10:author><a10:name /></a10:author><title>Lesson Learnt: Azure Continuous Deployment from Visual Studio Online</title><description>&lt;p&gt;Not too long ago, we moved our repository to &lt;a href="http://www.visualstudio.com"&gt;www.visualstudio.com&lt;/a&gt;.&amp;nbsp; &lt;/p&gt; &lt;p&gt;Some reasons behind the moves were:&lt;/p&gt; &lt;ol&gt; &lt;li&gt;Visual Studio online repository is free for up to 5 developers (which suit our small team).  &lt;li&gt;We want to take advantage of the continuous delivery workflow that Azure and VS online offer.  &lt;li&gt;VS online has a nice Scrum portal that include feature, backlog and task management, drag-able Kanban board, burn down chart and cumulative flow diagram. The “virtual” project chat room is nice but we use Skype mostly to communicate with our remote team.&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;Since then, we’ve been working toward enabling continuous deployment on our Azure solution similar to what is described in this article: &lt;a title="Continuous delivery to Azure using Visual Studio Online" href="http://azure.microsoft.com/en-us/documentation/articles/cloud-services-continuous-delivery-use-vso/"&gt;Continuous delivery to Azure using Visual Studio Online&lt;/a&gt;.&amp;nbsp; &lt;/p&gt; &lt;p&gt;The purpose of this post is not to teach you how to do this.&amp;nbsp; For that, please follow the steps described in the linked article above.&amp;nbsp; What I wish to talk about here is more about what’s missing from the “happy day” scenario of doing continuous delivery as described in that article.&lt;/p&gt; &lt;h2&gt;Azure Continuous Deployment of Visual Studio solution with multiple cloud service projects from Visual Studio Online&lt;/h2&gt; &lt;blockquote&gt; &lt;p&gt;&lt;strong&gt;Caveat&lt;/strong&gt;: I am an the accidental build master who does not have in depth knowledge of VS Build Process Template customization, not yet anyhow, so the solution described here might not be the most technically correct, but it works for us.&amp;nbsp; If you know a better way to do this, by all mean, please share. &lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Originally, our Visual Studio solution contains multiple cloud service projects which we found to not work with the normal continuous deployment scenario that comes out of the box with Visual Studio Online and Azure.&amp;nbsp; &lt;/p&gt; &lt;h4&gt;&amp;nbsp;&lt;/h4&gt; &lt;h3&gt;Why out of the box build process will not work with Visual Studio solutions with multiple cloud service projects&lt;/h3&gt; &lt;p&gt;Apparently, the standard continuous deployment workflow that comes out of the box prefers a solution with only a single cloud service project. You can see this in the build definition in the following section: &lt;strong&gt;Process/6.Deployment/Deployment/Windows Azure Deployment Environment&lt;/strong&gt;. Basically, you can only deploy a single cloud service if you doing it the standard way. You might be able to tweak the build definition workflow but we decided to not waste too much time researching this.&amp;nbsp; &lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;h3&gt;Move each cloud service project into their own Visual Studio solutions&lt;/h3&gt; &lt;p&gt;So, we moved the extra cloud service projects from our main Visual Studio solution into their own Visual Studio solutions and re-establish any project / binary references as necessary.&amp;nbsp; &lt;em&gt;This, however, present a different challenge when doing .NET Azure SDK upgrade, which I will talk about in a different post.&lt;/em&gt;&amp;nbsp; Each of these solutions are then associated with their own continuous delivery build definitions.&amp;nbsp; We found this setup to be working quite nicely.&lt;/p&gt; &lt;p&gt;Original VS solution:&lt;/p&gt; &lt;p&gt;My Awesome&amp;nbsp; VS Solution&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Cloud Service Project 1 (i.e. main web + worker role that will always need to be deployed as pair)&lt;/li&gt; &lt;li&gt;Cloud Service Project 2 (i.e. incoming email handler worker role, unfrequently deployed)&lt;/li&gt; &lt;li&gt;Supporting library project 1 (i.e. Azure specific library)&lt;/li&gt; &lt;li&gt;Supporting library project 2 (i.e. SQL Data Access library)&lt;/li&gt; &lt;li&gt;Actual web project&lt;/li&gt; &lt;li&gt;Worker role project&lt;/li&gt; &lt;li&gt;Email worker project&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;Refactored VS solutions:&lt;/p&gt; &lt;p&gt;Main Web + Worker Role VS solution&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Cloud Service Project 1 (main web + worker role)&lt;/li&gt; &lt;li&gt;Supporting library project 1&lt;/li&gt; &lt;li&gt;Supporting library project 2&lt;/li&gt; &lt;li&gt;Web project&lt;/li&gt; &lt;li&gt;Worker role project&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;Email Handler VS solution&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Cloud Service Project 2 (email handler)&lt;/li&gt; &lt;li&gt;Supporting library project 1&lt;/li&gt; &lt;li&gt;Supporting library project 2&lt;/li&gt; &lt;li&gt;Email worker project&lt;/li&gt;&lt;/ul&gt; &lt;h3&gt;Additional Build Definition Configuration&lt;/h3&gt; &lt;p&gt;The build definition themselves need to be tweaked due to the following reasons:&lt;/p&gt; &lt;ol&gt; &lt;li&gt;We have multiple cloud service project configuration: &lt;em&gt;development (local). staging, production, etc.&lt;/em&gt;&lt;/li&gt; &lt;li&gt;We have multiple build configuration: &lt;em&gt;debug, staging, production, etc.&amp;nbsp; &lt;/em&gt;We use build configuration to include or exclude a certain code path using &lt;strong&gt;#if&lt;/strong&gt;, &lt;strong&gt;#endif &lt;/strong&gt;directive, etc., as well to do configuration transform on web.config or app.config (using &lt;a title="SlowCheetah XML Transform Visual Studio extension" href="http://visualstudiogallery.msdn.microsoft.com/69023d00-a4f9-4a34-a6cd-7e854ba318b5"&gt;SlowCheetah Visual Studio extension&lt;/a&gt;).&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;Therefore, we need to do extra build definition customization in the following sections:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;strong&gt;Process/Build/Projects&lt;/strong&gt;: this need to point to the Visual Studio solution you wish to build (must only contain a single cloud service project).  &lt;li&gt;&lt;strong&gt;Process/Build/Configuration&lt;/strong&gt;: this need to be configured to match the build configuration and platform that you are building for (i.e. &lt;strong&gt;Mixed Platform|Staging&lt;/strong&gt; or &lt;strong&gt;Any CPU|Production&lt;/strong&gt;).  &lt;li&gt;&lt;strong&gt;Process/Build/Advanced/MSBuild Arguments&lt;/strong&gt;: you need to add &lt;strong&gt;/p:TargetProfile={your cloud project configuration setting target}&lt;/strong&gt;, for example: &lt;strong&gt;/p:TargetProfile=Production&lt;/strong&gt; if you are building for Production deployment where each configuration setting comes from the &lt;strong&gt;ServiceConfiguration.Production.cscfg&lt;/strong&gt; file in the Cloud Service project.  &lt;li&gt;&lt;strong&gt;Process/Deployment/Deployment/Windows Azure Deployment Environment&lt;/strong&gt;: you need to tweak this to suit your need.&amp;nbsp; For example what Storage Account you wish the continuous deployment to use (It will upload the built package to the blob storage in the vsdeploy container), whether you wish it to go directly to Production slot or keep it in Staging slot for manual VIP swap, the Azure subscription, which cloud service to deploy to, etc.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;I hope this post will help you if you ever found yourself in similar situation.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;h3&gt;Further notes on Visual Studio solution splitting&lt;/h3&gt; &lt;p&gt;The following has nothing to do with continuous deployment but we realized something else after having tons of issue with Azure .Net SDK upgrade and the way we split up our original VS solution (the one with multiple cloud service projects) into multiple VS solutions.&amp;nbsp; &lt;/p&gt; &lt;p&gt;The problem originated with how we structure our solution, how the Azure .NET SDK upgrade tool and nuget works. We are using project dependencies and not binary dependencies for our own VS projects when establishing references between projects in the solution.&amp;nbsp; We also have Azure DLLs (pulled via nuget package) referenced in multiple projects (not just the web project).&amp;nbsp; And for some reasons, when we update a nuget package such as WindowsAzure.Storage in one of the refactored VS solutions, things will start breaking in the other refactored VS solution, vice versa (build failure, etc.).&amp;nbsp; This has to do with how the reference dependencies is resolved by Visual Studio.&amp;nbsp; When shared supporting project 1 is updated (via nuget) in VS solution 1, it will inject the path relative to that particular solution.&amp;nbsp; When the same supporting project 1 is loaded in VS solution 2, it won’t be able to find the referred DLL in the specific package folder and it will fall back to an older Azure DLL in the C:\Program Files\Microsoft SDKs\Windows Azure\…\ref folder.&lt;/p&gt; &lt;p&gt;So, to solve this issue, we thing the following setup should work nicely.&lt;/p&gt; &lt;p&gt;Say you have 3 cloud services in your product.&amp;nbsp; You would create the following VS solutions:&lt;/p&gt; &lt;ol&gt; &lt;li&gt;A solution which sole purpose is for development only.&amp;nbsp; This solution can have multiple cloud service projects inside of it (as per original).&amp;nbsp; The purpose here is to minimize Azure DLLs and other nuget packages issues when upgrading Azure .Net SDK in the future.&amp;nbsp; Any Azure .Net SDK and related nuget package upgrade should be done in this solution.&amp;nbsp; &lt;li&gt;Solution 1 that only contains cloud service project 1 and all other dependencies (i.e. cloud library, data access, etc.).&amp;nbsp; This will be the designated build solution when deploying cloud service 1.&amp;nbsp; &lt;strong&gt;You should not perform any nuget upgrade in this solution.&amp;nbsp; As a matter of fact, you should not load this in Visual Studio to do any code alteration.&amp;nbsp; This solution is purely for build and continuous deployment purposes.&lt;/strong&gt;&amp;nbsp; &lt;li&gt;Solution 2 that only contains cloud service project 2 and all other dependencies (i.e. cloud library only).&amp;nbsp; This will be the designated build solution when deploying cloud service 2.&amp;nbsp; &lt;strong&gt;You should not perform any nuget upgrade in this solution.&amp;nbsp; As a matter of fact, you should not load this in Visual Studio to do any code alteration.&amp;nbsp; This solution is purely for build and continuous deployment purposes.&lt;/strong&gt; &lt;li&gt;Solution 3 for deploying cloud service 3… &lt;strong&gt;You should not perform any nuget upgrade in this solution.&amp;nbsp; As a matter of fact, you should not load this in Visual Studio to do any code alteration.&amp;nbsp; This solution is purely for build and continuous deployment purposes.&lt;/strong&gt;&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;I think you get the idea.&lt;/p&gt; &lt;p&gt;We think having multiple solutions like so will simplify both Continuous Delivery and Azure SDK updates in the future.&lt;/p&gt;</description><a10:updated>2014-04-25T03:21:48Z</a10:updated></item><item><guid isPermaLink="true">http://blog.jimmychandra.com/post/blog-rebooted</guid><link>http://blog.jimmychandra.com/post/blog-rebooted</link><a10:author><a10:name /></a10:author><title>Blog Rebooted</title><description>&lt;p&gt;It’s been a while since my last blog post.  My old blog is still located in &lt;a href="http://geeks.netindonesia.net/blogs/jimmy"&gt;http://geeks.netindonesia.net/blogs/jimmy&lt;/a&gt; and for whatever reason, about 99% of the time I am unable to connect to it to efficiently post any new blog post or even access it for reading from Australia.  &lt;/p&gt; &lt;p&gt;After giving it a lot of thought I finally decided to start over.  This time around I’m taking things into my own hand instead of hosting the blog in community site where I have no control over the accessibility of such site.&lt;/p&gt; &lt;p&gt;Starting fresh gives me a chance to try new stuffs as well such as trying &lt;a title="Mads Kristensen's MiniBlog engine" href="https://github.com/madskristensen/miniblog" target="_blank"&gt;Mads Kristensen’s MiniBlog&lt;/a&gt; engine that I am hosting as &lt;a title="Azure Web Sites" href="http://azure.microsoft.com/en-us/services/web-sites/" target="_blank"&gt;Azure Web Sites&lt;/a&gt;.  Toyed around with &lt;a title="Orchard CMS" href="http://www.orchardproject.net/" target="_blank"&gt;Orchard CMS&lt;/a&gt; a bit but I think MiniBlog is a better solution for this. &lt;/p&gt; &lt;p&gt;Slowly I’ll try to move what I deem to be interesting contents from my old blog.  So far the attempt to gain access to my posts as an export of some sort is not working. &lt;/p&gt;</description><a10:updated>2014-04-21T13:15:02Z</a10:updated></item></channel></rss>