Skip to content

Commit

Permalink
Updated to support .NET Core 3.1 (#57)
Browse files Browse the repository at this point in the history
Co-authored-by: Peter Tuton <hacker6ikg@msftopenhack6882ops.onmicrosoft.com>
  • Loading branch information
petertuton and Peter Tuton committed Nov 29, 2021
1 parent 2d7634f commit 60de96a
Show file tree
Hide file tree
Showing 12 changed files with 25 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dotnet template.yml
Expand Up @@ -17,7 +17,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-dotnet@v1
with:
dotnet-version: '2.1'
dotnet-version: '3.1'
- run: mkdir -p .nuget
- name: Download nuget
run:
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Expand Up @@ -2,6 +2,9 @@

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

### 3.5.3 (2021-11-12)
* [Updated] Updated to support .NET Core 3.1

### 3.5.2 (2021-08-23)
* [Updated] Updated the nuget template json to match the schema

Expand Down
4 changes: 2 additions & 2 deletions Microsoft.Azure.IoT.Edge.Function.nuspec
Expand Up @@ -2,11 +2,11 @@
<package>
<metadata>
<id>Microsoft.Azure.IoT.Edge.Function</id>
<version>3.5.2</version>
<version>3.5.3</version>
<title>Azure IoT Edge Function</title>
<authors>Microsoft</authors>
<owners>microsoft, nugetazureiotedge</owners>
<description>Scaffolding tool to setup azure iot edge function development environment.</description>
<description>Scaffolding tool to setup Azure IoT Edge Function development environment.</description>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<language>en-US</language>
<projectUrl>http://github.com/azure/dotnet-template-azure-iot-edge-function/</projectUrl>
Expand Down
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -9,7 +9,7 @@ The template will set up all necessary files for you to focus on functionality p

## Get Started

Make sure you have [.Net Core 2.1 SDK](https://www.microsoft.com/net/download/core) installed.
Make sure you have [.Net Core 3.1 SDK](https://www.microsoft.com/net/download/core) installed.

Run `dotnet` command to install the template:

Expand Down
9 changes: 4 additions & 5 deletions Test/Test.csproj
@@ -1,12 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.5.0" />
<PackageReference Include="xunit" Version="2.3.1" />
<DotNetCliToolReference Include="dotnet-xunit" Version="2.3.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0" />
<PackageReference Include="xunit" Version="2.4.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.0" />
</ItemGroup>
</Project>
@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/dotnet/core/sdk:2.1 AS build-env
FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build-env
WORKDIR /app

COPY *.csproj ./
Expand All @@ -7,7 +7,7 @@ RUN dotnet restore
COPY . ./
RUN dotnet publish -c Release -o out

FROM mcr.microsoft.com/azure-functions/dotnet:2.0-iot-edge
FROM mcr.microsoft.com/azure-functions/dotnet:3.0

ENV AzureWebJobsScriptRoot=/app

Expand Down
@@ -1,11 +1,11 @@
FROM mcr.microsoft.com/azure-functions/dotnet:2.0-iot-edge AS base
FROM mcr.microsoft.com/azure-functions/dotnet:3.0 AS base

RUN apt-get update && \
apt-get install -y --no-install-recommends unzip procps curl && \
curl -sSL https://aka.ms/getvsdbgsh | bash /dev/stdin -v latest -l ~/vsdbg && \
rm -rf /var/lib/apt/lists/*

FROM mcr.microsoft.com/dotnet/core/sdk:2.1 AS build-env
FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build-env
WORKDIR /app

COPY *.csproj ./
Expand Down
@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/dotnet/core/sdk:2.1 AS build-env
FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build-env
WORKDIR /app

COPY *.csproj ./
Expand All @@ -7,7 +7,7 @@ RUN dotnet restore
COPY . ./
RUN dotnet publish -c Release -o out

FROM mcr.microsoft.com/azure-functions/dotnet:2.0-arm32v7
FROM mcr.microsoft.com/azure-functions/dotnet:3.0-arm32v7

ENV AzureWebJobsScriptRoot=/app

Expand Down
@@ -1,11 +1,11 @@
FROM mcr.microsoft.com/azure-functions/dotnet:2.0-arm32v7 AS base
FROM mcr.microsoft.com/azure-functions/dotnet:3.0-arm32v7 AS base

RUN apt-get update && \
apt-get install -y --no-install-recommends unzip procps curl && \
curl -sSL https://aka.ms/getvsdbgsh | bash /dev/stdin -v latest -l ~/vsdbg && \
rm -rf /var/lib/apt/lists/*

FROM mcr.microsoft.com/dotnet/core/sdk:2.1 AS build-env
FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build-env
WORKDIR /app

COPY *.csproj ./
Expand Down
@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/dotnet/core/sdk:2.1 AS build-env
FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build-env
WORKDIR /app

COPY *.csproj ./
Expand All @@ -7,7 +7,7 @@ RUN dotnet restore
COPY . ./
RUN dotnet publish -c Release -o out

FROM mcr.microsoft.com/azure-functions/dotnet:2.0-nanoserver-1809
FROM mcr.microsoft.com/azure-functions/dotnet:3.0-nanoserver-1809

ENV AzureWebJobsScriptRoot=C:\\app

Expand Down
@@ -1,14 +1,9 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Azure.Devices.Client;
using Microsoft.Azure.WebJobs;
using Microsoft.Azure.WebJobs.Extensions.EdgeHub;
using Microsoft.Azure.WebJobs.Host;
using Microsoft.Extensions.Logging;
using Newtonsoft.Json;

namespace Functions.Samples
{
Expand Down
Expand Up @@ -3,15 +3,16 @@
<TargetFramework>netstandard2.0</TargetFramework>
<AzureFunctionsVersion></AzureFunctionsVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|netcoreapp2.1|AnyCPU'">
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|netcoreapp3.1|AnyCPU'">
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
<TreatSpecificWarningsAsErrors />
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.EdgeHub" Version="1.0.7" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="5.0.0" />
<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="1.0.38" />
<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="3.0.13" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="2.1.1" />
<PackageReference Include="Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator" Version="1.2.3" />
</ItemGroup>
<ItemGroup>
<None Update="host.json">
Expand Down

0 comments on commit 60de96a

Please sign in to comment.