Skip to content

Commit

Permalink
[Samples] Update configuration sample project (#1073)
Browse files Browse the repository at this point in the history
  • Loading branch information
liliankasem committed Sep 28, 2022
1 parent 1f7a321 commit 5f39de6
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 11 deletions.
13 changes: 5 additions & 8 deletions samples/Configuration/Configuration.csproj
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<AzureFunctionsVersion>v4</AzureFunctionsVersion>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Azure.Core.NewtonsoftJson" Version="1.0.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker" Version="1.0.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Http" Version="3.0.12" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Sdk" Version="1.3.0" OutputItemType="Analyzer" />
<PackageReference Include="Microsoft.Azure.Functions.Worker" Version="1.9.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Http" Version="3.0.13" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Sdk" Version="1.7.0" />
</ItemGroup>

<ItemGroup>
<None Update="host.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
Expand All @@ -21,5 +19,4 @@
<CopyToPublishDirectory>Never</CopyToPublishDirectory>
</None>
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion samples/Configuration/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public class Program
public static void Main()
{
var host = new HostBuilder()
.ConfigureFunctionsWorkerDefaults(workerApplication =>
.ConfigureFunctionsWorkerDefaults((IFunctionsWorkerApplicationBuilder workerApplication) =>
{
// Use any of the extension methods in WorkerConfigurationExtensions.
})
Expand Down
4 changes: 2 additions & 2 deletions samples/Configuration/host.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
"version": "2.0",
"logging": {
"applicationInsights": {
"samplingExcludedTypes": "Request",
"samplingSettings": {
"isEnabled": true
"isEnabled": true,
"excludedTypes": "Request"
}
}
}
Expand Down
7 changes: 7 additions & 0 deletions samples/Configuration/local.settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"IsEncrypted": false,
"Values": {
"FUNCTIONS_WORKER_RUNTIME": "dotnet-isolated",
"AzureWebJobsStorage": "UseDevelopmentStorage=true"
}
}

0 comments on commit 5f39de6

Please sign in to comment.