Initial state from previous aspnet/templates repo

This commit is contained in:
Steve Sanderson 2017-08-29 01:44:23 -07:00
commit 03d40f712c
748 changed files with 138854 additions and 0 deletions

12
.gitignore vendored Normal file
View File

@ -0,0 +1,12 @@
**/intermediate/**
**/artifacts/**
packages/**
.nuget/**
.build/**
**/.vs/**
*.user
project.lock.json
Templates.BranchSettings.targets
**/.vscode
test/**/bin/**
test/**/obj/**

10
.travis.yml Normal file
View File

@ -0,0 +1,10 @@
language: csharp
sudo: false
branches:
only:
- master
- release
- dev
- /^(.*\/)?ci-.*$/
script:
- ./build.sh --quiet verify

22
CONTRIBUTING.md Normal file
View File

@ -0,0 +1,22 @@
Contributing
======
General Information on contributing is in the [Contributing Guide](https://github.com/aspnet/Home/blob/dev/CONTRIBUTING.md) in the Home repo.
Specific guidelines for this repo are as follows:
# Contributing to an existing template
## Updating preexisting content
If you are simply editing a preexisting file, you can make the code change and submit a pull request.
## Adding or removing a file
**When updating a base template, the following also needs to be updated:**
* *.vstemplate located at src\BaseTemplates folder for the template being updated.
**When updating a template rule, the following also needs to be updated:**
* Templates.xml located at src\Templates.xml: Update the appropriate AddFile or ReplaceFile rule as needed.
* TemplateRules.csproj: Update the appropriate LooseFiles element as needed.
# Contributing a new template
Please open an issue for new template requests.

BIN
Key.snk Normal file

Binary file not shown.

12
LICENSE.txt Normal file
View File

@ -0,0 +1,12 @@
Copyright (c) .NET Foundation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
these files except in compliance with the License. You may obtain a copy of the
License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.

7
README.md Normal file
View File

@ -0,0 +1,7 @@
#Templates
## Getting Started
ASP.NET Templates provide project templates which are used in Visual Studio for creating ASP.NET Core applications.
This project is part of ASP.NET Core. You can find samples, documentation and getting started instructions for ASP.NET Core at the [Home](https://github.com/aspnet/home) repo.
Get [started](https://github.com/aspnet/Templates/wiki/).

View File

@ -0,0 +1,11 @@
<Project ToolsVersion="15.0">
<PropertyGroup>
<IntermediateFolder>$(MSBuildThisFileDirectory)obj\</IntermediateFolder>
<ArtifactsFolder>$(MSBuildThisFileDirectory)artifacts\</ArtifactsFolder>
<TemplatesFolder>$(ArtifactsFolder)templates\</TemplatesFolder>
<TemplatesNoTimestampFolder>$(ArtifactsFolder)templates-notimestamp\</TemplatesNoTimestampFolder>
<TestFolder>$(ArtifactsFolder)test\</TestFolder>
<BuildToolsFolder>$(MSBuildThisFileDirectory).tools\</BuildToolsFolder>
<NuGet>&quot;$(BuildToolsFolder)nuget.exe&quot;</NuGet>
</PropertyGroup>
</Project>

101
Version.props Normal file
View File

@ -0,0 +1,101 @@
<Project ToolsVersion="15.0">
<Import Project="Templates.settings.targets" />
<PropertyGroup Condition=" '$(PackageVersion)' == '' ">
<PackageReleaseVersion>1.0.0</PackageReleaseVersion>
<PackageBuildQuality>$(BUILD_QUALITY)</PackageBuildQuality>
<PackageBuildQuality Condition=" '$(PackageBuildQuality)' == '' ">beta1</PackageBuildQuality>
<PackageVersion>$(PackageReleaseVersion)-$(PackageBuildQuality)</PackageVersion>
<BUILD_NUMBER Condition="'$(BUILD_NUMBER)' == ''">0</BUILD_NUMBER>
<AssemblyReleaseVersion>$(PackageReleaseVersion).$(BUILD_NUMBER)</AssemblyReleaseVersion>
<PackageVersion Condition="'$(NO_TIMESTAMP)' != 'true'">$(PackageVersion)-$([System.DateTime]::Now.ToString("yyyyMMdd"))-$(BUILD_NUMBER)</PackageVersion>
</PropertyGroup>
<PropertyGroup>
<Authors>Microsoft</Authors>
<ProjectUrl>https://github.com/aspnet/templates</ProjectUrl>
<LicenseUrl>https://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm</LicenseUrl>
<ImageUrl>http://go.microsoft.com/fwlink/?LinkID=288859</ImageUrl>
<Tags>template</Tags>
<Company>Microsoft</Company>
<Copyright>Copyright © Microsoft Corporation</Copyright>
<GenerateAssemblyInfo Condition="'$(BuildingInsideVisualStudio)' != ''">False</GenerateAssemblyInfo>
<GenerateAssemblyFileVersionAttribute>False</GenerateAssemblyFileVersionAttribute>
<GenerateAssemblyVersionAttribute>False</GenerateAssemblyVersionAttribute>
<GenerateAssemblyInformationalVersionAttribute>False</GenerateAssemblyInformationalVersionAttribute>
</PropertyGroup>
<PropertyGroup>
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)Key.snk</AssemblyOriginatorKeyFile>
<SignAssembly>true</SignAssembly>
<PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign>
<GitInfoFile>$(MSBuildThisFileDirectory)artifacts\GitInfo.cs</GitInfoFile>
<GitInfoProps>$(MSBuildThisFileDirectory)artifacts\GitInfo.props</GitInfoProps>
</PropertyGroup>
<Target Name="CollectGitInfo">
<PropertyGroup>
<GitInfoCommitCount Condition="'$(COMMIT_HASH)' != ''">$(COMMIT_COUNT)</GitInfoCommitCount>
<GitInfoCommitHash Condition="'$(COMMIT_HASH)' != ''">$(COMMIT_HASH)</GitInfoCommitHash>
<GitExitCode>0</GitExitCode>
</PropertyGroup>
<Exec Command="git rev-list --count HEAD" ConsoleToMSBuild="true" Condition="'$(COMMIT_HASH)' == ''" IgnoreExitCode="true">
<Output TaskParameter="ConsoleOutput" PropertyName="GitInfoCommitCount" />
<Output TaskParameter="ExitCode" PropertyName="GitExitCode" />
</Exec>
<Exec Command="git rev-parse HEAD" ConsoleToMSBuild="true" Condition="'$(COMMIT_HASH)' == ''" IgnoreExitCode="true">
<Output TaskParameter="ConsoleOutput" PropertyName="GitInfoCommitHash" />
<Output TaskParameter="ExitCode" PropertyName="GitExitCode" />
</Exec>
<PropertyGroup Condition="'$(GitExitCode)' != '0'">
<GitInfoCommitCount>0</GitInfoCommitCount>
<GitInfoCommitHash>UNKNOWN</GitInfoCommitHash>
</PropertyGroup>
<PropertyGroup>
<GitCommitInfoContent>
<![CDATA[
[assembly: System.Reflection.AssemblyVersion("$(AssemblyReleaseVersion)")]
[assembly: System.Reflection.AssemblyFileVersion("$(AssemblyReleaseVersion)")]
[assembly: System.Reflection.AssemblyInformationalVersion("$(PackageVersion)+$(GitInfoCommitCount).$(GitInfoCommitHash)")]
namespace Microsoft.TemplateEngine
{
internal static class GitInfo
{
public static string CommitCount { get%3B } = "$(GitInfoCommitCount)"%3B
public static string CommitHash { get%3B } = "$(GitInfoCommitHash)"%3B
}
}
]]>
</GitCommitInfoContent>
<GitInfoPropsContent>
<![CDATA[
<Project ToolsVersion="15.0">
<PropertyGroup>
<Version>$(PackageReleaseVersion)</Version>
<FileVersion>$(PackageReleaseVersion)</FileVersion>
<InformationalVersion>$(PackageVersion)+$(GitInfoCommitCount).$(GitInfoCommitHash)</InformationalVersion>
<PackageReleaseNotes>Commit Hash: $(GitInfoCommitHash)</PackageReleaseNotes>
</PropertyGroup>
</Project>
]]>
</GitInfoPropsContent>
</PropertyGroup>
<WriteLinesToFile File="$(GitInfoFile)"
Lines="$(GitCommitInfoContent)"
Overwrite="true" />
<WriteLinesToFile File="$(GitInfoProps)"
Lines="$(GitInfoPropsContent)"
Overwrite="true" />
</Target>
<ItemGroup>
<Compile Include="$(GitInfoFile)" Condition="Exists('$(GitInfoFile)')" Link="%(RecursiveDir)%(Filename)%(Extension)" />
<Compile Include="$(MSBuildThisFileDirectory)src/GitInfo.cs" Condition="!Exists('$(GitInfoFile)')" Link="%(RecursiveDir)%(Filename)%(Extension)" />
</ItemGroup>
<Import Project="$(GitInfoProps)" Condition="Exists('$(GitInfoProps)')" />
</Project>

13
appveyor.yml Normal file
View File

@ -0,0 +1,13 @@
init:
- git config --global core.autocrlf true
branches:
only:
- master
- release
- dev
- /^(.*\/)?ci-.*$/
build_script:
- build.cmd --quiet verify
clone_depth: 1
test: off
deploy: off

4
build.cmd Normal file
View File

@ -0,0 +1,4 @@
@ECHO OFF
PowerShell -NoProfile -NoLogo -ExecutionPolicy unrestricted -Command "[System.Threading.Thread]::CurrentThread.CurrentCulture = ''; [System.Threading.Thread]::CurrentThread.CurrentUICulture = '';& '%~dp0dotnet-install.ps1' %*; exit $LASTEXITCODE"
tools\build.cmd

503
dotnet-install.ps1 vendored Normal file
View File

@ -0,0 +1,503 @@
#
# Copyright (c) .NET Foundation and contributors. All rights reserved.
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
#
<#
.SYNOPSIS
Installs dotnet cli
.DESCRIPTION
Installs dotnet cli. If dotnet installation already exists in the given directory
it will update it only if the requested version differs from the one already installed.
.PARAMETER Channel
Default: LTS
Download from the Channel specified. Possible values:
- Current - most current release
- LTS - most current supported release
- 2-part version in a format A.B - represents a specific release
examples: 2.0; 1.0
- Branch name
examples: release/2.0.0; Master
.PARAMETER Version
Default: latest
Represents a build version on specific channel. Possible values:
- latest - most latest build on specific channel
- coherent - most latest coherent build on specific channel
coherent applies only to SDK downloads
- 3-part version in a format A.B.C - represents specific version of build
examples: 2.0.0-preview2-006120; 1.1.0
.PARAMETER InstallDir
Default: %LocalAppData%\Microsoft\dotnet
Path to where to install dotnet. Note that binaries will be placed directly in a given directory.
.PARAMETER Architecture
Default: <auto> - this value represents currently running OS architecture
Architecture of dotnet binaries to be installed.
Possible values are: <auto>, x64 and x86
.PARAMETER SharedRuntime
Default: false
Installs just the shared runtime bits, not the entire SDK
.PARAMETER DryRun
If set it will not perform installation but instead display what command line to use to consistently install
currently requested version of dotnet cli. In example if you specify version 'latest' it will display a link
with specific version so that this command can be used deterministicly in a build script.
It also displays binaries location if you prefer to install or download it yourself.
.PARAMETER NoPath
By default this script will set environment variable PATH for the current process to the binaries folder inside installation folder.
If set it will display binaries location but not set any environment variable.
.PARAMETER Verbose
Displays diagnostics information.
.PARAMETER AzureFeed
Default: https://dotnetcli.azureedge.net/dotnet
This parameter typically is not changed by the user.
It allows to change URL for the Azure feed used by this installer.
.PARAMETER UncachedFeed
This parameter typically is not changed by the user.
It allows to change URL for the Uncached feed used by this installer.
.PARAMETER ProxyAddress
If set, the installer will use the proxy when making web requests
.PARAMETER ProxyUseDefaultCredentials
Default: false
Use default credentials, when using proxy address.
#>
[cmdletbinding()]
param(
[string]$Channel="release/2.0.0",
[string]$Version="2.0.1-servicing-006924",
[string]$InstallDir="<auto>",
[string]$Architecture="<auto>",
[switch]$SharedRuntime,
[switch]$DryRun,
[switch]$NoPath,
[string]$AzureFeed="https://dotnetcli.azureedge.net/dotnet",
[string]$UncachedFeed="https://dotnetcli.blob.core.windows.net/dotnet",
[string]$ProxyAddress,
[switch]$ProxyUseDefaultCredentials
)
Set-StrictMode -Version Latest
$ErrorActionPreference="Stop"
$ProgressPreference="SilentlyContinue"
$BinFolderRelativePath=""
# example path with regex: shared/1.0.0-beta-12345/somepath
$VersionRegEx="/\d+\.\d+[^/]+/"
$OverrideNonVersionedFiles=$true
function Say($str) {
Write-Output "dotnet-install: $str"
}
function Say-Verbose($str) {
Write-Verbose "dotnet-install: $str"
}
function Say-Invocation($Invocation) {
$command = $Invocation.MyCommand;
$args = (($Invocation.BoundParameters.Keys | foreach { "-$_ `"$($Invocation.BoundParameters[$_])`"" }) -join " ")
Say-Verbose "$command $args"
}
function Invoke-With-Retry([ScriptBlock]$ScriptBlock, [int]$MaxAttempts = 3, [int]$SecondsBetweenAttempts = 1) {
$Attempts = 0
while ($true) {
try {
return $ScriptBlock.Invoke()
}
catch {
$Attempts++
if ($Attempts -lt $MaxAttempts) {
Start-Sleep $SecondsBetweenAttempts
}
else {
throw
}
}
}
}
function Get-Machine-Architecture() {
Say-Invocation $MyInvocation
# possible values: AMD64, IA64, x86
return $ENV:PROCESSOR_ARCHITECTURE
}
# TODO: Architecture and CLIArchitecture should be unified
function Get-CLIArchitecture-From-Architecture([string]$Architecture) {
Say-Invocation $MyInvocation
switch ($Architecture.ToLower()) {
{ $_ -eq "<auto>" } { return Get-CLIArchitecture-From-Architecture $(Get-Machine-Architecture) }
{ ($_ -eq "amd64") -or ($_ -eq "x64") } { return "x64" }
{ $_ -eq "x86" } { return "x86" }
default { throw "Architecture not supported. If you think this is a bug, please report it at https://github.com/dotnet/cli/issues" }
}
}
function Get-Version-Info-From-Version-Text([string]$VersionText) {
Say-Invocation $MyInvocation
$Data = @($VersionText.Split([char[]]@(), [StringSplitOptions]::RemoveEmptyEntries));
$VersionInfo = @{}
$VersionInfo.CommitHash = $Data[0].Trim()
$VersionInfo.Version = $Data[1].Trim()
return $VersionInfo
}
function Load-Assembly([string] $Assembly) {
try {
Add-Type -Assembly $Assembly | Out-Null
}
catch {
# On Nano Server, Powershell Core Edition is used. Add-Type is unable to resolve base class assemblies because they are not GAC'd.
# Loading the base class assemblies is not unnecessary as the types will automatically get resolved.
}
}
function GetHTTPResponse([Uri] $Uri)
{
Invoke-With-Retry(
{
$HttpClient = $null
try {
# HttpClient is used vs Invoke-WebRequest in order to support Nano Server which doesn't support the Invoke-WebRequest cmdlet.
Load-Assembly -Assembly System.Net.Http
if(-not $ProxyAddress)
{
# Despite no proxy being explicitly specified, we may still be behind a default proxy
$DefaultProxy = [System.Net.WebRequest]::DefaultWebProxy;
if($DefaultProxy -and (-not $DefaultProxy.IsBypassed($Uri))){
$ProxyAddress = $DefaultProxy.GetProxy($Uri).OriginalString
$ProxyUseDefaultCredentials = $true
}
}
if($ProxyAddress){
$HttpClientHandler = New-Object System.Net.Http.HttpClientHandler
$HttpClientHandler.Proxy = New-Object System.Net.WebProxy -Property @{Address=$ProxyAddress;UseDefaultCredentials=$ProxyUseDefaultCredentials}
$HttpClient = New-Object System.Net.Http.HttpClient -ArgumentList $HttpClientHandler
}
else {
$HttpClient = New-Object System.Net.Http.HttpClient
}
# Default timeout for HttpClient is 100s. For a 50 MB download this assumes 500 KB/s average, any less will time out
# 10 minutes allows it to work over much slower connections.
$HttpClient.Timeout = New-TimeSpan -Minutes 10
$Response = $HttpClient.GetAsync($Uri).Result
if (($Response -eq $null) -or (-not ($Response.IsSuccessStatusCode)))
{
$ErrorMsg = "Failed to download $Uri."
if ($Response -ne $null)
{
$ErrorMsg += " $Response"
}
throw $ErrorMsg
}
return $Response
}
finally {
if ($HttpClient -ne $null) {
$HttpClient.Dispose()
}
}
})
}
function Get-Latest-Version-Info([string]$AzureFeed, [string]$Channel, [bool]$Coherent) {
Say-Invocation $MyInvocation
$VersionFileUrl = $null
if ($SharedRuntime) {
$VersionFileUrl = "$UncachedFeed/Runtime/$Channel/latest.version"
}
else {
if ($Coherent) {
$VersionFileUrl = "$UncachedFeed/Sdk/$Channel/latest.coherent.version"
}
else {
$VersionFileUrl = "$UncachedFeed/Sdk/$Channel/latest.version"
}
}
$Response = GetHTTPResponse -Uri $VersionFileUrl
$StringContent = $Response.Content.ReadAsStringAsync().Result
switch ($Response.Content.Headers.ContentType) {
{ ($_ -eq "application/octet-stream") } { $VersionText = [Text.Encoding]::UTF8.GetString($StringContent) }
{ ($_ -eq "text/plain") } { $VersionText = $StringContent }
{ ($_ -eq "text/plain; charset=UTF-8") } { $VersionText = $StringContent }
default { throw "``$Response.Content.Headers.ContentType`` is an unknown .version file content type." }
}
$VersionInfo = Get-Version-Info-From-Version-Text $VersionText
return $VersionInfo
}
function Get-Specific-Version-From-Version([string]$AzureFeed, [string]$Channel, [string]$Version) {
Say-Invocation $MyInvocation
switch ($Version.ToLower()) {
{ $_ -eq "latest" } {
$LatestVersionInfo = Get-Latest-Version-Info -AzureFeed $AzureFeed -Channel $Channel -Coherent $False
return $LatestVersionInfo.Version
}
{ $_ -eq "coherent" } {
$LatestVersionInfo = Get-Latest-Version-Info -AzureFeed $AzureFeed -Channel $Channel -Coherent $True
return $LatestVersionInfo.Version
}
default { return $Version }
}
}
function Get-Download-Link([string]$AzureFeed, [string]$Channel, [string]$SpecificVersion, [string]$CLIArchitecture) {
Say-Invocation $MyInvocation
if ($SharedRuntime) {
$PayloadURL = "$AzureFeed/Runtime/$SpecificVersion/dotnet-runtime-$SpecificVersion-win-$CLIArchitecture.zip"
}
else {
$PayloadURL = "$AzureFeed/Sdk/$SpecificVersion/dotnet-sdk-$SpecificVersion-win-$CLIArchitecture.zip"
}
Say-Verbose "Constructed primary payload URL: $PayloadURL"
return $PayloadURL
}
function Get-LegacyDownload-Link([string]$AzureFeed, [string]$Channel, [string]$SpecificVersion, [string]$CLIArchitecture) {
Say-Invocation $MyInvocation
if ($SharedRuntime) {
$PayloadURL = "$AzureFeed/Runtime/$SpecificVersion/dotnet-win-$CLIArchitecture.$SpecificVersion.zip"
}
else {
$PayloadURL = "$AzureFeed/Sdk/$SpecificVersion/dotnet-dev-win-$CLIArchitecture.$SpecificVersion.zip"
}
Say-Verbose "Constructed legacy payload URL: $PayloadURL"
return $PayloadURL
}
function Get-User-Share-Path() {
Say-Invocation $MyInvocation
$InstallRoot = $env:DOTNET_INSTALL_DIR
if (!$InstallRoot) {
$InstallRoot = "$env:LocalAppData\Microsoft\dotnet"
}
return $InstallRoot
}
function Resolve-Installation-Path([string]$InstallDir) {
Say-Invocation $MyInvocation
if ($InstallDir -eq "<auto>") {
return Get-User-Share-Path
}
return $InstallDir
}
function Get-Version-Info-From-Version-File([string]$InstallRoot, [string]$RelativePathToVersionFile) {
Say-Invocation $MyInvocation
$VersionFile = Join-Path -Path $InstallRoot -ChildPath $RelativePathToVersionFile
Say-Verbose "Local version file: $VersionFile"
if (Test-Path $VersionFile) {
$VersionText = cat $VersionFile
Say-Verbose "Local version file text: $VersionText"
return Get-Version-Info-From-Version-Text $VersionText
}
Say-Verbose "Local version file not found."
return $null
}
function Is-Dotnet-Package-Installed([string]$InstallRoot, [string]$RelativePathToPackage, [string]$SpecificVersion) {
Say-Invocation $MyInvocation
$DotnetPackagePath = Join-Path -Path $InstallRoot -ChildPath $RelativePathToPackage | Join-Path -ChildPath $SpecificVersion
Say-Verbose "Is-Dotnet-Package-Installed: Path to a package: $DotnetPackagePath"
return Test-Path $DotnetPackagePath -PathType Container
}
function Get-Absolute-Path([string]$RelativeOrAbsolutePath) {
# Too much spam
# Say-Invocation $MyInvocation
return $ExecutionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath($RelativeOrAbsolutePath)
}
function Get-Path-Prefix-With-Version($path) {
$match = [regex]::match($path, $VersionRegEx)
if ($match.Success) {
return $entry.FullName.Substring(0, $match.Index + $match.Length)
}
return $null
}
function Get-List-Of-Directories-And-Versions-To-Unpack-From-Dotnet-Package([System.IO.Compression.ZipArchive]$Zip, [string]$OutPath) {
Say-Invocation $MyInvocation
$ret = @()
foreach ($entry in $Zip.Entries) {
$dir = Get-Path-Prefix-With-Version $entry.FullName
if ($dir -ne $null) {
$path = Get-Absolute-Path $(Join-Path -Path $OutPath -ChildPath $dir)
if (-Not (Test-Path $path -PathType Container)) {
$ret += $dir
}
}
}
$ret = $ret | Sort-Object | Get-Unique
$values = ($ret | foreach { "$_" }) -join ";"
Say-Verbose "Directories to unpack: $values"
return $ret
}
# Example zip content and extraction algorithm:
# Rule: files if extracted are always being extracted to the same relative path locally
# .\
# a.exe # file does not exist locally, extract
# b.dll # file exists locally, override only if $OverrideFiles set
# aaa\ # same rules as for files
# ...
# abc\1.0.0\ # directory contains version and exists locally
# ... # do not extract content under versioned part
# abc\asd\ # same rules as for files
# ...
# def\ghi\1.0.1\ # directory contains version and does not exist locally
# ... # extract content
function Extract-Dotnet-Package([string]$ZipPath, [string]$OutPath) {
Say-Invocation $MyInvocation
Load-Assembly -Assembly System.IO.Compression.FileSystem
Set-Variable -Name Zip
try {
$Zip = [System.IO.Compression.ZipFile]::OpenRead($ZipPath)
$DirectoriesToUnpack = Get-List-Of-Directories-And-Versions-To-Unpack-From-Dotnet-Package -Zip $Zip -OutPath $OutPath
foreach ($entry in $Zip.Entries) {
$PathWithVersion = Get-Path-Prefix-With-Version $entry.FullName
if (($PathWithVersion -eq $null) -Or ($DirectoriesToUnpack -contains $PathWithVersion)) {
$DestinationPath = Get-Absolute-Path $(Join-Path -Path $OutPath -ChildPath $entry.FullName)
$DestinationDir = Split-Path -Parent $DestinationPath
$OverrideFiles=$OverrideNonVersionedFiles -Or (-Not (Test-Path $DestinationPath))
if ((-Not $DestinationPath.EndsWith("\")) -And $OverrideFiles) {
New-Item -ItemType Directory -Force -Path $DestinationDir | Out-Null
[System.IO.Compression.ZipFileExtensions]::ExtractToFile($entry, $DestinationPath, $OverrideNonVersionedFiles)
}
}
}
}
finally {
if ($Zip -ne $null) {
$Zip.Dispose()
}
}
}
function DownloadFile([Uri]$Uri, [string]$OutPath) {
$Stream = $null
try {
$Response = GetHTTPResponse -Uri $Uri
$Stream = $Response.Content.ReadAsStreamAsync().Result
$File = [System.IO.File]::Create($OutPath)
$Stream.CopyTo($File)
$File.Close()
}
finally {
if ($Stream -ne $null) {
$Stream.Dispose()
}
}
}
function Prepend-Sdk-InstallRoot-To-Path([string]$InstallRoot, [string]$BinFolderRelativePath) {
$BinPath = Get-Absolute-Path $(Join-Path -Path $InstallRoot -ChildPath $BinFolderRelativePath)
if (-Not $NoPath) {
Say "Adding to current process PATH: `"$BinPath`". Note: This change will not be visible if PowerShell was run as a child process."
$env:path = "$BinPath;" + $env:path
}
else {
Say "Binaries of dotnet can be found in $BinPath"
}
}
$CLIArchitecture = Get-CLIArchitecture-From-Architecture $Architecture
$SpecificVersion = Get-Specific-Version-From-Version -AzureFeed $AzureFeed -Channel $Channel -Version $Version
$DownloadLink = Get-Download-Link -AzureFeed $AzureFeed -Channel $Channel -SpecificVersion $SpecificVersion -CLIArchitecture $CLIArchitecture
$LegacyDownloadLink = Get-LegacyDownload-Link -AzureFeed $AzureFeed -Channel $Channel -SpecificVersion $SpecificVersion -CLIArchitecture $CLIArchitecture
if ($DryRun) {
Say "Payload URLs:"
Say "Primary - $DownloadLink"
Say "Legacy - $LegacyDownloadLink"
Say "Repeatable invocation: .\$($MyInvocation.MyCommand) -Version $SpecificVersion -Channel $Channel -Architecture $CLIArchitecture -InstallDir $InstallDir"
exit 0
}
$InstallRoot = Resolve-Installation-Path $InstallDir
Say-Verbose "InstallRoot: $InstallRoot"
$IsSdkInstalled = Is-Dotnet-Package-Installed -InstallRoot $InstallRoot -RelativePathToPackage "sdk" -SpecificVersion $SpecificVersion
Say-Verbose ".NET SDK installed? $IsSdkInstalled"
if ($IsSdkInstalled) {
Say ".NET SDK version $SpecificVersion is already installed."
Prepend-Sdk-InstallRoot-To-Path -InstallRoot $InstallRoot -BinFolderRelativePath $BinFolderRelativePath
exit 0
}
New-Item -ItemType Directory -Force -Path $InstallRoot | Out-Null
$installDrive = $((Get-Item $InstallRoot).PSDrive.Name);
Write-Output "${installDrive}:";
$free = Get-CimInstance -Class win32_logicaldisk | where Deviceid -eq "${installDrive}:"
if ($free.Freespace / 1MB -le 100 ) {
Say "There is not enough disk space on drive ${installDrive}:"
exit 0
}
$ZipPath = [System.IO.Path]::GetTempFileName()
Say-Verbose "Zip path: $ZipPath"
Say "Downloading link: $DownloadLink"
try {
DownloadFile -Uri $DownloadLink -OutPath $ZipPath
}
catch {
Say "Cannot download: $DownloadLink"
$DownloadLink = $LegacyDownloadLink
$ZipPath = [System.IO.Path]::GetTempFileName()
Say-Verbose "Legacy zip path: $ZipPath"
Say "Downloading legacy link: $DownloadLink"
DownloadFile -Uri $DownloadLink -OutPath $ZipPath
}
Say "Extracting zip from $DownloadLink"
Extract-Dotnet-Package -ZipPath $ZipPath -OutPath $InstallRoot
Remove-Item $ZipPath
Prepend-Sdk-InstallRoot-To-Path -InstallRoot $InstallRoot -BinFolderRelativePath $BinFolderRelativePath
Say "Installation finished"
exit 0

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>Microsoft.DotNet.Common.ItemTemplates</id>
<version>$version$</version>
<authors>Microsoft</authors>
<description>Common File Templates for Microsoft Template Engine</description>
<language>en-US</language>
<projectUrl>https://github.com/dotnet/templating</projectUrl>
<licenseUrl>https://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm</licenseUrl>
<packageTypes>
<packageType name="Template" />
</packageTypes>
</metadata>
<files>
<file src="content/**" target="" />
</files>
</package>

View File

@ -0,0 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\Version.props" />
<PropertyGroup>
<TargetFramework>netstandard1.0</TargetFramework>
<NuspecFile>$(MSBuildThisFileDirectory)\Templates.nuspec</NuspecFile>
<NuspecProperties>version=$(PackageVersion)</NuspecProperties>
<IncludeBuildOutput>False</IncludeBuildOutput>
<IncludeBuildOutput>False</IncludeBuildOutput>
<IncludeSource>False</IncludeSource>
<GenerateAssemblyInfo>False</GenerateAssemblyInfo>
<OutputPath>$(TemplatesFolder)</OutputPath>
<EnableDefaultItems>False</EnableDefaultItems>
<BaseIntermediateOutputPath>$(MSBuildThisFileDirectory)..\..\artifacts\scratch</BaseIntermediateOutputPath>
</PropertyGroup>
<ItemGroup>
<PackageReference Remove="Microsoft.NETCore.App" />
<Compile Remove="$(GitInfoFile)" />
<Compile Remove="$(MSBuildThisFileDirectory)../../src/GitInfo.cs" />
<None Remove="**/*.csproj" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,12 @@
{
"$schema": "http://json.schemastore.org/dotnetcli.host",
"symbolInfo": {
"SdkVersion": {
"longName": "sdk-version",
"shortName": ""
},
"dotnet-cli-version": {
"isHidden": "true"
}
}
}

