Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add net6.0 project templates #107

Merged
merged 1 commit into from
Oct 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard1.0</TargetFramework>
<IncludeBuildOutput>False</IncludeBuildOutput>
<IncludeSource>False</IncludeSource>
<GenerateAssemblyInfo>False</GenerateAssemblyInfo>
<OutputPath>$(TemplatesFolder)</OutputPath>
<EnableDefaultItems>False</EnableDefaultItems>
<IsPackable>true</IsPackable>
<NoPackageAnalysis>true</NoPackageAnalysis>
<NoWarn>2008;NU5125</NoWarn>

<PackageId>Microsoft.DotNet.Test.ProjectTemplates.6.0</PackageId>
<Authors>Microsoft</Authors>
<Description>Test Templates for Microsoft Template Engine</Description>
<language>en-US</language>
<PackageProjectUrl>https://github.com/dotnet/test-templates</PackageProjectUrl>
<CopyrightMicrosoft>© Microsoft Corporation. All rights reserved.</CopyrightMicrosoft>
<CopyrightNetFoundation>© .NET Foundation and Contributors</CopyrightNetFoundation>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageType>Template</PackageType>
</PropertyGroup>
<ItemGroup>
<PackageReference Remove="Microsoft.NETCore.App" />
<Compile Remove="$(GitInfoFile)" />
<Compile Remove="$(MSBuildThisFileDirectory)../../src/GitInfo.cs" />
<Content Include="Content\**">
<PackagePath>content</PackagePath>
</Content>
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -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": [
""
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
{
"$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": "7000",
"identity": "Microsoft.Test.MSTest.CSharp.6.0",
"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": "net6.0",
"description": "Target net6.0"
}
],
"replaces": "net6.0",
"defaultValue": "net6.0"
},
"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
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework Condition="'$(TargetFrameworkOverride)' == ''">net6.0</TargetFramework>
<TargetFramework Condition="'$(TargetFrameworkOverride)' != ''">TargetFrameworkOverride</TargetFramework>
<RootNamespace Condition="'$(name)' != '$(name{-VALUE-FORMS-}safe_namespace)'">Company.TestProject1</RootNamespace>

<IsPackable Condition="'$(EnablePack)' == 'true'">true</IsPackable>
<IsPackable Condition="'$(EnablePack)' != 'true'">false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.1" />
<PackageReference Include="MSTest.TestAdapter" Version="2.1.1" />
<PackageReference Include="MSTest.TestFramework" Version="2.1.1" />
<PackageReference Include="coverlet.collector" Version="1.3.0" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Company.TestProject1
{
[TestClass]
public class UnitTest1
{
[TestMethod]
public void TestMethod1()
{
}
}
}
Original file line number Diff line number Diff line change
@@ -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": [
""
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
{
"$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": "7000",
"identity": "Microsoft.Test.MSTest.FSharp.6.0",
"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": "net6.0",
"description": "Target net6.0"
}
],
"replaces": "net6.0",
"defaultValue": "net6.0"
},
"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 Tests.fs in the editor",
"manualInstructions": [],
"actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6",
"args": {
"files": "1"
},
"continueOnError": true
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework Condition="'$(TargetFrameworkOverride)' == ''">net6.0</TargetFramework>
<TargetFramework Condition="'$(TargetFrameworkOverride)' != ''">TargetFrameworkOverride</TargetFramework>
<RootNamespace Condition="'$(name)' != '$(name{-VALUE-FORMS-}safe_namespace)'">Company.TestProject1</RootNamespace>

<IsPackable Condition="'$(EnablePack)' == 'true'">true</IsPackable>
<IsPackable Condition="'$(EnablePack)' != 'true'">false</IsPackable>
<GenerateProgramFile>false</GenerateProgramFile>
</PropertyGroup>

<ItemGroup>
<Compile Include="Tests.fs" />
<Compile Include="Program.fs" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.1" />
<PackageReference Include="MSTest.TestAdapter" Version="2.1.1" />
<PackageReference Include="MSTest.TestFramework" Version="2.1.1" />
<PackageReference Include="coverlet.collector" Version="1.3.0" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module Program = let [<EntryPoint>] main _ = 0
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
namespace Company.TestProject1

open System
open Microsoft.VisualStudio.TestTools.UnitTesting

[<TestClass>]
type TestClass () =

[<TestMethod>]
member this.TestMethodPassing () =
Assert.IsTrue(true);
Original file line number Diff line number Diff line change
@@ -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": [
""
]
}
Loading