Skip to content

Instantly share code, notes, and snippets.

View goyalmohit's full-sized avatar

mohit goyal goyalmohit

  • Pune, India
View GitHub Profile
@goyalmohit
goyalmohit / defining-msbuild-properties-project-file-samples-05
Last active December 3, 2017 14:32
Defining MSBuild Properties - Project File Samples 05
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<BuildDir>C:\Source\Repo\MyRepo\Bin</BuildDir>
<Optimize>false</Optimize>
</PropertyGroup>
<Target Name = "Compile">
<!-- Log the file name of the output file directory -->
<Message Text="The output file directory is $(BuildDir)"/>
</Target>
</Project>
@goyalmohit
goyalmohit / defining-msbuild-properties-project-file-samples-06.proj
Last active December 3, 2017 20:45
Defining MSBuild Properties - Project File Samples 06
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<BuildDir>C:\Source\Repo\MyRepo\Bin</BuildDir>
</PropertyGroup>
<PropertyGroup>
<BuildDir>C:\Source\Repo\MyRepo\Bin\Debug</BuildDir>
</PropertyGroup>
</Project>
@goyalmohit
goyalmohit / print-system-path-in-msbuild.proj
Created December 3, 2017 20:45
Understanding MSBuild Properties - Project File Samples 07
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name = "Compile">
<!-- Prints value of environment Variable PATH -->
<Message Text="PATH = $(Path)"/>
</Target>
</Project>
@goyalmohit
goyalmohit / override-environment-variable-in-msbuild.proj
Last active December 3, 2017 20:52
Understanding MSBuild Properties - Project File Samples 08
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Path>C:\Source</Path>
</PropertyGroup>
<Target Name = "Compile">
<!-- Prints value of defined property PATH -->
<Message Text="PATH = $(Path)"/>
</Target>
</Project>
@goyalmohit
goyalmohit / understanding-msbuild-global-properties-01.proj
Last active December 4, 2017 10:54
Understanding MSBuild Properties - Project File Samples 09
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name = "Compile">
<Message Text="OutputDir = $(OutputDir)"/>
<Message Text="Configuration = $(Configuration)"/>
</Target>
</Project>
@goyalmohit
goyalmohit / understanding-msbuild-global-properties-02.proj
Created December 4, 2017 11:05
Understanding MSBuild Properties - Project File Samples 10
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<OutputDir>C:\Temp</OutputDir>
</PropertyGroup>
<Target Name = "Compile">
<Message Text="OutputDir = $(OutputDir)"/>
<Message Text="Configuration = $(Configuration)"/>
</Target>
@goyalmohit
goyalmohit / understanding-msbuild-use-condition-with-property
Created December 4, 2017 11:27
Understanding MSBuild Properties - Use conditions to define default values
<Configuration Condition="'$(Configuration)' == ''">Release</Configuration>
@goyalmohit
goyalmohit / CreateAzureResourceGroup.ps1
Created January 26, 2018 11:29
Create an azure resource Group
# Creates an azure resource group
$resourceGroupName = "mobiNotify-rg"
$locationName = "east us"
New-AzureRmResourceGroup -Name $resourceGroupName -Location $locationName
# Create General Purpose Azure Storage Account
$strAccountName = "mobinotifysa"
$locationName = "east us"
$sku = "Standard_LRS"
New-AzureRmStorageAccount -ResourceGroupName $resourceGroupName -AccountName $strAccountName -SkuName $sku -Location $locationNam
# Creates Azure Blob Storage Container
$strAccountKey = "yztbMxxxxxxxxxxxxxxxxx" # Replace this with your storage key
$strContext = New-AzureStorageContext -StorageAccountName $strAccountName -StorageAccountKey $strAccountKey
$containerName = "testfiles"
New-AzureStorageContainer -Name $containerName -Context $strcontext