View File

@ -0,0 +1,54 @@
{
"$schema": "http://json.schemastore.org/template",
"author": "Microsoft",
"classifications": ["Config"],
"name": "global.json file",
"generatorVersions": "[1.0.0.0-*)",
"description": "A file for selecting the .NET Core SDK version.",
"tags": {
"type": "item"
},
"groupIdentity": "GlobalJsonFile",
"precedence": "100",
"identity": "Microsoft.Standard.QuickStarts.GlobalJsonFile",
"shortName": "globaljson",
"sourceName": "unused",
"primaryOutputs": [ { "path": "global.json" } ],
"defaultName": "global.json",
"symbols": {
"HostIdentifier": {
"type": "bind",
"binding": "HostIdentifier"
},
"SdkVersion": {
"type": "parameter",
"datatype": "string",
"description": "The version of the .NET Core SDK to use."
},
"dotnet-cli-version": {
"type": "parameter",
"datatype": "string"
},
"CombinedVersion": {
"type": "generated",
"generator": "coalesce",
"parameters": {
"sourceVariableName": "SdkVersion",
"fallbackVariableName": "dotnet-cli-version"
},
"replaces": "SDK_VERSION"
},
},
"postActions": [
{
"condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
"description": "Opens global.json in the editor",
"manualInstructions": [ ],
"actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6",
"args": {
"files": "0"
},
"continueOnError": true
}
]
}

