-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix local telemetry client dependency (#26)
* Fix local telemetry client dependency * Bump sample to NET 6 * Add dotnet 6 build process
- Loading branch information
1 parent
cf2cb77
commit 640bcee
Showing
12 changed files
with
225 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,6 +24,10 @@ jobs: | |
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- uses: actions/setup-dotnet@v2 | ||
with: | ||
dotnet-version: '6.0.x' | ||
|
||
- name: "Get Commit Date" | ||
uses: actions/[email protected] | ||
|
@@ -53,7 +57,7 @@ jobs: | |
run: nuget restore | ||
|
||
- name: Build | ||
run: msbuild -p:Configuration="$BUILD_CONFIGURATION" -p:Platform="$BUILD_PLATFORM" -m -p:GeneratePackageOnBuild=true -p:OutDir=$PUBLISH_DIR -p:Version=$VERSION_NUMBER -p:AssemblyVersion=$VERSION_NUMBER -p:AssemblyInformationalVersion=$VERSION_NUMBER -p:PackageVersion=$PACKAGE_VERSION -p:GenerateProjectSpecificOutputFolder=true | ||
run: dotnet build -p:Configuration="$BUILD_CONFIGURATION" -p:Platform="$BUILD_PLATFORM" -m -p:GeneratePackageOnBuild=true -p:OutDir=$PUBLISH_DIR -p:Version=$VERSION_NUMBER -p:AssemblyVersion=$VERSION_NUMBER -p:AssemblyInformationalVersion=$VERSION_NUMBER -p:PackageVersion=$PACKAGE_VERSION -p:GenerateProjectSpecificOutputFolder=true | ||
|
||
- uses: actions/upload-artifact@v2 | ||
name: Upload artifact | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"recommendations": [ | ||
"ms-azuretools.vscode-azurefunctions", | ||
"ms-dotnettools.csharp" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Attach to .NET Functions", | ||
"type": "coreclr", | ||
"request": "attach", | ||
"processId": "${command:azureFunctions.pickProcess}" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"azureFunctions.deploySubpath": "SampleAutofacFunction/bin/Release/netcoreapp3.1/publish", | ||
"azureFunctions.projectLanguage": "C#", | ||
"azureFunctions.projectRuntime": "~3", | ||
"debug.internalConsoleOptions": "neverOpen", | ||
"azureFunctions.preDeployTask": "publish (functions)" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "clean (functions)", | ||
"command": "dotnet", | ||
"args": [ | ||
"clean", | ||
"/property:GenerateFullPaths=true", | ||
"/consoleloggerparameters:NoSummary" | ||
], | ||
"type": "process", | ||
"problemMatcher": "$msCompile", | ||
"options": { | ||
"cwd": "${workspaceFolder}/SampleAutofacFunction" | ||
} | ||
}, | ||
{ | ||
"label": "build (functions)", | ||
"command": "dotnet", | ||
"args": [ | ||
"build", | ||
"/property:GenerateFullPaths=true", | ||
"/consoleloggerparameters:NoSummary" | ||
], | ||
"type": "process", | ||
"dependsOn": "clean (functions)", | ||
"group": { | ||
"kind": "build", | ||
"isDefault": true | ||
}, | ||
"problemMatcher": "$msCompile", | ||
"options": { | ||
"cwd": "${workspaceFolder}/SampleAutofacFunction" | ||
} | ||
}, | ||
{ | ||
"label": "clean release (functions)", | ||
"command": "dotnet", | ||
"args": [ | ||
"clean", | ||
"--configuration", | ||
"Release", | ||
"/property:GenerateFullPaths=true", | ||
"/consoleloggerparameters:NoSummary" | ||
], | ||
"type": "process", | ||
"problemMatcher": "$msCompile", | ||
"options": { | ||
"cwd": "${workspaceFolder}/SampleAutofacFunction" | ||
} | ||
}, | ||
{ | ||
"label": "publish (functions)", | ||
"command": "dotnet", | ||
"args": [ | ||
"publish", | ||
"--configuration", | ||
"Release", | ||
"/property:GenerateFullPaths=true", | ||
"/consoleloggerparameters:NoSummary" | ||
], | ||
"type": "process", | ||
"dependsOn": "clean release (functions)", | ||
"problemMatcher": "$msCompile", | ||
"options": { | ||
"cwd": "${workspaceFolder}/SampleAutofacFunction" | ||
} | ||
}, | ||
{ | ||
"type": "func", | ||
"dependsOn": "build (functions)", | ||
"options": { | ||
"cwd": "${workspaceFolder}/SampleAutofacFunction/bin/Debug/netcoreapp3.1" | ||
}, | ||
"command": "host start", | ||
"isBackground": true, | ||
"problemMatcher": "$func-dotnet-watch" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
using Microsoft.Azure.WebJobs; | ||
using Microsoft.Extensions.Logging; | ||
using SampleAutofacFunction.Services; | ||
using System; | ||
using System.Diagnostics; | ||
using System.Threading.Tasks; | ||
|
||
namespace SampleAutofacFunction.Functions | ||
{ | ||
public class Function3 : IDisposable | ||
{ | ||
private readonly IService1 _service1; | ||
private readonly ILogger _logger; | ||
private readonly Guid _id = Guid.NewGuid(); | ||
|
||
public Function3(IService1 service1, ILogger logger) | ||
{ | ||
_service1 = service1; | ||
_logger = logger; | ||
_logger.LogWarning($"Creating {this}"); | ||
} | ||
|
||
public void Dispose() | ||
{ | ||
_logger.LogWarning($"Disposing {this}"); | ||
} | ||
|
||
[FunctionName(nameof(Function3))] | ||
public async Task Run([TimerTrigger("0 */5 * * * *", RunOnStartup = true)] TimerInfo timer) | ||
{ | ||
await Task.Delay(2000); | ||
Activity.Current.AddTag("Test", "Hello World"); | ||
_logger.LogInformation($"C# Timer trigger function processed."); | ||
} | ||
|
||
public override string ToString() | ||
{ | ||
return $"{_id} ({nameof(Function1)})"; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters