Skip to content

Commit b776af8

Browse files
Add target .net 6 for the 1DS Test Server (#1217)
* Update .net version to .net 6 * support both frameworks .net6 and old one .net core 3 * Update scripts, that runs test server to specify flags for target frameworks * Change indent * Use $framework value in the echo
1 parent 36bc9b2 commit b776af8

File tree

3 files changed

+69
-5
lines changed

3 files changed

+69
-5
lines changed

tools/server/run.cmd

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,29 @@
1-
dotnet run
1+
@ECHO OFF
2+
set framework="netcoreapp3.1"
3+
4+
:loop
5+
IF NOT "%1"=="" (
6+
IF "%1"=="-f" (
7+
SET framework=%2
8+
SHIFT
9+
)
10+
IF "%1"=="--framework" (
11+
SET framework=%2
12+
SHIFT
13+
)
14+
IF "%1"=="-h" GOTO :help
15+
IF "%1"=="--help" GOTO :help
16+
SHIFT
17+
GOTO :loop
18+
)
19+
echo "1DS test telemetry server will be run with %framework%"
20+
dotnet run --framework %framework%
21+
goto:eof
22+
23+
:help
24+
echo "Run 1DS Test Telemetry Server with specified runtime versions (.net core 3 or .net6)."
25+
echo "Syntax: run.sh [-f,--framework|-h, --help]"
26+
echo "options:"
27+
echo "-f | --framework Run server with specified version of runtime. Supported values: netcoreapp3.1 or net6.0. Default value is netcoreapp3.1, if option is not specified"
28+
echo "-h | --help Help."
29+
goto:eof

tools/server/run.sh

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,39 @@
11
#!/bin/sh
2-
dotnet run
2+
3+
############################################################
4+
# Help #
5+
############################################################
6+
Help()
7+
{
8+
# Display Help
9+
echo "Run 1DS Test Telemetry Server with specified runtime versions (.net core 3 or .net6)."
10+
echo
11+
echo "Syntax: run.sh [-f,--framework|-h, --help]"
12+
echo "options:"
13+
echo "-f | --framework Run server with specified version of runtime. Supported values: netcoreapp3.1 or net6.0. Default value is netcoreapp3.1, if option is not specified"
14+
echo "-h | --help Help."
15+
echo
16+
17+
exit 0
18+
}
19+
20+
framework="netcoreapp3.1"
21+
while test $# -gt 0;
22+
do
23+
case "$1" in
24+
-h|--help) Help;;
25+
-f|--framework)
26+
shift
27+
if test $# -gt 0; then
28+
framework=$1
29+
else
30+
echo "--framework option value is not specified. Server will be run with $framework"
31+
fi
32+
shift
33+
;;
34+
*) break;;
35+
esac
36+
done
37+
echo "1DS test telemetry server will be run with $framework"
38+
dotnet run -f $framework
339

tools/server/server.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFramework>netcoreapp3.1</TargetFramework>
5-
<RunAnalyzersDuringBuild>true</RunAnalyzersDuringBuild>
6-
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
4+
<TargetFrameworks>netcoreapp3.1;net6.0</TargetFrameworks>
5+
<RunAnalyzersDuringBuild>true</RunAnalyzersDuringBuild>
6+
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
77
<EnableNETAnalyzers>true</EnableNETAnalyzers>
88
</PropertyGroup>
99

0 commit comments

Comments
 (0)