View File

@ -0,0 +1,5 @@
{
"sdk": {
"version": "SDK_VERSION"
}
}

View File

@ -0,0 +1,3 @@
{
"$schema": "http://json.schemastore.org/dotnetcli.host"
}

View File

@ -0,0 +1,36 @@
{
"$schema": "http://json.schemastore.org/template",
"author": "Microsoft",
"classifications": ["Config"],
"name": "Nuget Config",
"generatorVersions": "[1.0.0.0-*)",
"description": "A file for configuring the locations NuGet will search for packages",
"tags": {
"type": "item"
},
"groupIdentity": "ItemNugetConfig",
"precedence": "100",
"identity": "Microsoft.Standard.QuickStarts.Nuget.Config",
"shortName": "nugetconfig",
"sourceName": "Nuget",
"primaryOutputs": [ { "path": "nuget.config" } ],
"defaultName": "nuget.config",
"symbols": {
"HostIdentifier": {
"type": "bind",
"binding": "HostIdentifier"
}
},
"postActions": [
{
"condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
"description": "Opens nuget.config in the editor",
"manualInstructions": [ ],
"actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6",
"args": {
"files": "0"
},
"continueOnError": true
}
]
}

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<!--To inherit the global NuGet package sources remove the <clear/> line below -->
<clear />
</packageSources>
</configuration>

View File

@ -0,0 +1,3 @@
{
"$schema": "http://json.schemastore.org/dotnetcli.host"
}

View File

@ -0,0 +1,15 @@
{
"$schema": "http://json.schemastore.org/template",
"author": "Microsoft",
"classifications": ["Solution"],
"name": "Solution File",
"generatorVersions": "[1.0.0.0-*)",
"description": "Create an empty solution containing no projects",
"groupIdentity": "ItemSolution",
"precedence": "100",
"identity": "Microsoft.Standard.QuickStarts.Solution",
"shortName": "sln",
"sourceName": "Solution1",
"primaryOutputs": [ { "path": "Solution1.sln" } ],
"defaultName": "Solution1"
}

View File

@ -0,0 +1,18 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26124.0
MinimumVisualStudioVersion = 15.0.26124.0
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,3 @@
{
"$schema": "http://json.schemastore.org/dotnetcli.host"
}

View File

@ -0,0 +1,36 @@
{
"$schema": "http://json.schemastore.org/template",
"author": "Microsoft",
"classifications": ["Config"],
"name": "Web Config",
"generatorVersions": "[1.0.0.0-*)",
"description": "A file used to configure Web Application settings",
"tags": {
"type": "item"
},
"groupIdentity": "ItemWebConfig",
"precedence": "100",
"identity": "Microsoft.Standard.QuickStarts.Web.Config",
"shortName": "webconfig",
"sourceName": "WebConfig",
"primaryOutputs": [ { "path": "web.config" } ],
"defaultName": "web.config",
"symbols": {
"HostIdentifier": {
"type": "bind",
"binding": "HostIdentifier"
}
},
"postActions": [
{
"condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
"description": "Opens web.config in the editor",
"manualInstructions": [ ],
"actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6",
"args": {
"files": "0"
},
"continueOnError": true
}
]
}

View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<!-- To customize the asp.net core module uncomment and edit the following section.
For more info see https://go.microsoft.com/fwlink/?linkid=838655 -->
<!--
<system.webServer>
<handlers>
<remove name="aspNetCore"/>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified"/>
</handlers>
<aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" />
</system.webServer>
-->
</configuration>

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>Microsoft.DotNet.Common.ProjectTemplates.1.x</id>
<version>$version$</version>
<authors>Microsoft</authors>
<description>.NET Template Pack for Microsoft Template Engine</description>
<language>en-US</language>
<projectUrl>https://github.com/dotnet/templating</projectUrl>
<licenseUrl>https://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm</licenseUrl>
<packageTypes>
<packageType name="Template" />
</packageTypes>
</metadata>
<files>
<file src="content/**" target="" />
</files>
</package>

View File

@ -0,0 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\Version.props" />
<PropertyGroup>
<TargetFramework>netstandard1.0</TargetFramework>
<NuspecFile>$(MSBuildThisFileDirectory)\Templates.nuspec</NuspecFile>
<NuspecProperties>version=$(PackageVersion)</NuspecProperties>
<IncludeBuildOutput>False</IncludeBuildOutput>
<IncludeBuildOutput>False</IncludeBuildOutput>
<IncludeSource>False</IncludeSource>
<GenerateAssemblyInfo>False</GenerateAssemblyInfo>
<OutputPath>$(TemplatesFolder)</OutputPath>
<EnableDefaultItems>False</EnableDefaultItems>
<BaseIntermediateOutputPath>$(MSBuildThisFileDirectory)..\..\artifacts\scratch</BaseIntermediateOutputPath>
</PropertyGroup>
<ItemGroup>
<PackageReference Remove="Microsoft.NETCore.App" />
<Compile Remove="$(GitInfoFile)" />
<Compile Remove="$(MSBuildThisFileDirectory)../../src/GitInfo.cs" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,20 @@
{
"$schema": "http://json.schemastore.org/dotnetcli.host",
"symbolInfo": {
"TargetFrameworkOverride": {
"isHidden": "true",
"longName": "target-framework-override",
"shortName": ""
},
"Framework": {
"longName": "framework"
},
"skipRestore": {
"longName": "no-restore",
"shortName": ""
}
},
"usageExamples": [
"--framework netcoreapp1.1"
]
}

