-
-
Notifications
You must be signed in to change notification settings - Fork 982
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
Improve templates #2338
Improve templates #2338
Changes from all commits
f87ead8
1b0b518
b94a00c
bbe43af
e93e60f
5189f50
56a81ae
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,14 @@ | ||
dotnet build -c Release BenchmarkDotNet.Templates.csproj | ||
dotnet pack -c Release BenchmarkDotNet.Templates.csproj | ||
dotnet new -u BenchmarkDotNet.Templates | ||
dotnet new -i BenchmarkDotNet.Templates::0.0.0-* --nuget-source .\bin\Release\ | ||
:: Run only from the folder where the batch file is located! | ||
|
||
dotnet build BenchmarkDotNet.Templates.csproj -c Release | ||
dotnet pack BenchmarkDotNet.Templates.csproj -c Release | ||
|
||
:: If we install the templates via a folder path, then it will have a different ID (ID=folder path). | ||
:: It will conflict with BDN templates from nuget. | ||
:: We need to install the templates via a FILE path in order to update the template from nuget. | ||
:: | ||
:: https://stackoverflow.com/questions/47450531/batch-write-output-of-dir-to-a-variable | ||
for /f "delims=" %%a in ('dir /s /b BenchmarkDotNet.Templates*.nupkg') do set "nupkg_path=%%a" | ||
|
||
dotnet new --uninstall "BenchmarkDotNet.Templates" | ||
dotnet new --install "%nupkg_path%" |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,8 +31,54 @@ | |
}, | ||
"framework": { | ||
"type": "parameter", | ||
"datatype": "string", | ||
"description": "The target framework for the project (e.g. netstandard2.0). Default \"net5.0\" if \"--console-app\" is true, \"netstandard2.0\" if \"--console-app\" is false", | ||
"description": "The target framework for the project.", | ||
"datatype": "choice", | ||
"choices": [ | ||
{ | ||
"choice": "net8.0", | ||
"description": ".NET 8" | ||
}, | ||
{ | ||
"choice": "net7.0", | ||
"description": ".NET 7" | ||
}, | ||
{ | ||
"choice": "net6.0", | ||
"description": ".NET 6" | ||
}, | ||
{ | ||
"choice": "netstandard2.1", | ||
"description": ".NET Standard 2.1" | ||
}, | ||
{ | ||
"choice": "netstandard2.0", | ||
"description": ".NET Standard 2.0" | ||
}, | ||
{ | ||
"choice": "net481", | ||
"description": ".NET Framework 4.8.1" | ||
}, | ||
{ | ||
"choice": "net48", | ||
"description": ".NET Framework 4.8" | ||
}, | ||
{ | ||
"choice": "net472", | ||
"description": ".NET Framework 4.7.2" | ||
}, | ||
{ | ||
"choice": "net471", | ||
"description": ".NET Framework 4.7.1" | ||
}, | ||
{ | ||
"choice": "net47", | ||
"description": ".NET Framework 4.7" | ||
}, | ||
{ | ||
"choice": "net462", | ||
"description": ".NET Framework 4.6.2" | ||
} | ||
], | ||
"defaultValue": "" | ||
}, | ||
"frameworkDefault": { | ||
|
@@ -45,7 +91,7 @@ | |
"cases": [ | ||
{ | ||
"condition": "(framework == '' && consoleApp == true)", | ||
"value": "net5.0" | ||
"value": "net6.0" | ||
}, | ||
{ | ||
"condition": "(framework == '' && consoleApp == false)", | ||
|
@@ -92,13 +138,13 @@ | |
"type": "parameter", | ||
"datatype": "bool", | ||
"description": "If specified, the project is set up as console app.", | ||
"defaultValue": "false" | ||
"defaultValue": "true" | ||
}, | ||
"version": { | ||
"type": "parameter", | ||
"datatype": "string", | ||
"description": "Version of BenchmarkDotNet that will be referenced.", | ||
"defaultValue": "0.12.1", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. With each new release, you need to change this manually. Currently, if you add BDN.Templates, a project will be created with BDN v0.12.1. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I try to handle this issue – #1879 |
||
"defaultValue": "0.13.5", | ||
"replaces": "$(BenchmarkDotNetVersion)" | ||
} | ||
}, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is only one space, I think there should be a new paragraph here (a second space is needed)