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 class templates #29655

Merged
Show file tree
Hide file tree
Changes from 15 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
4 changes: 2 additions & 2 deletions .vsts-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,9 @@ stages:
pool:
vmImage: 'macOS-latest'
${{ if eq(variables['System.TeamProject'], 'public') }}:
helixTargetQueue: OSX.1015.Amd64.Open
helixTargetQueue: OSX.1100.Amd64.Open
${{ if ne(variables['System.TeamProject'], 'public') }}:
helixTargetQueue: OSX.1015.Amd64
helixTargetQueue: OSX.1100.Amd64
strategy:
matrix:
Build_Release:
Expand Down
10 changes: 5 additions & 5 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Dependencies>
<ProductDependencies>
<Dependency Name="Microsoft.TemplateEngine.Abstractions" Version="7.0.200-alpha.1.22621.2">
<Dependency Name="Microsoft.TemplateEngine.Abstractions" Version="7.0.200-alpha.1.22623.4">
<Uri>https://github.com/dotnet/templating</Uri>
<Sha>01c412e0fe40730c2b96a0366b520af707e4291d</Sha>
<Sha>0e4dd290455badd78fcf862cf420a2d8fe5cf039</Sha>
</Dependency>
<Dependency Name="Microsoft.TemplateEngine.Mocks" Version="7.0.200-alpha.1.22621.2">
<Dependency Name="Microsoft.TemplateEngine.Mocks" Version="7.0.200-alpha.1.22623.4">
<Uri>https://github.com/dotnet/templating</Uri>
<Sha>01c412e0fe40730c2b96a0366b520af707e4291d</Sha>
<Sha>0e4dd290455badd78fcf862cf420a2d8fe5cf039</Sha>
<SourceBuild RepoName="templating" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.NETCore.App.Ref" Version="7.0.0">
Expand Down Expand Up @@ -306,4 +306,4 @@
<SourceBuild RepoName="xliff-tasks" ManagedOnly="true" />
</Dependency>
</ToolsetDependencies>
</Dependencies>
</Dependencies>
6 changes: 3 additions & 3 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -126,13 +126,13 @@
</PropertyGroup>
<PropertyGroup>
<!-- Dependencies from https://github.com/dotnet/templating -->
<MicrosoftTemplateEngineAbstractionsPackageVersion>7.0.200-alpha.1.22621.2</MicrosoftTemplateEngineAbstractionsPackageVersion>
<MicrosoftTemplateEngineAbstractionsPackageVersion>7.0.200-alpha.1.22623.4</MicrosoftTemplateEngineAbstractionsPackageVersion>
<MicrosoftTemplateEngineEdgePackageVersion>$(MicrosoftTemplateEngineAbstractionsPackageVersion)</MicrosoftTemplateEngineEdgePackageVersion>
<MicrosoftTemplateEngineOrchestratorRunnableProjectsPackageVersion>$(MicrosoftTemplateEngineAbstractionsPackageVersion)</MicrosoftTemplateEngineOrchestratorRunnableProjectsPackageVersion>
<MicrosoftTemplateEngineUtilsPackageVersion>$(MicrosoftTemplateEngineAbstractionsPackageVersion)</MicrosoftTemplateEngineUtilsPackageVersion>
<MicrosoftTemplateSearchCommonPackageVersion>$(MicrosoftTemplateEngineAbstractionsPackageVersion)</MicrosoftTemplateSearchCommonPackageVersion>
<!-- test dependencies -->
<MicrosoftTemplateEngineMocksPackageVersion>7.0.200-alpha.1.22621.2</MicrosoftTemplateEngineMocksPackageVersion>
<MicrosoftTemplateEngineMocksPackageVersion>7.0.200-alpha.1.22623.4</MicrosoftTemplateEngineMocksPackageVersion>
<MicrosoftTemplateEngineTestHelperPackageVersion>$(MicrosoftTemplateEngineAbstractionsPackageVersion)</MicrosoftTemplateEngineTestHelperPackageVersion>
<MicrosoftTemplateEngineAuthoringTemplateVerifierVersion>$(MicrosoftTemplateEngineAbstractionsPackageVersion)</MicrosoftTemplateEngineAuthoringTemplateVerifierVersion>
</PropertyGroup>
Expand Down Expand Up @@ -201,4 +201,4 @@
<_DotNetHiveRoot Condition="!HasTrailingSlash('$(_DotNetHiveRoot)')">$(_DotNetHiveRoot)/</_DotNetHiveRoot>
<DotNetExe>$(_DotNetHiveRoot)dotnet$(ExeExtension)</DotNetExe>
</PropertyGroup>
</Project>
</Project>
4 changes: 2 additions & 2 deletions eng/template-engine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ jobs:
pool:
vmImage: 'macOS-latest'
${{ if eq(variables['System.TeamProject'], 'public') }}:
helixTargetQueue: OSX.1015.Amd64.Open
helixTargetQueue: OSX.1100.Amd64.Open
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not related to the PR: we don't use helix - this should be removed. @GangWang01 could you please check it? Thank you.

${{ if ne(variables['System.TeamProject'], 'public') }}:
helixTargetQueue: OSX.1015.Amd64
helixTargetQueue: OSX.1100.Amd64
strategy:
matrix:
Build_Release:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<LangVersion>10.0</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
namespace ClassLib;
public class TestItem1
{

}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The template "Class" was created successfully.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<LangVersion>9.0</LangVersion>
<Nullable>enable</Nullable>
</PropertyGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
using System;

namespace ClassLib
{
public class TestItem1
{

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The template "Class" was created successfully.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<LangVersion>preview</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
namespace ClassLib;
public class TestItem1
{

}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The template "Class" was created successfully.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
namespace ClassLib;
public class TestItem1
{

}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The template "Class" was created successfully.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<LangVersion>10</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
namespace ClassLib;
public enum TestItem1
{

}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The template "Enum" was created successfully.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<LangVersion>9.0</LangVersion>
<Nullable>enable</Nullable>
</PropertyGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace ClassLib
{
public enum TestItem1
{

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The template "Enum" was created successfully.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
namespace ClassLib;
public enum TestItem1
{

}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The template "Enum" was created successfully.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
namespace ClassLib;
public enum TestItem1
{

}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The template "Enum" was created successfully.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<LangVersion>10.0</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
namespace ClassLib;
public interface TestItem1
{

}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The template "Interface" was created successfully.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<LangVersion>9</LangVersion>
<Nullable>enable</Nullable>
</PropertyGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
using System;

namespace ClassLib
{
public interface TestItem1
{

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The template "Interface" was created successfully.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
namespace ClassLib;
public interface TestItem1
{

}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The template "Interface" was created successfully.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<LangVersion>10</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
namespace ClassLib;
public record class TestItem1
{

}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The template "Record" was created successfully.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<LangVersion>8.0</LangVersion>
<Nullable>enable</Nullable>
</PropertyGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
namespace ClassLib
{
//Record was added in C# 9 and later, so Class was used instead.
//See more info: https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/record
public class TestItem1
{

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The template "Record" was created successfully.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<LangVersion>9.0</LangVersion>
<Nullable>enable</Nullable>
</PropertyGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace ClassLib
{
public record TestItem1
{

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The template "Record" was created successfully.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
namespace ClassLib;
public record class TestItem1
{

}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The template "Record" was created successfully.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<LangVersion>10</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The template "Struct" was created successfully.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
namespace ClassLib;
public struct TestItem1
{

}
Loading