View File

@ -0,0 +1,125 @@
{
"$schema": "http://json.schemastore.org/template",
"author": "Microsoft",
"classifications": ["Common", "Library"],
"name": "Class library",
"generatorVersions": "[1.0.0.0-*)",
"description": "A project for creating a class library that targets .NET Standard or .NET Core",
"groupIdentity": "Microsoft.Common.Library",
"precedence": "100",
"identity": "Microsoft.Common.Library.CSharp",
"shortName": "classlib",
"tags": {
"language": "C#",
"type": "project"
},
"sourceName": "Company.ClassLibrary1",
"preferNameDirectory": true,
"baselines": {
"app": {
"description": "Target netcoreapp",
"defaultOverrides": {
"Framework": "netcoreapp1.1"
}
},
"standard": {
"description": "Target netstandard",
"defaultOverrides": {
"Framework": "netstandard1.4"
}
}
},
"symbols": {
"TargetFrameworkOverride": {
"type": "parameter",
"description": "Overrides the target framework",
"replaces": "TargetFrameworkOverride",
"datatype": "string",
"defaultValue": ""
},
"Framework": {
"type": "parameter",
"description": "The target framework for the project.",
"replaces": "netstandard1.4",
"datatype": "choice",
"choices": [
{
"choice": "netcoreapp1.0",
"description": "Target netcoreapp1.0"
},
{
"choice": "netcoreapp1.1",
"description": "Target netcoreapp1.1"
},
{
"choice": "netstandard1.0",
"description": "Target netstandard1.0"
},
{
"choice": "netstandard1.1",
"description": "Target netstandard1.1"
},
{
"choice": "netstandard1.2",
"description": "Target netstandard1.2"
},
{
"choice": "netstandard1.3",
"description": "Target netstandard1.3"
},
{
"choice": "netstandard1.4",
"description": "Target netstandard1.4"
},
{
"choice": "netstandard1.5",
"description": "Target netstandard1.5"
},
{
"choice": "netstandard1.6",
"description": "Target netstandard1.6"
}
],
"defaultValue": "netstandard1.4"
},
"HostIdentifier": {
"type": "bind",
"binding": "HostIdentifier"
},
"skipRestore": {
"type": "parameter",
"datatype": "bool",
"description": "If specified, skips the automatic restore of the project on create.",
"defaultValue": "false"
}
},
"primaryOutputs": [
{ "path": "Company.ClassLibrary1.csproj" },
{
"condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
"path": "Class1.cs"
}
],
"defaultName": "ClassLibrary1",
"postActions": [
{
"condition": "(!skipRestore)",
"description": "Restore NuGet packages required by this project.",
"manualInstructions": [
{ "text": "Run 'dotnet restore'" }
],
"actionId": "210D431B-A78B-4D2F-B762-4ED3E3EA9025",
"continueOnError": true
},
{
"condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
"description": "Opens Class1.cs in the editor",
"manualInstructions": [ ],
"actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6",
"args": {
"files": "1"
},
"continueOnError": true
}
]
}

View File

@ -0,0 +1,8 @@
using System;
namespace Company.ClassLibrary1
{
public class Class1
{
}
}

View File

@ -0,0 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework Condition="'$(TargetFrameworkOverride)' == ''">netstandard1.4</TargetFramework>
<TargetFramework Condition="'$(TargetFrameworkOverride)' != ''">TargetFrameworkOverride</TargetFramework>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,17 @@
{
"$schema": "http://json.schemastore.org/dotnetcli.host",
"symbolInfo": {
"TargetFrameworkOverride": {
"isHidden": "true",
"longName": "target-framework-override",
"shortName": ""
},
"Framework": {
"longName": "framework"
},
"skipRestore": {
"longName": "no-restore",
"shortName": ""
}
}
}

View File

@ -0,0 +1,101 @@
{
"$schema": "http://json.schemastore.org/template",
"author": "Microsoft",
"classifications": ["Common", "Library"],
"name": "Class library",
"generatorVersions": "[1.0.0.0-*)",
"description": "A project for creating a class library that targets .NET Standard or .NET Core",
"groupIdentity": "Microsoft.Common.Library",
"precedence": "100",
"identity": "Microsoft.Common.Library.FSharp",
"shortName": "classlib",
"tags": {
"language": "F#",
"type": "project"
},
"sourceName": "Company.ClassLibrary1",
"preferNameDirectory": true,
"baselines": {
"app": {
"description": "Target netcoreapp",
"defaultOverrides": {
"Framework": "netcoreapp1.1"
}
},
"standard": {
"description": "Target netstandard",
"defaultOverrides": {
"Framework": "netstandard1.6"
}
}
},
"symbols": {
"TargetFrameworkOverride": {
"type": "parameter",
"description": "Overrides the target framework",
"replaces": "TargetFrameworkOverride",
"datatype": "string",
"defaultValue": ""
},
"Framework": {
"type": "parameter",
"description": "The target framework for the project.",
"replaces": "netcoreapp1.1",
"datatype": "choice",
"choices": [
{
"choice": "netcoreapp1.0",
"description": "Target netcoreapp1.0"
},
{
"choice": "netcoreapp1.1",
"description": "Target netcoreapp1.1"
},
{
"choice": "netstandard1.6",
"description": "Target netstandard1.6"
}
],
"defaultValue": "netcoreapp1.1"
},
"HostIdentifier": {
"type": "bind",
"binding": "HostIdentifier"
},
"skipRestore": {
"type": "parameter",
"datatype": "bool",
"description": "If specified, skips the automatic restore of the project on create.",
"defaultValue": "false"
}
},
"primaryOutputs": [
{ "path": "Company.ClassLibrary1.fsproj" },
{
"condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
"path": "Library.fs"
}
],
"defaultName": "ClassLibrary1",
"postActions": [
{
"condition": "(!skipRestore)",
"description": "Restore NuGet packages required by this project.",
"manualInstructions": [
{ "text": "Run 'dotnet restore'" }
],
"actionId": "210D431B-A78B-4D2F-B762-4ED3E3EA9025",
"continueOnError": true
},
{
"condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
"description": "Opens Library.fs in the editor",
"manualInstructions": [ ],
"actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6",
"args": {
"files": "1"
},
"continueOnError": true
}
]
}

View File

@ -0,0 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework Condition="'$(TargetFrameworkOverride)' == ''">netstandard1.6</TargetFramework>
<TargetFramework Condition="'$(TargetFrameworkOverride)' != ''">TargetFrameworkOverride</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Compile Include="Library.fs" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,5 @@
namespace Company.ClassLibrary1
module Say =
let hello name =
printfn "Hello %s" name

View File

@ -0,0 +1,20 @@
{
"$schema": "http://json.schemastore.org/dotnetcli.host",
"symbolInfo": {
"TargetFrameworkOverride": {
"isHidden": "true",
"longName": "target-framework-override",
"shortName": ""
},
"Framework": {
"longName": "framework"
},
"skipRestore": {
"longName": "no-restore",
"shortName": ""
}
},
"usageExamples": [
"--framework netcoreapp1.1"
]
}

View File

@ -0,0 +1,125 @@
{
"$schema": "http://json.schemastore.org/template",
"author": "Microsoft",
"classifications": ["Common", "Library"],
"name": "Class library",
"generatorVersions": "[1.0.0.0-*)",
"description": "A project for creating a class library that targets .NET Standard or .NET Core",
"groupIdentity": "Microsoft.Common.Library",
"precedence": "100",
"identity": "Microsoft.Common.Library.VisualBasic",
"shortName": "classlib",
"tags": {
"language": "VB",
"type": "project"
},
"sourceName": "Company.ClassLibrary1",
"preferNameDirectory": true,
"baselines": {
"app": {
"description": "Target netcoreapp",
"defaultOverrides": {
"Framework": "netcoreapp1.1"
}
},
"standard": {
"description": "Target netstandard",
"defaultOverrides": {
"Framework": "netstandard1.4"
}
}
},
"symbols": {
"TargetFrameworkOverride": {
"type": "parameter",
"description": "Overrides the target framework",
"replaces": "TargetFrameworkOverride",
"datatype": "string",
"defaultValue": ""
},
"Framework": {
"type": "parameter",
"description": "The target framework for the project.",
"replaces": "netstandard1.4",
"datatype": "choice",
"choices": [
{
"choice": "netcoreapp1.0",
"description": "Target netcoreapp1.0"
},
{
"choice": "netcoreapp1.1",
"description": "Target netcoreapp1.1"
},
{
"choice": "netstandard1.0",
"description": "Target netstandard1.0"
},
{
"choice": "netstandard1.1",
"description": "Target netstandard1.1"
},
{
"choice": "netstandard1.2",
"description": "Target netstandard1.2"
},
{
"choice": "netstandard1.3",
"description": "Target netstandard1.3"
},
{
"choice": "netstandard1.4",
"description": "Target netstandard1.4"
},
{
"choice": "netstandard1.5",
"description": "Target netstandard1.5"
},
{
"choice": "netstandard1.6",
"description": "Target netstandard1.6"
}
],
"defaultValue": "netstandard1.4"
},
"HostIdentifier": {
"type": "bind",
"binding": "HostIdentifier"
},
"skipRestore": {
"type": "parameter",
"datatype": "bool",
"description": "If specified, skips the automatic restore of the project on create.",
"defaultValue": "false"
}
},
"primaryOutputs": [
{ "path": "Company.ClassLibrary1.vbproj" },
{
"condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
"path": "Class1.vb"
}
],
"defaultName": "ClassLibrary1",
"postActions": [
{
"condition": "(!skipRestore)",
"description": "Restore NuGet packages required by this project.",
"manualInstructions": [
{ "text": "Run 'dotnet restore'" }
],
"actionId": "210D431B-A78B-4D2F-B762-4ED3E3EA9025",
"continueOnError": true
},
{
"condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
"description": "Opens Class1.vb in the editor",
"manualInstructions": [ ],
"actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6",
"args": {
"files": "1"
},
"continueOnError": true
}
]
}

View File

@ -0,0 +1,3 @@
Public Class Class1
End Class

View File

@ -0,0 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework Condition="'$(TargetFrameworkOverride)' == ''">netstandard1.4</TargetFramework>
<TargetFramework Condition="'$(TargetFrameworkOverride)' != ''">TargetFrameworkOverride</TargetFramework>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,20 @@
{
"$schema": "http://json.schemastore.org/dotnetcli.host",
"symbolInfo": {
"TargetFrameworkOverride": {
"isHidden": "true",
"longName": "target-framework-override",
"shortName": ""
},
"Framework": {
"longName": "framework"
},
"skipRestore": {
"longName": "no-restore",
"shortName": ""
}
},
"usageExamples": [
"--framework netcoreapp1.1"
]
}

View File

