Skip to content

Commit d2912eb

Browse files
authored
Merge pull request #89 from rido-min/net6
Update to dotnet 6
2 parents 0105f01 + a550250 commit d2912eb

30 files changed

+116
-493
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
bin/
22
obj/
33
*.nupkg
4-
.vscode
4+
.vscode
5+
.vs/

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
[![Nuget](https://img.shields.io/nuget/v/Microsoft.Azure.IoT.Edge.Module.svg)](https://www.nuget.org/packages/Microsoft.Azure.IoT.Edge.Module/)
44

5+
### 3.2.0 (2022-11-29)
6+
* [Updated] Update template to target dotnet6
7+
* [Updated] Template based on the Worker template, using BackgroundService base class
8+
* [Removed] F# Template
9+
510
### 3.1.1 (2021-09-01)
611
* [Updated] Updated the nuget template json to match the schema
712

Microsoft.Azure.IoT.Edge.Module.nuspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<package>
33
<metadata>
44
<id>Microsoft.Azure.IoT.Edge.Module</id>
5-
<version>3.1.1</version>
5+
<version>3.2.0</version>
66
<title>Azure IoT Edge Module</title>
77
<authors>Microsoft</authors>
88
<owners>microsoft, nugetazureiotedge</owners>

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ The template will set up all necessary files for you to focus on functionality p
99

1010
## Get Started
1111

12-
Make sure you have [.Net Core 3.0 SDK](https://dotnet.microsoft.com/download/dotnet-core/3.0) installed.
12+
Make sure you have [.NET 6.0 SDK](https://dotnet.microsoft.com/en-us/download/dotnet/6.0) installed.
1313

1414
Run `dotnet` command to install the template:
1515

@@ -23,7 +23,7 @@ Templates Short Name Langua
2323
---------------------------------------------------------------------------------------------------------------
2424
Console Application console [C#], F#, VB Common/Console
2525
Class library classlib [C#], F#, VB Common/Library
26-
Azure IoT Edge Module aziotedgemodule [C#], F# Console
26+
Azure IoT Edge Module aziotedgemodule [C#] Console
2727
Contoso Sample 06 sample06 [C#], F# Console
2828
Unit Test Project mstest [C#], F#, VB Test/MSTest
2929
xUnit Test Project xunit [C#], F#, VB Test/xUnit

Test/Test.cs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ public class Test : IClassFixture<DotNetFixture>
2929
{
3030
private DotNetFixture fixture;
3131
private const string CSharp = "C#";
32-
private const string FSharp = "F#";
3332
private const string ArchLinux64 = "linux64";
3433
private const string ArchWindowsNano = "windowsNano";
3534

@@ -49,8 +48,6 @@ private static string BeforeEach(string lang, string repository, bool skipRestor
4948
[Theory]
5049
[InlineData(CSharp, true)]
5150
[InlineData(CSharp, false)]
52-
[InlineData(FSharp, true)]
53-
[InlineData(FSharp, false)]
5451
public void TestArchitecture(string lang, bool skipRestore)
5552
{
5653
var repository = "test.azurecr.io/test";
@@ -70,10 +67,6 @@ public void TestArchitecture(string lang, bool skipRestore)
7067
{
7168
filesToCheck.AddRange(new List<string> { "Program.cs", scaffoldName + ".csproj", "Dockerfile.arm64v8.debug" });
7269
}
73-
if (lang == FSharp)
74-
{
75-
filesToCheck.AddRange(new List<string> { "Program.fs", scaffoldName + ".fsproj" });
76-
}
7770

7871
foreach (var file in filesToCheck)
7972
{

Test/Test.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>netcoreapp3.1</TargetFramework>
4+
<TargetFramework>net6.0</TargetFramework>
55
</PropertyGroup>
66

77
<ItemGroup>

content/dotnet-template-azure-iot-edge-module/CSharp/Dockerfile.amd64

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM mcr.microsoft.com/dotnet/core/sdk:3.1-buster AS build-env
1+
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build-env
22
WORKDIR /app
33

44
COPY *.csproj ./
@@ -7,7 +7,7 @@ RUN dotnet restore
77
COPY . ./
88
RUN dotnet publish -c Release -o out
99

10-
FROM mcr.microsoft.com/dotnet/core/runtime:3.1-buster-slim
10+
FROM mcr.microsoft.com/dotnet/runtime:6.0
1111
WORKDIR /app
1212
COPY --from=build-env /app/out ./
1313

content/dotnet-template-azure-iot-edge-module/CSharp/Dockerfile.amd64.debug

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM mcr.microsoft.com/dotnet/core/runtime:3.1-buster-slim AS base
1+
FROM mcr.microsoft.com/dotnet/runtime:6.0 AS base
22

33
RUN apt-get update && \
44
apt-get install -y --no-install-recommends unzip procps && \
@@ -8,7 +8,7 @@ RUN useradd -ms /bin/bash moduleuser
88
USER moduleuser
99
RUN curl -sSL https://aka.ms/getvsdbgsh | bash /dev/stdin -v latest -l ~/vsdbg
1010

11-
FROM mcr.microsoft.com/dotnet/core/sdk:3.1-buster AS build-env
11+
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build-env
1212
WORKDIR /app
1313

1414
COPY *.csproj ./

content/dotnet-template-azure-iot-edge-module/CSharp/Dockerfile.arm32v7

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
FROM mcr.microsoft.com/dotnet/core/sdk:3.1-buster-arm32v7 AS build-env
1+
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build-env
22
WORKDIR /app
33

44
COPY *.csproj ./
5-
RUN dotnet restore
5+
RUN dotnet restore -r linux-arm
66

77
COPY . ./
88
RUN dotnet publish -c Release -o out
99

10-
FROM mcr.microsoft.com/dotnet/core/runtime:3.1-buster-slim-arm32v7
10+
FROM mcr.microsoft.com/dotnet/runtime:6.0-bullseye-slim-arm32v7
1111
WORKDIR /app
1212
COPY --from=build-env /app/out ./
1313

content/dotnet-template-azure-iot-edge-module/CSharp/Dockerfile.arm32v7.debug

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM mcr.microsoft.com/dotnet/core/runtime:3.1-buster-slim-arm32v7 AS base
1+
FROM mcr.microsoft.com/dotnet/runtime:6.0-bullseye-slim-arm32v7 AS base
22

33
RUN apt-get update && \
44
apt-get install -y --no-install-recommends unzip procps && \
@@ -8,11 +8,11 @@ RUN useradd -ms /bin/bash moduleuser
88
USER moduleuser
99
RUN curl -sSL https://aka.ms/getvsdbgsh | bash /dev/stdin -v latest -l ~/vsdbg
1010

11-
FROM mcr.microsoft.com/dotnet/core/sdk:3.1-buster-arm32v7 AS build-env
11+
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build-env
1212
WORKDIR /app
1313

1414
COPY *.csproj ./
15-
RUN dotnet restore
15+
RUN dotnet restore -r linux-arm
1616

1717
COPY . ./
1818
RUN dotnet publish -c Debug -o out

0 commit comments

Comments
 (0)