The definitive guide on how to deploy a cloud service to Azure using PowerShell

This is a set of scripts:

deploy-all-async.ps1 > starts the deployment process asynchronously.
compile-all.ps1 > compiles all the projects synchronously
cloud-msbuild-compile.ps1 > compiles each project
cloud-deploy.ps1 > deploys the project to Azure


#To execute, cd to this folder and run:
# .\deploy-all-async.ps1

$ScriptPath = Split-Path $MyInvocation.InvocationName

#START COMPILE ********************************************************************************************************

$path = "$ScriptPath\compile-all.ps1"
Invoke-Expression "$path"

#END COMPILE ********************************************************************************************************

#START DEPLOY ********************************************************************************************************

$projects = @("clouddeploymentname1", "clouddeploymentname2", "clouddeploymentname3", "clouddeploymentname4", "clouddepl…

Massive bug in DataRow in .NET Framework

If the actual value of the timestamp column is 7080, notice how the datarow value gets flipped the other way when it is read into a DataSet!


Massive bug in the .NET Framework.

How do I create access control rules from code for an azure cloud service?

How to reinstall all nuget packages if there are issues after moving folders

Update-Package –reinstall

Querying the table storage by a timstamp column filter:

Timestamp ge datetime'2008-07-10T00:00:00Z'

- The month and the date have to contain two digits.

Migrating to Azure redis cache?

They are deprecating the inrole cache starting 2.9 SDK.

It was trouble migrating it.

I recommend you first install the session state provider for the redis cache and then use the strong named redis dll which comes with it for all other assemblies.

If you first install the regular dll via nuget and then install the session state provider, it gets messed up.

Binary Search Algorithm in C# (min, max, middle position)

class BinarySearch

        public static int Find(List<int> list, int searched)
            //First sort input
            BucketSort.Execute(list, ShellSort.Execute);

            //Find min position
            int min = 0;
            //Find max position
            int max = list.Count - 1;

            int loops = 0;

                //Find middle position
                int middle = (min + max) / 2;

                if (searched < list[middle])
                    //Bring down max so we half the search span the next time.
max = middle - 1;
                else if (searched > list[middle])
                    //Bring up min so we can half the search span the next time.
min = middle + 1;
                    Console.WriteLine($"Loop Counter: {loops}");

                    //This is the item
return middle;