@ -0,0 +1,82 @@
{
"$schema": "http://json.schemastore.org/template",
"author": "Microsoft",
"classifications": ["Common", "Console"],
"name": "Console Application",
"generatorVersions": "[1.0.0.0-*)",
"description": "A project for creating a command-line application that can run on .NET Core on Windows, Linux and macOS",
"groupIdentity": "Microsoft.Common.Console",
"precedence": "100",
"identity": "Microsoft.Common.Console.CSharp",
"shortName": "console",
"tags": {
"language": "C#",
"type": "project"
},
"sourceName": "Company.ConsoleApplication1",
"preferNameDirectory": true,
"symbols": {
"TargetFrameworkOverride": {
"type": "parameter",
"description": "Overrides the target framework",
"replaces": "TargetFrameworkOverride",
"datatype": "string",
"defaultValue": ""
},
"Framework": {
"type": "parameter",
"description": "The target framework for the project.",
"datatype": "choice",
"choices": [
{
"choice": "netcoreapp1.0",
"description": "Target netcoreapp1.0"
},
{
"choice": "netcoreapp1.1",
"description": "Target netcoreapp1.1"
}
],
"defaultValue": "netcoreapp1.1"
},
"HostIdentifier": {
"type": "bind",
"binding": "HostIdentifier"
},
"skipRestore": {
"type": "parameter",
"datatype": "bool",
"description": "If specified, skips the automatic restore of the project on create.",
"defaultValue": "false"
}
},
"primaryOutputs": [
{ "path": "Company.ConsoleApplication1.csproj" },
{
"condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
"path": "Program.cs"
}
],
"defaultName": "ConsoleApp1",
"postActions": [
{
"condition": "(!skipRestore)",
"description": "Restore NuGet packages required by this project.",
"manualInstructions": [
{ "text": "Run 'dotnet restore'" }
],
"actionId": "210D431B-A78B-4D2F-B762-4ED3E3EA9025",
"continueOnError": true
},
{
"condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
"description": "Opens Program.cs in the editor",
"manualInstructions": [ ],
"actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6",
"args": {
"files": "1"
},
"continueOnError": true
}
]
}

View File

@ -0,0 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework Condition="'$(Framework)' != 'netcoreapp1.1' AND '$(TargetFrameworkOverride)' == ''">netcoreapp1.0</TargetFramework>
<TargetFramework Condition="'$(Framework)' == 'netcoreapp1.1' AND '$(TargetFrameworkOverride)' == ''">netcoreapp1.1</TargetFramework>
<TargetFramework Condition="'$(TargetFrameworkOverride)' != ''">TargetFrameworkOverride</TargetFramework>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,12 @@
using System;
namespace Company.ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
}
}
}

View File

@ -0,0 +1,20 @@
{
"$schema": "http://json.schemastore.org/dotnetcli.host",
"symbolInfo": {
"TargetFrameworkOverride": {
"isHidden": "true",
"longName": "target-framework-override",
"shortName": ""
},
"Framework": {
"longName": "framework"
},
"skipRestore": {
"longName": "no-restore",
"shortName": ""
}
},
"usageExamples": [
"--framework netcoreapp1.1"
]
}

View File

@ -0,0 +1,82 @@
{
"$schema": "http://json.schemastore.org/template",
"author": "Microsoft",
"classifications": ["Common", "Console"],
"name": "Console Application",
"generatorVersions": "[1.0.0.0-*)",
"description": "A project for creating a command-line application that can run on .NET Core on Windows, Linux and macOS",
"groupIdentity": "Microsoft.Common.Console",
"precedence": "100",
"identity": "Microsoft.Common.Console.FSharp",
"shortName": "console",
"tags": {
"language": "F#",
"type": "project"
},
"sourceName": "Company.ConsoleApplication1",
"preferNameDirectory": true,
"symbols": {
"TargetFrameworkOverride": {
"type": "parameter",
"description": "Overrides the target framework",
"replaces": "TargetFrameworkOverride",
"datatype": "string",
"defaultValue": ""
},
"Framework": {
"type": "parameter",
"description": "The target framework for the project.",
"datatype": "choice",
"choices": [
{
"choice": "netcoreapp1.0",
"description": "Target netcoreapp1.0"
},
{
"choice": "netcoreapp1.1",
"description": "Target netcoreapp1.1"
}
],
"defaultValue": "netcoreapp1.1"
},
"HostIdentifier": {
"type": "bind",
"binding": "HostIdentifier"
},
"skipRestore": {
"type": "parameter",
"datatype": "bool",
"description": "If specified, skips the automatic restore of the project on create.",
"defaultValue": "false"
}
},
"primaryOutputs": [
{ "path": "Company.ConsoleApplication1.fsproj" },
{
"condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
"path": "Program.fs"
}
],
"defaultName": "ConsoleApp1",
"postActions": [
{
"condition": "(!skipRestore)",
"description": "Restore NuGet packages required by this project.",
"manualInstructions": [
{ "text": "Run 'dotnet restore'" }
],
"actionId": "210D431B-A78B-4D2F-B762-4ED3E3EA9025",
"continueOnError": true
},
{
"condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
"description": "Opens Program.fs in the editor",
"manualInstructions": [ ],
"actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6",
"args": {
"files": "1"
},
"continueOnError": true
}
]
}

View File

@ -0,0 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework Condition="'$(Framework)' != 'netcoreapp1.1' AND '$(TargetFrameworkOverride)' == ''">netcoreapp1.0</TargetFramework>
<TargetFramework Condition="'$(Framework)' == 'netcoreapp1.1' AND '$(TargetFrameworkOverride)' == ''">netcoreapp1.1</TargetFramework>
<TargetFramework Condition="'$(TargetFrameworkOverride)' != ''">TargetFrameworkOverride</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Compile Include="Program.fs" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,8 @@
// Learn more about F# at http://fsharp.org
open System
[<EntryPoint>]
let main argv =
printfn "Hello World from F#!"
0 // return an integer exit code

View File

@ -0,0 +1,20 @@
{
"$schema": "http://json.schemastore.org/dotnetcli.host",
"symbolInfo": {
"TargetFrameworkOverride": {
"isHidden": "true",
"longName": "target-framework-override",
"shortName": ""
},
"Framework": {
"longName": "framework"
},
"skipRestore": {
"longName": "no-restore",
"shortName": ""
}
},
"usageExamples": [
"--framework netcoreapp1.1"
]
}

View File

@ -0,0 +1,82 @@
{
"$schema": "http://json.schemastore.org/template",
"author": "Microsoft",
"classifications": ["Common", "Console"],
"name": "Console Application",
"generatorVersions": "[1.0.0.0-*)",
"description": "A project for creating a command-line application that can run on .NET Core on Windows, Linux and macOS",
"groupIdentity": "Microsoft.Common.Console",
"precedence": "100",
"identity": "Microsoft.Common.Console.VisualBasic",
"shortName": "console",
"tags": {
"language": "VB",
"type": "project"
},
"sourceName": "Company.ConsoleApplication1",
"preferNameDirectory": true,
"symbols": {
"TargetFrameworkOverride": {
"type": "parameter",
"description": "Overrides the target framework",
"replaces": "TargetFrameworkOverride",
"datatype": "string",
"defaultValue": ""
},
"Framework": {
"type": "parameter",
"description": "The target framework for the project.",
"datatype": "choice",
"choices": [
{
"choice": "netcoreapp1.0",
"description": "Target netcoreapp1.0"
},
{
"choice": "netcoreapp1.1",
"description": "Target netcoreapp1.1"
}
],
"defaultValue": "netcoreapp1.1"
},
"HostIdentifier": {
"type": "bind",
"binding": "HostIdentifier"
},
"skipRestore": {
"type": "parameter",
"datatype": "bool",
"description": "If specified, skips the automatic restore of the project on create.",
"defaultValue": "false"
}
},
"primaryOutputs": [
{ "path": "Company.ConsoleApplication1.vbproj" },
{
"condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
"path": "Program.vb"
}
],
"defaultName": "ConsoleApp1",
"postActions": [
{
"condition": "(!skipRestore)",
"description": "Restore NuGet packages required by this project.",
"manualInstructions": [
{ "text": "Run 'dotnet restore'" }
],
"actionId": "210D431B-A78B-4D2F-B762-4ED3E3EA9025",
"continueOnError": true
},
{
"condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
"description": "Opens Program.vb in the editor",
"manualInstructions": [ ],
"actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6",
"args": {
"files": "1"
},
"continueOnError": true
}
]
}

View File

@ -0,0 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework Condition="'$(Framework)' != 'netcoreapp1.1' AND '$(TargetFrameworkOverride)' == ''">netcoreapp1.0</TargetFramework>
<TargetFramework Condition="'$(Framework)' == 'netcoreapp1.1' AND '$(TargetFrameworkOverride)' == ''">netcoreapp1.1</TargetFramework>
<TargetFramework Condition="'$(TargetFrameworkOverride)' != ''">TargetFrameworkOverride</TargetFramework>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,7 @@
Imports System
Module Program
Sub Main(args As String())
Console.WriteLine("Hello World!")
End Sub
End Module

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>Microsoft.DotNet.Common.ProjectTemplates.2.0</id>
<version>$version$</version>
<authors>Microsoft</authors>
<description>.NET Template Pack for Microsoft Template Engine</description>
<language>en-US</language>
<projectUrl>https://github.com/dotnet/templating</projectUrl>
<licenseUrl>https://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm</licenseUrl>
<packageTypes>
<packageType name="Template" />
</packageTypes>
</metadata>
<files>
<file src="content/**" target="" />
</files>
</package>

View File

@ -0,0 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\Version.props" />
<PropertyGroup>
<TargetFramework>netstandard1.0</TargetFramework>
<NuspecFile>$(MSBuildThisFileDirectory)\Templates.nuspec</NuspecFile>
<NuspecProperties>version=$(PackageVersion)</NuspecProperties>
<IncludeBuildOutput>False</IncludeBuildOutput>
<IncludeBuildOutput>False</IncludeBuildOutput>
<IncludeSource>False</IncludeSource>
<GenerateAssemblyInfo>False</GenerateAssemblyInfo>
<OutputPath>$(TemplatesFolder)</OutputPath>
<EnableDefaultItems>False</EnableDefaultItems>
<BaseIntermediateOutputPath>$(MSBuildThisFileDirectory)..\..\artifacts\scratch</BaseIntermediateOutputPath>
</PropertyGroup>
<ItemGroup>
<PackageReference Remove="Microsoft.NETCore.App" />
<Compile Remove="$(GitInfoFile)" />
<Compile Remove="$(MSBuildThisFileDirectory)../../src/GitInfo.cs" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,20 @@
{
"$schema": "http://json.schemastore.org/dotnetcli.host",
"symbolInfo": {
"TargetFrameworkOverride": {
"isHidden": "true",
"longName": "target-framework-override",
"shortName": ""
},
"Framework": {
"longName": "framework"
},
"skipRestore": {
"longName": "no-restore",
"shortName": ""
}
},
"usageExamples": [
"--framework netcoreapp2.0"
]
}

View File

@ -0,0 +1,97 @@
{
"$schema": "http://json.schemastore.org/template",
"author": "Microsoft",
"classifications": ["Common", "Library"],
"name": "Class library",
"generatorVersions": "[1.0.0.0-*)",
"description": "A project for creating a class library that targets .NET Standard or .NET Core",
"groupIdentity": "Microsoft.Common.Library",
"precedence": "2000",
"identity": "Microsoft.Common.Library.CSharp.2.0",
"shortName": "classlib",
"tags": {
"language": "C#",
"type": "project"
},
"sourceName": "Company.ClassLibrary1",
"preferNameDirectory": true,
"baselines": {
"app": {
"description": "Target netcoreapp",
"defaultOverrides": {
"Framework": "netcoreapp2.0"
}
},
"standard": {
"description": "Target netstandard",
"defaultOverrides": {
"Framework": "netstandard2.0"
}
}
},
"symbols": {
"TargetFrameworkOverride": {
"type": "parameter",
"description": "Overrides the target framework",
"replaces": "TargetFrameworkOverride",
"datatype": "string",
"defaultValue": ""
},
"Framework": {
"type": "parameter",
"description": "The target framework for the project.",
"datatype": "choice",
"choices": [
{
"choice": "netcoreapp2.0",
"description": "Target netcoreapp2.0"
},
{
"choice": "netstandard2.0",
"description": "Target netstandard2.0"
}
],
"replaces": "netstandard2.0",
"defaultValue": "netstandard2.0"
},
"HostIdentifier": {
"type": "bind",
"binding": "HostIdentifier"
},
"skipRestore": {
"type": "parameter",
"datatype": "bool",
"description": "If specified, skips the automatic restore of the project on create.",
"defaultValue": "false"
}
},
"primaryOutputs": [
{ "path": "Company.ClassLibrary1.csproj" },
{
"condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
"path": "Class1.cs"
}
],
"defaultName": "ClassLibrary1",
"postActions": [
{
"condition": "(!skipRestore)",
"description": "Restore NuGet packages required by this project.",
"manualInstructions": [
{ "text": "Run 'dotnet restore'" }
],
"actionId": "210D431B-A78B-4D2F-B762-4ED3E3EA9025",
"continueOnError": true
},
{
"condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
"description": "Opens Class1.cs in the editor",
"manualInstructions": [ ],
"actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6",
"args": {
"files": "1"
},
"continueOnError": true
}
]
}

