Creates file from a template.
Copy-DotnetConfig [-TemplateFilename] <String> [<CommonParameters>]
Name | Alias | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
TemplateFilename | Path to App.config.template or Web.config.template file. | true | false |
EXAMPLE 1
Copy-DotnetConfig .\..\Web\Web.config.template
Creates a Web.config file in Web folder from template.
Adds correct path to MSBuild to Path environment variable.
Initialize-MSBuild [<CommonParameters>]
Downloads latest nuget.exe to specified location.
Install-NugetCli [-Destination] <String> [<CommonParameters>]
Name | Alias | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
Destination | true | false |
EXAMPLE 1
Install-NugetCli .
Install nuget into current directory
Run Entity Framework migrations.
Invoke-EFMigrate [-MigrationAssembly] <String> [[-ConfigFilename] <String>] [<CommonParameters>]
Name | Alias | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
MigrationAssembly | Path to assembly file with migrations. | true | false | ||
ConfigFilename | Path to assembly .config file. If not specified default or parent Web.config will be used. | false | false |
In essential this command tries to find migrate.exe in packages and run it against specified configuration file.
EXAMPLE 1
Invoke-EFMigrate ..\..\Domain\bin\Debug\Domain.dll
Runs all migrations declared in Domain.dll file, using Domain.dll.config as configuration file
Restores packages for solution, project or packages.config.
Invoke-NugetRestore -SolutionPath <String> [<CommonParameters>]
Invoke-NugetRestore -ProjectPath <String> -SolutionDirectory <String> [<CommonParameters>]
Name | Alias | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
SolutionPath | Path to solution. All NuGet packages from included projects will be restored. | true | false | ||
ProjectPath | Path to project or packages.config. | true | false | ||
SolutionDirectory | Path to the solution directory. Not valid when restoring packages for a solution. | true | false |
If nuget command is not found - it will be downloaded to current directory.
EXAMPLE 1
Invoke-NugetRestore .\..\myapp.sln
Restores all packages for myapp solution.
Builds project.
Invoke-ProjectBuild [-ProjectPath] <String> [[-Configuration] <String>] [[-Target] <String>] [[-BuildParams] <String[]>] [<CommonParameters>]
Name | Alias | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
ProjectPath | Path to project. | true | false | ||
Configuration | Build configuration \(Release, Debug, etc.\) | false | false | ||
Target | Build the specified targets in the project. Use a semicolon or comma to separate multiple targets. | false | false | Build | |
BuildParams | Additional build parameters. | false | false |
For more information about Target and BuildParams parameters, see MSBuild documentation.
EXAMPLE 1
Invoke-ProjectBuild .\..\Web\Web.csproj -Configuration 'Release'
Builds solution.
Invoke-SolutionBuild [-SolutionPath] <String> [[-Configuration] <String>] [<CommonParameters>]
Name | Alias | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
SolutionPath | Path to solution. | true | false | ||
Configuration | Build configuration \(Release, Debug, etc.\) | false | false |
EXAMPLE 1
Invoke-SolutionBuild .\..\myapp.sln -Configuration Debug
Loads packages from multiple packages.config and saves to a single file.
Merge-PackageConfigs [-SolutionDirectory] <String> [-OutputPath] <String> [[-Framework] <String>] [<CommonParameters>]
Name | Alias | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
SolutionDirectory | Directory in which to look for packages.config files. | true | false | ||
OutputPath | Path to file in which results should be saved. If file exists, it will be overridden. | true | false | ||
Framework | If specified, only packages with this framework will be included in the results. | false | false |
EXAMPLE 1
Merge-PackageConfigs -SolutionDirectory .\src -OutputPath .\src\packages.merged.config
EXAMPLE 2
Merge-PackageConfigs -SolutionDirectory .\src -OutputPath .\src\packages.merged.net40.config -Framework net40
Merge-PackageConfigs -SolutionDirectory .\src -OutputPath .\src\packages.merged.net452.config -Framework net452
Removes Roslyn analyzer references from Visual Studio project.
Remove-RoslynAnalyzer [-ProjectPath] <String> [<CommonParameters>]
Name | Alias | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
ProjectPath | Path to Visual Studio project. | true | false |
Update version numbers of AssemblyInfo.cs and AssemblyInfo.vb.
Update-AssemblyInfoFile [-AssemblyVersion] <String> [[-AssemblyInfoVersion] <String>] [[-AssemblyFileVersion] <String>] [[-Path] <String>] [-WhatIf] [-Confirm] [<CommonParameters>]
Name | Alias | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
AssemblyVersion | Version | Version string in major.minor.build.revision format. | true | false | |
AssemblyInfoVersion | false | false | |||
AssemblyFileVersion | false | false | |||
Path | Path to root directory. | false | false | ||
WhatIf | wi | false | false | ||
Confirm | cf | false | false |
Based on SetVersion script. http://www.luisrocha.net/2009/11/setting-assembly-version-with-windows.html Copyright (c) 2009 Luis Rocha
Based on GitVersion code. https://github.com/GitTools/GitVersion
EXAMPLE 1
Update-AssemblyInfoFile -AssemblyVersion '6.3.0.0' -AssemblyFileVersion '6.3.1.1' -AssemblyInfoVersion '6.3.0+master.808d1733f5c701c1882816f70c3eafc6e7fce4d4'
Replaces placeholders $(UserName) with values from hashtable.
Update-VariablesInFile [-Path] <String> [-Variables] <Hashtable> [<CommonParameters>]
Name | Alias | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
Path | true | false | |||
Variables | true | false |
EXAMPLE 1
Update-VariablesInFile -Path Config.xml @{UserName='sa'}