Updated to support .NET Core 3.1 (#57)
Co-authored-by: Peter Tuton <hacker6ikg@msftopenhack6882ops.onmicrosoft.com>
This commit is contained in:
Родитель
2d7634f921
Коммит
60de96aadd
|
@ -17,7 +17,7 @@ jobs:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: actions/setup-dotnet@v1
|
- uses: actions/setup-dotnet@v1
|
||||||
with:
|
with:
|
||||||
dotnet-version: '2.1'
|
dotnet-version: '3.1'
|
||||||
- run: mkdir -p .nuget
|
- run: mkdir -p .nuget
|
||||||
- name: Download nuget
|
- name: Download nuget
|
||||||
run:
|
run:
|
||||||
|
|
|
@ -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/)
|
[![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)
|
### 3.5.2 (2021-08-23)
|
||||||
* [Updated] Updated the nuget template json to match the schema
|
* [Updated] Updated the nuget template json to match the schema
|
||||||
|
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
<package>
|
<package>
|
||||||
<metadata>
|
<metadata>
|
||||||
<id>Microsoft.Azure.IoT.Edge.Function</id>
|
<id>Microsoft.Azure.IoT.Edge.Function</id>
|
||||||
<version>3.5.2</version>
|
<version>3.5.3</version>
|
||||||
<title>Azure IoT Edge Function</title>
|
<title>Azure IoT Edge Function</title>
|
||||||
<authors>Microsoft</authors>
|
<authors>Microsoft</authors>
|
||||||
<owners>microsoft, nugetazureiotedge</owners>
|
<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>
|
<requireLicenseAcceptance>false</requireLicenseAcceptance>
|
||||||
<language>en-US</language>
|
<language>en-US</language>
|
||||||
<projectUrl>http://github.com/azure/dotnet-template-azure-iot-edge-function/</projectUrl>
|
<projectUrl>http://github.com/azure/dotnet-template-azure-iot-edge-function/</projectUrl>
|
||||||
|
|
|
@ -9,7 +9,7 @@ The template will set up all necessary files for you to focus on functionality p
|
||||||
|
|
||||||
## Get Started
|
## 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:
|
Run `dotnet` command to install the template:
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,11 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netcoreapp2.1</TargetFramework>
|
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.5.0" />
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0" />
|
||||||
<PackageReference Include="xunit" Version="2.3.1" />
|
<PackageReference Include="xunit" Version="2.4.0" />
|
||||||
<DotNetCliToolReference Include="dotnet-xunit" Version="2.3.1" />
|
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.0" />
|
||||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</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
|
WORKDIR /app
|
||||||
|
|
||||||
COPY *.csproj ./
|
COPY *.csproj ./
|
||||||
|
@ -7,7 +7,7 @@ RUN dotnet restore
|
||||||
COPY . ./
|
COPY . ./
|
||||||
RUN dotnet publish -c Release -o out
|
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
|
ENV AzureWebJobsScriptRoot=/app
|
||||||
|
|
||||||
|
|
|
@ -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 && \
|
RUN apt-get update && \
|
||||||
apt-get install -y --no-install-recommends unzip procps curl && \
|
apt-get install -y --no-install-recommends unzip procps curl && \
|
||||||
curl -sSL https://aka.ms/getvsdbgsh | bash /dev/stdin -v latest -l ~/vsdbg && \
|
curl -sSL https://aka.ms/getvsdbgsh | bash /dev/stdin -v latest -l ~/vsdbg && \
|
||||||
rm -rf /var/lib/apt/lists/*
|
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
|
WORKDIR /app
|
||||||
|
|
||||||
COPY *.csproj ./
|
COPY *.csproj ./
|
||||||
|
|
|
@ -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
|
WORKDIR /app
|
||||||
|
|
||||||
COPY *.csproj ./
|
COPY *.csproj ./
|
||||||
|
@ -7,7 +7,7 @@ RUN dotnet restore
|
||||||
COPY . ./
|
COPY . ./
|
||||||
RUN dotnet publish -c Release -o out
|
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
|
ENV AzureWebJobsScriptRoot=/app
|
||||||
|
|
||||||
|
|
|
@ -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 && \
|
RUN apt-get update && \
|
||||||
apt-get install -y --no-install-recommends unzip procps curl && \
|
apt-get install -y --no-install-recommends unzip procps curl && \
|
||||||
curl -sSL https://aka.ms/getvsdbgsh | bash /dev/stdin -v latest -l ~/vsdbg && \
|
curl -sSL https://aka.ms/getvsdbgsh | bash /dev/stdin -v latest -l ~/vsdbg && \
|
||||||
rm -rf /var/lib/apt/lists/*
|
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
|
WORKDIR /app
|
||||||
|
|
||||||
COPY *.csproj ./
|
COPY *.csproj ./
|
||||||
|
|
|
@ -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
|
WORKDIR /app
|
||||||
|
|
||||||
COPY *.csproj ./
|
COPY *.csproj ./
|
||||||
|
@ -7,7 +7,7 @@ RUN dotnet restore
|
||||||
COPY . ./
|
COPY . ./
|
||||||
RUN dotnet publish -c Release -o out
|
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
|
ENV AzureWebJobsScriptRoot=C:\\app
|
||||||
|
|
||||||
|
|
|
@ -1,14 +1,9 @@
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.Azure.Devices.Client;
|
using Microsoft.Azure.Devices.Client;
|
||||||
using Microsoft.Azure.WebJobs;
|
using Microsoft.Azure.WebJobs;
|
||||||
using Microsoft.Azure.WebJobs.Extensions.EdgeHub;
|
using Microsoft.Azure.WebJobs.Extensions.EdgeHub;
|
||||||
using Microsoft.Azure.WebJobs.Host;
|
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using Newtonsoft.Json;
|
|
||||||
|
|
||||||
namespace Functions.Samples
|
namespace Functions.Samples
|
||||||
{
|
{
|
||||||
|
|
|
@ -3,15 +3,16 @@
|
||||||
<TargetFramework>netstandard2.0</TargetFramework>
|
<TargetFramework>netstandard2.0</TargetFramework>
|
||||||
<AzureFunctionsVersion></AzureFunctionsVersion>
|
<AzureFunctionsVersion></AzureFunctionsVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|netcoreapp2.1|AnyCPU'">
|
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|netcoreapp3.1|AnyCPU'">
|
||||||
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
|
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
|
||||||
<TreatSpecificWarningsAsErrors />
|
<TreatSpecificWarningsAsErrors />
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.EdgeHub" Version="1.0.7" />
|
<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="3.0.13" />
|
||||||
<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="1.0.38" />
|
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="2.1.1" />
|
||||||
|
<PackageReference Include="Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator" Version="1.2.3" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Update="host.json">
|
<None Update="host.json">
|
||||||
|
|
Загрузка…
Ссылка в новой задаче