View File

@ -0,0 +1,8 @@
using System;
namespace Company.ClassLibrary1
{
public class Class1
{
}
}

View File

@ -0,0 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework Condition="'$(TargetFrameworkOverride)' == ''">netstandard2.0</TargetFramework>
<TargetFramework Condition="'$(TargetFrameworkOverride)' != ''">TargetFrameworkOverride</TargetFramework>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,20 @@
{
"$schema": "http://json.schemastore.org/dotnetcli.host",
"symbolInfo": {
"TargetFrameworkOverride": {
"isHidden": "true",
"longName": "target-framework-override",
"shortName": ""
},
"Framework": {
"longName": "framework"
},
"skipRestore": {
"longName": "no-restore",
"shortName": ""
}
},
"usageExamples": [
"--framework netcoreapp2.0"
]
}

View File

@ -0,0 +1,97 @@
{
"$schema": "http://json.schemastore.org/template",
"author": "Microsoft",
"classifications": ["Common", "Library"],
"name": "Class library",
"generatorVersions": "[1.0.0.0-*)",
"description": "A project for creating a class library that targets .NET Standard or .NET Core",
"groupIdentity": "Microsoft.Common.Library",
"precedence": "2000",
"identity": "Microsoft.Common.Library.FSharp.2.0",
"shortName": "classlib",
"tags": {
"language": "F#",
"type": "project"
},
"sourceName": "Company.ClassLibrary1",
"preferNameDirectory": true,
"baselines": {
"app": {
"description": "Target netcoreapp",
"defaultOverrides": {
"Framework": "netcoreapp2.0"
}
},
"standard": {
"description": "Target netstandard",
"defaultOverrides": {
"Framework": "netstandard2.0"
}
}
},
"symbols": {
"TargetFrameworkOverride": {
"type": "parameter",
"description": "Overrides the target framework",
"replaces": "TargetFrameworkOverride",
"datatype": "string",
"defaultValue": ""
},
"Framework": {
"type": "parameter",
"description": "The target framework for the project.",
"datatype": "choice",
"choices": [
{
"choice": "netcoreapp2.0",
"description": "Target netcoreapp2.0"
},
{
"choice": "netstandard2.0",
"description": "Target netstandard2.0"
}
],
"replaces": "netstandard2.0",
"defaultValue": "netstandard2.0"
},
"HostIdentifier": {
"type": "bind",
"binding": "HostIdentifier"
},
"skipRestore": {
"type": "parameter",
"datatype": "bool",
"description": "If specified, skips the automatic restore of the project on create.",
"defaultValue": "false"
}
},
"primaryOutputs": [
{ "path": "Company.ClassLibrary1.fsproj" },
{
"condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
"path": "Library.fs"
}
],
"defaultName": "ClassLibrary1",
"postActions": [
{
"condition": "(!skipRestore)",
"description": "Restore NuGet packages required by this project.",
"manualInstructions": [
{ "text": "Run 'dotnet restore'" }
],
"actionId": "210D431B-A78B-4D2F-B762-4ED3E3EA9025",
"continueOnError": true
},
{
"condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
"description": "Opens Library.fs in the editor",
"manualInstructions": [ ],
"actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6",
"args": {
"files": "1"
},
"continueOnError": true
}
]
}

View File

@ -0,0 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework Condition="'$(TargetFrameworkOverride)' == ''">netstandard2.0</TargetFramework>
<TargetFramework Condition="'$(TargetFrameworkOverride)' != ''">TargetFrameworkOverride</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Compile Include="Library.fs" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,5 @@
namespace Company.ClassLibrary1
module Say =
let hello name =
printfn "Hello %s" name

View File

@ -0,0 +1,20 @@
{
"$schema": "http://json.schemastore.org/dotnetcli.host",
"symbolInfo": {
"TargetFrameworkOverride": {
"isHidden": "true",
"longName": "target-framework-override",
"shortName": ""
},
"Framework": {
"longName": "framework"
},
"skipRestore": {
"longName": "no-restore",
"shortName": ""
}
},
"usageExamples": [
"--framework netcoreapp2.0"
]
}

View File

@ -0,0 +1,97 @@
{
"$schema": "http://json.schemastore.org/template",
"author": "Microsoft",
"classifications": ["Common", "Library"],
"name": "Class library",
"generatorVersions": "[1.0.0.0-*)",
"description": "A project for creating a class library that targets .NET Standard or .NET Core",
"groupIdentity": "Microsoft.Common.Library",
"precedence": "2000",
"identity": "Microsoft.Common.Library.VisualBasic.2.0",
"shortName": "classlib",
"tags": {
"language": "VB",
"type": "project"
},
"sourceName": "Company.ClassLibrary1",
"preferNameDirectory": true,
"baselines": {
"app": {
"description": "Target netcoreapp",
"defaultOverrides": {
"Framework": "netcoreapp2.0"
}
},
"standard": {
"description": "Target netstandard",
"defaultOverrides": {
"Framework": "netstandard2.0"
}
}
},
"symbols": {
"TargetFrameworkOverride": {
"type": "parameter",
"description": "Overrides the target framework",
"replaces": "TargetFrameworkOverride",
"datatype": "string",
"defaultValue": ""
},
"Framework": {
"type": "parameter",
"description": "The target framework for the project.",
"datatype": "choice",
"choices": [
{
"choice": "netcoreapp2.0",
"description": "Target netcoreapp2.0"
},
{
"choice": "netstandard2.0",
"description": "Target netstandard2.0"
}
],
"replaces": "netstandard2.0",
"defaultValue": "netstandard2.0"
},
"HostIdentifier": {
"type": "bind",
"binding": "HostIdentifier"
},
"skipRestore": {
"type": "parameter",
"datatype": "bool",
"description": "If specified, skips the automatic restore of the project on create.",
"defaultValue": "false"
}
},
"primaryOutputs": [
{ "path": "Company.ClassLibrary1.vbproj" },
{
"condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
"path": "Class1.vb"
}
],
"defaultName": "ClassLibrary1",
"postActions": [
{
"condition": "(!skipRestore)",
"description": "Restore NuGet packages required by this project.",
"manualInstructions": [
{ "text": "Run 'dotnet restore'" }
],
"actionId": "210D431B-A78B-4D2F-B762-4ED3E3EA9025",
"continueOnError": true
},
{
"condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
"description": "Opens Class1.vb in the editor",
"manualInstructions": [ ],
"actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6",
"args": {
"files": "1"
},
"continueOnError": true
}
]
}

View File

@ -0,0 +1,3 @@
Public Class Class1
End Class

View File

@ -0,0 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework Condition="'$(TargetFrameworkOverride)' == ''">netstandard2.0</TargetFramework>
<TargetFramework Condition="'$(TargetFrameworkOverride)' != ''">TargetFrameworkOverride</TargetFramework>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,20 @@
{
"$schema": "http://json.schemastore.org/dotnetcli.host",
"symbolInfo": {
"TargetFrameworkOverride": {
"isHidden": "true",
"longName": "target-framework-override",
"shortName": ""
},
"Framework": {
"longName": "framework"
},
"skipRestore": {
"longName": "no-restore",
"shortName": ""
}
},
"usageExamples": [
""
]
}

View File

@ -0,0 +1,79 @@
{
"$schema": "http://json.schemastore.org/template",
"author": "Microsoft",
"classifications": ["Common", "Console"],
"name": "Console Application",
"generatorVersions": "[1.0.0.0-*)",
"description": "A project for creating a command-line application that can run on .NET Core on Windows, Linux and macOS",
"groupIdentity": "Microsoft.Common.Console",
"precedence": "2000",
"identity": "Microsoft.Common.Console.CSharp.2.0",
"shortName": "console",
"tags": {
"language": "C#",
"type": "project"
},
"sourceName": "Company.ConsoleApplication1",
"preferNameDirectory": true,
"symbols": {
"TargetFrameworkOverride": {
"type": "parameter",
"description": "Overrides the target framework",
"replaces": "TargetFrameworkOverride",
"datatype": "string",
"defaultValue": ""
},
"Framework": {
"type": "parameter",
"description": "The target framework for the project.",
"datatype": "choice",
"choices": [
{
"choice": "netcoreapp2.0",
"description": "Target netcoreapp2.0"
}
],
"replaces": "netcoreapp2.0",
"defaultValue": "netcoreapp2.0"
},
"HostIdentifier": {
"type": "bind",
"binding": "HostIdentifier"
},
"skipRestore": {
"type": "parameter",
"datatype": "bool",
"description": "If specified, skips the automatic restore of the project on create.",
"defaultValue": "false"
}
},
"primaryOutputs": [
{ "path": "Company.ConsoleApplication1.csproj" },
{
"condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
"path": "Program.cs"
}
],
"defaultName": "ConsoleApp1",
"postActions": [
{
"condition": "(!skipRestore)",
"description": "Restore NuGet packages required by this project.",
"manualInstructions": [
{ "text": "Run 'dotnet restore'" }
],
"actionId": "210D431B-A78B-4D2F-B762-4ED3E3EA9025",
"continueOnError": true
},
{
"condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
"description": "Opens Program.cs in the editor",
"manualInstructions": [ ],
"actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6",
"args": {
"files": "1"
},
"continueOnError": true
}
]
}

View File

@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework Condition="'$(TargetFrameworkOverride)' == ''">netcoreapp2.0</TargetFramework>
<TargetFramework Condition="'$(TargetFrameworkOverride)' != ''">TargetFrameworkOverride</TargetFramework>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,12 @@
using System;
namespace Company.ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
}
}
}

View File

@ -0,0 +1,20 @@
{
"$schema": "http://json.schemastore.org/dotnetcli.host",
"symbolInfo": {
"TargetFrameworkOverride": {
"isHidden": "true",
"longName": "target-framework-override",
"shortName": ""
},
"Framework": {
"longName": "framework"
},
"skipRestore": {
"longName": "no-restore",
"shortName": ""
}
},
"usageExamples": [
""
]
}

View File

@ -0,0 +1,79 @@
{
"$schema": "http://json.schemastore.org/template",
"author": "Microsoft",
"classifications": ["Common", "Console"],
"name": "Console Application",
"generatorVersions": "[1.0.0.0-*)",
"description": "A project for creating a command-line application that can run on .NET Core on Windows, Linux and macOS",
"groupIdentity": "Microsoft.Common.Console",
"precedence": "2000",
"identity": "Microsoft.Common.Console.FSharp.2.0",
"shortName": "console",
"tags": {
"language": "F#",
"type": "project"
},
"sourceName": "Company.ConsoleApplication1",
"preferNameDirectory": true,
"symbols": {
"TargetFrameworkOverride": {
"type": "parameter",
"description": "Overrides the target framework",
"replaces": "TargetFrameworkOverride",
"datatype": "string",
"defaultValue": ""
},
"Framework": {
"type": "parameter",
"description": "The target framework for the project.",
"datatype": "choice",
"choices": [
{
"choice": "netcoreapp2.0",
"description": "Target netcoreapp2.0"
}
],
"replaces": "netcoreapp2.0",
"defaultValue": "netcoreapp2.0"
},
"HostIdentifier": {
"type": "bind",
"binding": "HostIdentifier"
},
"skipRestore": {
"type": "parameter",
"datatype": "bool",
"description": "If specified, skips the automatic restore of the project on create.",
"defaultValue": "false"
}
},
"primaryOutputs": [
{ "path": "Company.ConsoleApplication1.fsproj" },
{
"condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
"path": "Program.fs"
}
],
"defaultName": "ConsoleApp1",
"postActions": [
{
"condition": "(!skipRestore)",
"description": "Restore NuGet packages required by this project.",
"manualInstructions": [
{ "text": "Run 'dotnet restore'" }
],
"actionId": "210D431B-A78B-4D2F-B762-4ED3E3EA9025",
"continueOnError": true
},
{
"condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
"description": "Opens Program.fs in the editor",
"manualInstructions": [ ],
"actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6",
"args": {
"files": "1"
},
"continueOnError": true
}
]
}

