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/setup-dotnet@v1
|
||||
with:
|
||||
dotnet-version: '2.1'
|
||||
dotnet-version: '3.1'
|
||||
- run: mkdir -p .nuget
|
||||
- name: Download nuget
|
||||
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/)
|
||||
|
||||
### 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
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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:
|
||||
|
||||
|
|
|
@ -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 ./
|
||||
|
@ -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
|
||||
|
||||
|
|
|
@ -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 ./
|
||||
|
|
|
@ -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 ./
|
||||
|
@ -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
|
||||
|
||||
|
|
|
@ -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 ./
|
||||
|
|
|
@ -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 ./
|
||||
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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">
|
||||
|
|
Загрузка…
Ссылка в новой задаче