This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
param ($InstallPath, $ToolsPath, $Package, $Project) | |
Add-Type -Language CSharpVersion3 -TypeDefinition @' | |
public class MyPackage { | |
public static void Execute(string installPath, string toolsPath, object package, object Project) { | |
// implement Nuget init, install, uninstall script as C# | |
System.Console.WriteLine(installPath); | |
} | |
} | |
'@ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$Result = Get-ChildItem -Path $Env:TEMP |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div style="text-align: center; background: #; padding: 5px; margin: 10px auto; width: 300px;"> | |
<span style="text-align: left; letter-spacing: 1px; font: 8px/1em Verdana, sans-serif; color: #ccc; text-transform: uppercase; display: block; padding: 0 1px;">Advertisement</span> | |
<script type="text/javascript"> | |
GA_googleAddAttr("AdOpt", "0"); | |
GA_googleAddAttr("Origin", "other"); | |
GA_googleAddAttr("theme_bg", "ffffff"); | |
GA_googleAddAttr("theme_border", "bebcad"); | |
GA_googleAddAttr("theme_text", "444444"); | |
GA_googleAddAttr("theme_link", "5785a4"); | |
GA_googleAddAttr("theme_url", "e7e6ea"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Activity mc:Ignorable="sad" x:Class="TfsBuild.Process" xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mt="clr-namespace:Microsoft.TeamFoundation;assembly=Microsoft.TeamFoundation.Common" xmlns:mtbc="clr-namespace:Microsoft.TeamFoundation.Build.Client;assembly=Microsoft.TeamFoundation.Build.Client" xmlns:mtbw="clr-namespace:Microsoft.TeamFoundation.Build.Workflow;assembly=Microsoft.TeamFoundation.Build.Workflow" xmlns:mtbwa="clr-namespace:Microsoft.TeamFoundation.Build.Workflow.Activities;assembly=Microsoft.TeamFoundation.Build.Workflow" xmlns:mtbwt="clr-namespace:Microsoft.TeamFoundation.Build.Workflow.Tracking;assembly=Microsoft.TeamFoundation.Build.Workflow" xmlns:mttbb="clr-namespace:Microsoft.TeamFoundation.TestImpact.BuildIntegration.BuildActivities;assembly=Microsoft.TeamFoundation.TestImpact.BuildIntegration" xmlns:mtvc="clr-namespace:Microsoft.TeamFoundation.VersionControl.Client;assembly=Microsoft.TeamFound |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Just dot-source this in your profile script. | |
function Expand-Alias { | |
[CmdletBinding()] | |
param ( | |
[Parameter(Mandatory=$true)] | |
[string] | |
$Code | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0"> | |
<Target Name="TfsChangesetAssemblyVersion" | |
BeforeTargets="PrepareForBuild"> | |
<PropertyGroup> | |
<TfsChangeset Condition=" '$(TfsChangeset)'=='' ">0</TfsChangeset> | |
</PropertyGroup> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$NewVersion = '10.1.2.3' | |
Get-ChildItem -Include assemblyinfo.cs, assemblyinfo.vb -Recurse | | |
ForEach-Object { | |
$_.IsReadOnly = $false | |
(Get-Content -Path $_) -replace '(?<=Assembly(?:File)?Version\(")[^"]*(?="\))', $NewVersion | | |
Set-Content -Path $_ | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<!-- Example usage: msbuild someproject.csproj /p:AssemblyVersion=1.2.3.4 /p:AssemblyFileVersion=2.3.4.5 /p:AssemblyInformationVersion="Codename Frank" --> | |
<Target Name="OverrideAssemblyVersion" | |
BeforeTargets="CoreCompile"> | |
<!-- CallTarget technique used to allow version properties to be set by another target --> | |
<CallTarget Targets="CoreOverrideAssemblyVersion" | |
Condition=" '$(AssemblyVersion)'!='' or '$(AssemblyFileVersion)'!='' or '$(AssemblyInformationalVersion)'!='' " /> | |
</Target> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[CmdletBinding()] param () ## Try running with or without this line commented | |
$ErrorActionPreference | |
( Get-Variable -Name ErrorActionPreference -Scope Global ).Value | |
# In powershell.exe version 2 both lines 2 and 3 return the same value ('Continue') | |
# regardless of line 1 being commented or uncommented. | |
# In powershell.exe version 3 CTP2, line 2 returns 'SilentlyContinue' when line 1 is uncommented. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[CmdletBinding()] | |
param( | |
[Parameter(Mandatory = $true)] | |
[ValidatePattern('^https?://')] | |
[string] | |
$CollectionUri, | |
[string] | |
$ProjectName = '*', |