View File

@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework Condition="'$(TargetFrameworkOverride)' == ''">netcoreapp2.0</TargetFramework>
<TargetFramework Condition="'$(TargetFrameworkOverride)' != ''">TargetFrameworkOverride</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Compile Include="Program.fs" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,8 @@
// Learn more about F# at http://fsharp.org
open System
[<EntryPoint>]
let main argv =
printfn "Hello World from F#!"
0 // return an integer exit code

View File

@ -0,0 +1,20 @@
{
"$schema": "http://json.schemastore.org/dotnetcli.host",
"symbolInfo": {
"TargetFrameworkOverride": {
"isHidden": "true",
"longName": "target-framework-override",
"shortName": ""
},
"Framework": {
"longName": "framework"
},
"skipRestore": {
"longName": "no-restore",
"shortName": ""
}
},
"usageExamples": [
""
]
}

View File

@ -0,0 +1,79 @@
{
"$schema": "http://json.schemastore.org/template",
"author": "Microsoft",
"classifications": ["Common", "Console"],
"name": "Console Application",
"generatorVersions": "[1.0.0.0-*)",
"description": "A project for creating a command-line application that can run on .NET Core on Windows, Linux and macOS",
"groupIdentity": "Microsoft.Common.Console",
"precedence": "2000",
"identity": "Microsoft.Common.Console.VisualBasic.2.0",
"shortName": "console",
"tags": {
"language": "VB",
"type": "project"
},
"sourceName": "Company.ConsoleApplication1",
"preferNameDirectory": true,
"symbols": {
"TargetFrameworkOverride": {
"type": "parameter",
"description": "Overrides the target framework",
"replaces": "TargetFrameworkOverride",
"datatype": "string",
"defaultValue": ""
},
"Framework": {
"type": "parameter",
"description": "The target framework for the project.",
"datatype": "choice",
"choices": [
{
"choice": "netcoreapp2.0",
"description": "Target netcoreapp2.0"
}
],
"replaces": "netcoreapp2.0",
"defaultValue": "netcoreapp2.0"
},
"HostIdentifier": {
"type": "bind",
"binding": "HostIdentifier"
},
"skipRestore": {
"type": "parameter",
"datatype": "bool",
"description": "If specified, skips the automatic restore of the project on create.",
"defaultValue": "false"
}
},
"primaryOutputs": [
{ "path": "Company.ConsoleApplication1.vbproj" },
{
"condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
"path": "Program.vb"
}
],
"defaultName": "ConsoleApp1",
"postActions": [
{
"condition": "(!skipRestore)",
"description": "Restore NuGet packages required by this project.",
"manualInstructions": [
{ "text": "Run 'dotnet restore'" }
],
"actionId": "210D431B-A78B-4D2F-B762-4ED3E3EA9025",
"continueOnError": true
},
{
"condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
"description": "Opens Program.vb in the editor",
"manualInstructions": [ ],
"actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6",
"args": {
"files": "1"
},
"continueOnError": true
}
]
}

View File

@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework Condition="'$(TargetFrameworkOverride)' == ''">netcoreapp2.0</TargetFramework>
<TargetFramework Condition="'$(TargetFrameworkOverride)' != ''">TargetFrameworkOverride</TargetFramework>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,7 @@
Imports System
Module Program
Sub Main(args As String())
Console.WriteLine("Hello World!")
End Sub
End Module

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>Microsoft.DotNet.Test.ProjectTemplates.1.x</id>
<version>$version$</version>
<authors>Microsoft</authors>
<description>.NET Template Pack Test projects for Microsoft Template Engine</description>
<language>en-US</language>
<projectUrl>https://github.com/dotnet/templating</projectUrl>
<licenseUrl>https://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm</licenseUrl>
<packageTypes>
<packageType name="Template" />
</packageTypes>
</metadata>
<files>
<file src="content/**" target="" />
</files>
</package>

View File

@ -0,0 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\Version.props" />
<PropertyGroup>
<TargetFramework>netstandard1.0</TargetFramework>
<NuspecFile>$(MSBuildThisFileDirectory)\Templates.nuspec</NuspecFile>
<NuspecProperties>version=$(PackageVersion)</NuspecProperties>
<IncludeBuildOutput>False</IncludeBuildOutput>
<IncludeBuildOutput>False</IncludeBuildOutput>
<IncludeSource>False</IncludeSource>
<GenerateAssemblyInfo>False</GenerateAssemblyInfo>
<OutputPath>$(TemplatesFolder)</OutputPath>
<EnableDefaultItems>False</EnableDefaultItems>
<BaseIntermediateOutputPath>$(MSBuildThisFileDirectory)..\..\artifacts\scratch</BaseIntermediateOutputPath>
</PropertyGroup>
<ItemGroup>
<PackageReference Remove="Microsoft.NETCore.App" />
<Compile Remove="$(GitInfoFile)" />
<Compile Remove="$(MSBuildThisFileDirectory)../../src/GitInfo.cs" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,24 @@
{
"$schema": "http://json.schemastore.org/dotnetcli.host",
"symbolInfo": {
"TargetFrameworkOverride": {
"isHidden": "true",
"longName": "target-framework-override",
"shortName": ""
},
"Framework": {
"longName": "framework"
},
"EnablePack": {
"shortName": "p",
"longName": "enable-pack"
},
"skipRestore": {
"longName": "no-restore",
"shortName": ""
}
},
"usageExamples": [
"--framework netcoreapp1.1"
]
}

View File

@ -0,0 +1,88 @@
{
"$schema": "http://json.schemastore.org/template",
"author": "Microsoft",
"classifications": ["Test", "MSTest"],
"name": "Unit Test Project",
"generatorVersions": "[1.0.0.0-*)",
"description": "A project that contains unit tests that can run on .NET Core on Windows, Linux and macOS",
"groupIdentity": "Microsoft.Test.MSTest",
"precedence": "100",
"identity": "Microsoft.Test.MSTest.CSharp",
"shortName": "mstest",
"tags": {
"language": "C#",
"type": "project"
},
"sourceName": "Company.TestProject1",
"preferNameDirectory": true,
"symbols": {
"TargetFrameworkOverride": {
"type": "parameter",
"description": "Overrides the target framework",
"replaces": "TargetFrameworkOverride",
"datatype": "string",
"defaultValue": ""
},
"Framework": {
"type": "parameter",
"description": "The target framework for the project.",
"datatype": "choice",
"choices": [
{
"choice": "netcoreapp1.0",
"description": "Target netcoreapp1.0"
},
{
"choice": "netcoreapp1.1",
"description": "Target netcoreapp1.1"
}
],
"defaultValue": "netcoreapp1.1"
},
"EnablePack": {
"type": "parameter",
"datatype": "bool",
"defaultValue": "false",
"description": "Whether or not to enable packaging (via (\"dotnet pack\") for the project."
},
"HostIdentifier": {
"type": "bind",
"binding": "HostIdentifier"
},
"skipRestore": {
"type": "parameter",
"datatype": "bool",
"description": "If specified, skips the automatic restore of the project on create.",
"defaultValue": "false"
}
},
"primaryOutputs": [
{ "path": "Company.TestProject1.csproj" },
{
"condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
"path": "UnitTest1.cs"
}
],
"defaultName": "TestProject1",
"postActions": [
{
"condition": "(!skipRestore)",
"description": "Restore NuGet packages required by this project.",
"manualInstructions": [
{ "text": "Run 'dotnet restore'" }
],
"actionId": "210D431B-A78B-4D2F-B762-4ED3E3EA9025",
"continueOnError": true
},
{
"condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
"description": "Opens Class1.cs in the editor",
"manualInstructions": [ ],
"actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6",
"args": {
"files": "1"
},
"continueOnError": true
}
]
}

View File

@ -0,0 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework Condition="'$(Framework)' != 'netcoreapp1.1' AND '$(TargetFrameworkOverride)' == ''">netcoreapp1.0</TargetFramework>
<TargetFramework Condition="'$(Framework)' == 'netcoreapp1.1' AND '$(TargetFrameworkOverride)' == ''">netcoreapp1.1</TargetFramework>
<TargetFramework Condition="'$(TargetFrameworkOverride)' != ''">TargetFrameworkOverride</TargetFramework>
<IsPackable Condition="'$(EnablePack)' == 'true'">true</IsPackable>
<IsPackable Condition="'$(EnablePack)' != 'true'">false</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0-preview-20170628-02" />
<PackageReference Include="MSTest.TestAdapter" Version="1.1.18" />
<PackageReference Include="MSTest.TestFramework" Version="1.1.18" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,13 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Company.TestProject1
{
[TestClass]
public class UnitTest1
{
[TestMethod]
public void TestMethod1()
{
}
}
}

View File

@ -0,0 +1,24 @@
{
"$schema": "http://json.schemastore.org/dotnetcli.host",
"symbolInfo": {
"TargetFrameworkOverride": {
"isHidden": "true",
"longName": "target-framework-override",
"shortName": ""
},
"Framework": {
"longName": "framework"
},
"EnablePack": {
"shortName": "p",
"longName": "enable-pack"
},
"skipRestore": {
"longName": "no-restore",
"shortName": ""
}
},
"usageExamples": [
"--framework netcoreapp1.1"
]
}

View File

@ -0,0 +1,88 @@
{
"$schema": "http://json.schemastore.org/template",
"author": "Microsoft",
"classifications": ["Test", "MSTest"],
"name": "Unit Test Project",
"generatorVersions": "[1.0.0.0-*)",
"description": "A project that contains unit tests that can run on .NET Core on Windows, Linux and macOS",
"groupIdentity": "Microsoft.Test.MSTest",
"precedence": "100",
"identity": "Microsoft.Test.MSTest.FSharp",
"shortName": "mstest",
"tags": {
"language": "F#",
"type": "project"
},
"sourceName": "Company.TestProject1",
"preferNameDirectory": true,
"symbols": {
"TargetFrameworkOverride": {
"type": "parameter",
"description": "Overrides the target framework",
"replaces": "TargetFrameworkOverride",
"datatype": "string",
"defaultValue": ""
},
"Framework": {
"type": "parameter",
"description": "The target framework for the project.",
"datatype": "choice",
"choices": [
{
"choice": "netcoreapp1.0",
"description": "Target netcoreapp1.0"
},
{
"choice": "netcoreapp1.1",
"description": "Target netcoreapp1.1"
}
],
"defaultValue": "netcoreapp1.1"
},
"EnablePack": {
"type": "parameter",
"datatype": "bool",
"defaultValue": "false",
"description": "Whether or not to enable packaging (via (\"dotnet pack\") for the project."
},
"HostIdentifier": {
"type": "bind",
"binding": "HostIdentifier"
},
"skipRestore": {
"type": "parameter",
"datatype": "bool",
"description": "If specified, skips the automatic restore of the project on create.",
"defaultValue": "false"
}
},
"primaryOutputs": [
{ "path": "Company.TestProject1.fsproj" },
{
"condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
"path": "Tests.fs"
}
],
"defaultName": "TestProject1",
"postActions": [
{
"condition": "(!skipRestore)",
"description": "Restore NuGet packages required by this project.",
"manualInstructions": [
{ "text": "Run 'dotnet restore'" }
],
"actionId": "210D431B-A78B-4D2F-B762-4ED3E3EA9025",
"continueOnError": true
},
{
"condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
"description": "Opens Class1.cs in the editor",
"manualInstructions": [ ],
"actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6",
"args": {
"files": "1"
},
"continueOnError": true
}
]
}

View File

@ -0,0 +1,23 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework Condition="'$(Framework)' != 'netcoreapp1.1' AND '$(TargetFrameworkOverride)' == ''">netcoreapp1.0</TargetFramework>
<TargetFramework Condition="'$(Framework)' == 'netcoreapp1.1' AND '$(TargetFrameworkOverride)' == ''">netcoreapp1.1</TargetFramework>
<TargetFramework Condition="'$(TargetFrameworkOverride)' != ''">TargetFrameworkOverride</TargetFramework>
<IsPackable Condition="'$(EnablePack)' == 'true'">true</IsPackable>
<IsPackable Condition="'$(EnablePack)' != 'true'">false</IsPackable>
</PropertyGroup>
<ItemGroup>
<Compile Include="Tests.fs" />
<Compile Include="Program.fs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0-preview-20170628-02" />
<PackageReference Include="MSTest.TestAdapter" Version="1.1.18" />
<PackageReference Include="MSTest.TestFramework" Version="1.1.18" />
</ItemGroup>
</Project>

View File

@ -0,0 +1 @@
module Program = let [<EntryPoint>] main _ = 0

View File

@ -0,0 +1,11 @@
namespace Company.TestProject1
open System
open Microsoft.VisualStudio.TestTools.UnitTesting
[<TestClass>]
type TestClass () =
[<TestMethod>]
member this.TestMethodPassing () =
Assert.IsTrue(true);

View File

@ -0,0 +1,24 @@
{
"$schema": "http://json.schemastore.org/dotnetcli.host",
"symbolInfo": {
"TargetFrameworkOverride": {
"isHidden": "true",
"longName": "target-framework-override",
"shortName": ""
},
"Framework": {
"longName": "framework"
},
"EnablePack": {
"shortName": "p",
"longName": "enable-pack"
},
"skipRestore": {
"longName": "no-restore",
"shortName": ""
}
},
"usageExamples": [
"--framework netcoreapp1.1"
]
}

View File

@ -0,0 +1,89 @@
{
"$schema": "http://json.schemastore.org/template",
"author": "Microsoft",
"classifications": ["Test", "MSTest"],
"name": "Unit Test Project",
"generatorVersions": "[1.0.0.0-*)",
"description": "A project that contains unit tests that can run on .NET Core on Windows, Linux and macOS",
"groupIdentity": "Microsoft.Test.MSTest",
"precedence": "100",
"identity": "Microsoft.Test.MSTest.VisualBasic",
"shortName": "mstest",
"tags": {
"language": "VB",
"type": "project"
},
"sourceName": "Company.TestProject1",
"preferNameDirectory": true,
"symbols": {
"TargetFrameworkOverride": {
"type": "parameter",
"description": "Overrides the target framework",
"replaces": "TargetFrameworkOverride",
"datatype": "string",
"defaultValue": ""
},
"Framework": {
"type": "parameter",
"description": "The target framework for the project.",
"datatype": "choice",
"replaces": "netcoreapp1.1",
"choices": [
{
"choice": "netcoreapp1.0",
"description": "Target netcoreapp1.0"
},
{
"choice": "netcoreapp1.1",
"description": "Target netcoreapp1.1"
}
],
"defaultValue": "netcoreapp1.1"
},
"EnablePack": {
"type": "parameter",
"datatype": "bool",
"defaultValue": "false",
"description": "Whether or not to enable packaging (via (\"dotnet pack\") for the project."
},
"HostIdentifier": {
"type": "bind",
"binding": "HostIdentifier"
},
"skipRestore": {
"type": "parameter",
"datatype": "bool",
"description": "If specified, skips the automatic restore of the project on create.",
"defaultValue": "false"
}
},
"primaryOutputs": [
{ "path": "Company.TestProject1.vbproj" },
{
"condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
"path": "UnitTest1.vb"
}
],
"defaultName": "TestProject1",
"postActions": [
{
"condition": "(!skipRestore)",
"description": "Restore NuGet packages required by this project.",
"manualInstructions": [
{ "text": "Run 'dotnet restore'" }
],
"actionId": "210D431B-A78B-4D2F-B762-4ED3E3EA9025",
"continueOnError": true
},
{
"condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
"description": "Opens Class1.cs in the editor",
"manualInstructions": [ ],
"actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6",
"args": {
"files": "1"
},
"continueOnError": true
}
]
}

View File

@ -0,0 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework Condition="'$(TargetFrameworkOverride)' == ''">netcoreapp1.1</TargetFramework>
<TargetFramework Condition="'$(TargetFrameworkOverride)' != ''">TargetFrameworkOverride</TargetFramework>
<IsPackable Condition="'$(EnablePack)' == 'true'">true</IsPackable>
<IsPackable Condition="'$(EnablePack)' != 'true'">false</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0-preview-20170628-02" />
<PackageReference Include="MSTest.TestAdapter" Version="1.1.18" />
<PackageReference Include="MSTest.TestFramework" Version="1.1.18" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,12 @@
Imports Microsoft.VisualStudio.TestTools.UnitTesting
Namespace Company.TestProject1
<TestClass>
Public Class UnitTest1
<TestMethod>
Sub TestSub()
End Sub
End Class
End Namespace

View File

@ -0,0 +1,24 @@
{
"$schema": "http://json.schemastore.org/dotnetcli.host",
"symbolInfo": {
"TargetFrameworkOverride": {
"isHidden": "true",
"longName": "target-framework-override",
"shortName": ""
},
"Framework": {
"longName": "framework"
},
"EnablePack": {
"shortName": "p",
"longName": "enable-pack"
},
"skipRestore": {
"longName": "no-restore",
"shortName": ""
}
},
"usageExamples": [
"--framework netcoreapp1.1"
]
}

View File

@ -0,0 +1,88 @@
{
"$schema": "http://json.schemastore.org/template",
"author": "Microsoft",
"classifications": ["Test", "xUnit"],
"name": "xUnit Test Project",
"generatorVersions": "[1.0.0.0-*)",
"description": "A project that contains xUnit.net tests that can run on .NET Core on Windows, Linux and macOS",
"groupIdentity": "Microsoft.Test.xUnit",
"precedence": "100",
"identity": "Microsoft.Test.xUnit.CSharp",
"shortName": "xunit",
"tags": {
"language": "C#",
"type": "project"
},
"sourceName": "Company.TestProject1",
"preferNameDirectory": true,
"symbols": {
"TargetFrameworkOverride": {
"type": "parameter",
"description": "Overrides the target framework",
"replaces": "TargetFrameworkOverride",
"datatype": "string",
"defaultValue": ""
},
"Framework": {
"type": "parameter",
"description": "The target framework for the project.",
"datatype": "choice",
"choices": [
{
"choice": "netcoreapp1.0",
"description": "Target netcoreapp1.0"
},
{
"choice": "netcoreapp1.1",
"description": "Target netcoreapp1.1"
}
],
"defaultValue": "netcoreapp1.1"
},
"EnablePack": {
"type": "parameter",
"datatype": "bool",
"defaultValue": "false",
"description": "Whether or not to enable packaging (via (\"dotnet pack\") for the project."
},
"HostIdentifier": {
"type": "bind",
"binding": "HostIdentifier"
},
"skipRestore": {
"type": "parameter",
"datatype": "bool",
"description": "If specified, skips the automatic restore of the project on create.",
"defaultValue": "false"
}
},
"primaryOutputs": [
{ "path": "Company.TestProject1.csproj" },
{
"condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
"path": "UnitTest1.cs"
}
],
"defaultName": "TestProject1",
"postActions": [
{
"condition": "(!skipRestore)",
"description": "Restore NuGet packages required by this project.",
"manualInstructions": [
{ "text": "Run 'dotnet restore'" }
],
"actionId": "210D431B-A78B-4D2F-B762-4ED3E3EA9025",
"continueOnError": true
},
{
"condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
"description": "Opens Class1.cs in the editor",
"manualInstructions": [ ],
"actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6",
"args": {
"files": "1"
},
"continueOnError": true
}
]
}

View File

@ -0,0 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework Condition="'$(Framework)' != 'netcoreapp1.1' AND '$(TargetFrameworkOverride)' == ''">netcoreapp1.0</TargetFramework>
<TargetFramework Condition="'$(Framework)' == 'netcoreapp1.1' AND '$(TargetFrameworkOverride)' == ''">netcoreapp1.1</TargetFramework>
<TargetFramework Condition="'$(TargetFrameworkOverride)' != ''">TargetFrameworkOverride</TargetFramework>
<IsPackable Condition="'$(EnablePack)' == 'true'">true</IsPackable>
<IsPackable Condition="'$(EnablePack)' != 'true'">false</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0-preview-20170628-02" />
<PackageReference Include="xunit" Version="2.2.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,14 @@
using System;
using Xunit;
namespace Company.TestProject1
{
public class UnitTest1
{
[Fact]
public void Test1()
{
}
}
}

View File

@ -0,0 +1,24 @@
{
"$schema": "http://json.schemastore.org/dotnetcli.host",
"symbolInfo": {
"TargetFrameworkOverride": {
"isHidden": "true",
"longName": "target-framework-override",
"shortName": ""
},
"Framework": {
"longName": "framework"
},
"EnablePack": {
"shortName": "p",
"longName": "enable-pack"
},
"skipRestore": {
"longName": "no-restore",
"shortName": ""
}
},
"usageExamples": [
"--framework netcoreapp1.1"
]
}

View File

@ -0,0 +1,88 @@
{
"$schema": "http://json.schemastore.org/template",
"author": "Microsoft",
"classifications": ["Test", "xUnit"],
"name": "xUnit Test Project",
"generatorVersions": "[1.0.0.0-*)",
"description": "A project that contains xUnit.net tests that can run on .NET Core on Windows, Linux and macOS",
"groupIdentity": "Microsoft.Test.xUnit",
"precedence": "100",
"identity": "Microsoft.Test.xUnit.FSharp",
"shortName": "xunit",
"tags": {
"language": "F#",
"type": "project"
},
"sourceName": "Company.TestProject1",
"preferNameDirectory": true,
"symbols": {
"TargetFrameworkOverride": {
"type": "parameter",
"description": "Overrides the target framework",
"replaces": "TargetFrameworkOverride",
"datatype": "string",
"defaultValue": ""
},
"Framework": {
"type": "parameter",
"description": "The target framework for the project.",
"datatype": "choice",
"choices": [
{
"choice": "netcoreapp1.0",
"description": "Target netcoreapp1.0"
},
{
"choice": "netcoreapp1.1",
"description": "Target netcoreapp1.1"
}
],
"defaultValue": "netcoreapp1.1"
},
"EnablePack": {
"type": "parameter",
"datatype": "bool",
"defaultValue": "false",
"description": "Whether or not to enable packaging (via (\"dotnet pack\") for the project."
},
"HostIdentifier": {
"type": "bind",
"binding": "HostIdentifier"
},
"skipRestore": {
"type": "parameter",
"datatype": "bool",
"description": "If specified, skips the automatic restore of the project on create.",
"defaultValue": "false"
}
},
"primaryOutputs": [
{ "path": "Company.TestProject1.fsproj" },
{
"condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
"path": "Tests.fs"
}
],
"defaultName": "TestProject1",
"postActions": [
{
"condition": "(!skipRestore)",
"description": "Restore NuGet packages required by this project.",
"manualInstructions": [
{ "text": "Run 'dotnet restore'" }
],
"actionId": "210D431B-A78B-4D2F-B762-4ED3E3EA9025",
"continueOnError": true
},
{
"condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
"description": "Opens Class1.cs in the editor",
"manualInstructions": [ ],
"actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6",
"args": {
"files": "1"
},
"continueOnError": true
}
]
}

View File

@ -0,0 +1,23 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework Condition="'$(Framework)' != 'netcoreapp1.1' AND '$(TargetFrameworkOverride)' == ''">netcoreapp1.0</TargetFramework>
<TargetFramework Condition="'$(Framework)' == 'netcoreapp1.1' AND '$(TargetFrameworkOverride)' == ''">netcoreapp1.1</TargetFramework>
<TargetFramework Condition="'$(TargetFrameworkOverride)' != ''">TargetFrameworkOverride</TargetFramework>
<IsPackable Condition="'$(EnablePack)' == 'true'">true</IsPackable>
<IsPackable Condition="'$(EnablePack)' != 'true'">false</IsPackable>
</PropertyGroup>
<ItemGroup>
<Compile Include="Tests.fs" />
<Compile Include="Program.fs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0-preview-20170628-02" />
<PackageReference Include="xunit" Version="2.2.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />
</ItemGroup>
</Project>

View File

@ -0,0 +1 @@
module Program = let [<EntryPoint>] main _ = 0

Some files were not shown because too many files have changed in this diff Show More