Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add AzureFunctionsEndToEnd with prototype implementation #5418

Merged
merged 54 commits into from
Sep 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
0012f2b
Add AzureFunctionsEndToEnd with prototype implementation
captainsafia Aug 24, 2024
39eda7e
Updat EventHub extension package to latest mirrored version
captainsafia Aug 24, 2024
81c1406
Fix RandomString implementation
eerhardt Aug 26, 2024
b4c0adb
Hack to make the emulators work
davidfowl Aug 26, 2024
9424363
More cleanup
davidfowl Aug 26, 2024
35ece30
Primary constructors
davidfowl Aug 26, 2024
e150956
More cleanup
davidfowl Aug 27, 2024
b8504f9
Added Aspire.Hosting.Azure.Functions
davidfowl Aug 27, 2024
866c12c
Experiment with specifying the host storage
davidfowl Aug 28, 2024
67c7502
Separate host storage from the app storage
davidfowl Aug 28, 2024
83901da
First cut of IResourceWithAzureFunctionsConfig and removed WithReference
davidfowl Aug 28, 2024
e7b4653
Tested with managed identity and worked around issues
davidfowl Aug 28, 2024
3f40399
Implement the functions interface on storage as well
davidfowl Aug 31, 2024
148eed8
Simulate modeling Azure Functions as project resources
captainsafia Sep 3, 2024
c8c5d78
Make it work
davidfowl Sep 4, 2024
dc0ab33
Remove the port from launch settings.
davidfowl Sep 4, 2024
a7b1c5b
Remove other interfaces from functions resource
davidfowl Sep 4, 2024
a1de969
Simplify functions sample
davidfowl Sep 4, 2024
2adf2f9
Add smoke test for launching Functions app
captainsafia Sep 4, 2024
4dd9540
Always run inner functions build
captainsafia Sep 4, 2024
bc59c5a
Wire up package version for Aspire.Hosting.Azure.Functions
captainsafia Sep 4, 2024
514e11c
Fix AppHost reference for test project
captainsafia Sep 4, 2024
30277e4
Move AzureFunctionsEndToEnd tests to project specific tests
captainsafia Sep 4, 2024
f4d06ef
Add Requires attributes to AzureFunctions tests
captainsafia Sep 4, 2024
8618f28
Skip AzureFunctionsTest on Helix until core tools is installed
captainsafia Sep 4, 2024
1d247cb
Merge remote-tracking branch 'origin/main' into add-azfunctions-proto…
radical Sep 4, 2024
4217e1d
Add deps on azure functions cli on helix
radical Sep 4, 2024
1d67dc0
fix helix payload definition
radical Sep 4, 2024
a7ec3ec
Fix playground tests build
radical Sep 4, 2024
e25eead
Fix cli payload for helix
radical Sep 5, 2024
5605f41
Set destinationPath on helix payload, the default is the root directory
radical Sep 5, 2024
7d36ffd
Fix typo
radical Sep 5, 2024
38621d1
another round - fix path
radical Sep 5, 2024
42e48bb
Merge remote-tracking branch 'origin/main' into add-azfunctions-proto…
radical Sep 5, 2024
44f428f
simplify payload spec
radical Sep 5, 2024
0c0d74c
Update docstrings and README for Aspire.Hosting.Azure.Functions
captainsafia Sep 5, 2024
9d9e38c
Appease the linter
captainsafia Sep 5, 2024
5b18b3d
Conditionally skip EventHubs emulation in CI
captainsafia Sep 5, 2024
214139d
Skip AzureFunctionsTest
captainsafia Sep 5, 2024
9c10de5
Use [ActiveIssue] to skip test in CI
captainsafia Sep 5, 2024
95667ec
More feedback
captainsafia Sep 5, 2024
f464069
Update tests/helix/send-to-helix-inner.proj
captainsafia Sep 6, 2024
bf92b87
Disable eventhubs on codespaces which doesn't have docker desktop
radical Sep 6, 2024
e02a50f
Update HTTP trigger to use ASP.NET-based trigger
captainsafia Sep 6, 2024
7e650e0
Merge branch 'main' into add-azfunctions-prototype
captainsafia Sep 6, 2024
c9a50a7
Try 1: patch extensions.json copy bug
captainsafia Sep 6, 2024
080aa8a
Try 2: patch extensions.json copy bug
captainsafia Sep 6, 2024
61855b0
Try 3: patch extensions.json copy bug
captainsafia Sep 6, 2024
54c94ae
Try only build AzureFunctionsEndToEnd project once in CI
captainsafia Sep 6, 2024
97b10ac
Bring back manual patch for extensions.json
captainsafia Sep 7, 2024
bf8d90a
Enable include conditionally
captainsafia Sep 7, 2024
54590a3
Update README with workaround for build bug
captainsafia Sep 7, 2024
33e563d
Fix markdown lint warnings
captainsafia Sep 7, 2024
46952d7
Add note about lack of OTel support
captainsafia Sep 7, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -147,4 +147,4 @@ node_modules/
*.svclog

# Python virtual environments
.venv
.venv
32 changes: 32 additions & 0 deletions Aspire.sln
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.31903.59
Expand Down Expand Up @@ -583,6 +584,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Aspire.Hosting.Dapr.Tests",
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Aspire.Hosting.AWS.Tests", "tests\Aspire.Hosting.AWS.Tests\Aspire.Hosting.AWS.Tests.csproj", "{6F71BC73-B703-4E64-98E0-801781302E7A}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "AzureFunctionsEndToEnd", "AzureFunctionsEndToEnd", "{305D5B56-8782-493C-BD44-9860F8616D92}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AzureFunctionsEndToEnd.ApiService", "playground\AzureFunctionsEndToEnd\AzureFunctionsEndToEnd.ApiService\AzureFunctionsEndToEnd.ApiService.csproj", "{659AF918-57A4-4616-B3D0-24FCE38DF12A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AzureFunctionsEndToEnd.AppHost", "playground\AzureFunctionsEndToEnd\AzureFunctionsEndToEnd.AppHost\AzureFunctionsEndToEnd.AppHost.csproj", "{13025E2D-2E2B-4319-8754-0B12F324283E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AzureFunctionsEndToEnd.Functions", "playground\AzureFunctionsEndToEnd\AzureFunctionsEndToEnd.Functions\AzureFunctionsEndToEnd.Functions.csproj", "{79D2E40E-95EC-4BAF-8382-E5669B8E6E42}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aspire.Hosting.Azure.Functions", "src\Aspire.Hosting.Azure.Functions\Aspire.Hosting.Azure.Functions.csproj", "{A8FFEB1F-B128-48D0-A114-5C94FF770551}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "waitfor", "waitfor", "{3FF3F00C-95C0-46FC-B2BE-A3920C71E393}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WaitForSandbox.AppHost", "playground\waitfor\WaitForSandbox.AppHost\WaitForSandbox.AppHost.csproj", "{415E011A-1C56-41A1-BAEB-CA5D5CED1A57}"
Expand Down Expand Up @@ -1547,6 +1558,22 @@ Global
{6F71BC73-B703-4E64-98E0-801781302E7A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6F71BC73-B703-4E64-98E0-801781302E7A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6F71BC73-B703-4E64-98E0-801781302E7A}.Release|Any CPU.Build.0 = Release|Any CPU
{659AF918-57A4-4616-B3D0-24FCE38DF12A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{659AF918-57A4-4616-B3D0-24FCE38DF12A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{659AF918-57A4-4616-B3D0-24FCE38DF12A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{659AF918-57A4-4616-B3D0-24FCE38DF12A}.Release|Any CPU.Build.0 = Release|Any CPU
{13025E2D-2E2B-4319-8754-0B12F324283E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{13025E2D-2E2B-4319-8754-0B12F324283E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{13025E2D-2E2B-4319-8754-0B12F324283E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{13025E2D-2E2B-4319-8754-0B12F324283E}.Release|Any CPU.Build.0 = Release|Any CPU
{79D2E40E-95EC-4BAF-8382-E5669B8E6E42}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{79D2E40E-95EC-4BAF-8382-E5669B8E6E42}.Debug|Any CPU.Build.0 = Debug|Any CPU
{79D2E40E-95EC-4BAF-8382-E5669B8E6E42}.Release|Any CPU.ActiveCfg = Release|Any CPU
{79D2E40E-95EC-4BAF-8382-E5669B8E6E42}.Release|Any CPU.Build.0 = Release|Any CPU
{A8FFEB1F-B128-48D0-A114-5C94FF770551}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A8FFEB1F-B128-48D0-A114-5C94FF770551}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A8FFEB1F-B128-48D0-A114-5C94FF770551}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A8FFEB1F-B128-48D0-A114-5C94FF770551}.Release|Any CPU.Build.0 = Release|Any CPU
{415E011A-1C56-41A1-BAEB-CA5D5CED1A57}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{415E011A-1C56-41A1-BAEB-CA5D5CED1A57}.Debug|Any CPU.Build.0 = Debug|Any CPU
{415E011A-1C56-41A1-BAEB-CA5D5CED1A57}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down Expand Up @@ -1844,6 +1871,11 @@ Global
{091EA540-355B-4763-9980-5F83F0BB6F11} = {15966C27-17FA-4A46-A172-55985411540A}
{C60C5CFA-5B6D-4432-BFCD-54D1BEEC7DBE} = {830A89EC-4029-4753-B25A-068BAE37DEC7}
{6F71BC73-B703-4E64-98E0-801781302E7A} = {830A89EC-4029-4753-B25A-068BAE37DEC7}
{305D5B56-8782-493C-BD44-9860F8616D92} = {D173887B-AF42-4576-B9C1-96B9E9B3D9C0}
{659AF918-57A4-4616-B3D0-24FCE38DF12A} = {305D5B56-8782-493C-BD44-9860F8616D92}
{13025E2D-2E2B-4319-8754-0B12F324283E} = {305D5B56-8782-493C-BD44-9860F8616D92}
{79D2E40E-95EC-4BAF-8382-E5669B8E6E42} = {305D5B56-8782-493C-BD44-9860F8616D92}
{A8FFEB1F-B128-48D0-A114-5C94FF770551} = {77CFE74A-32EE-400C-8930-5025E8555256}
{3FF3F00C-95C0-46FC-B2BE-A3920C71E393} = {D173887B-AF42-4576-B9C1-96B9E9B3D9C0}
{415E011A-1C56-41A1-BAEB-CA5D5CED1A57} = {3FF3F00C-95C0-46FC-B2BE-A3920C71E393}
{C554C480-3DA7-4D62-A09A-3F3F743D7A66} = {3FF3F00C-95C0-46FC-B2BE-A3920C71E393}
Expand Down
17 changes: 17 additions & 0 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,21 @@
</ItemGroup>

<Import Project="$(RepositoryEngineeringDir)/apicompat/PublicApiAnalyzer.targets" />

<!-- HACK: This resolves issues in CI builds where the extensions.json file is mapped to the incorrect directory. We only want
to copy the updated extensions.json file once the `_FunctionsExtensionUpdateMetadata` target has completed. -->
<Target Name="_FunctionsAssignTargetPathsFix" AfterTargets="_FunctionsAssignTargetPaths" BeforeTargets="_FunctionsExtensionUpdateMetadata">
<ItemGroup>
<None Remove="$(_FunctionsIntermediateExtensionUpdatedJsonPath)"
CopyToOutputDirectory="PreserveNewest"
CopyToPublishDirectory="PreserveNewest"
TargetPath="$(_FunctionsExtensionsJsonName)" />
<None
Include="$(_FunctionsIntermediateExtensionUpdatedJsonPath)"
CopyToOutputDirectory="PreserveNewest"
CopyToPublishDirectory="PreserveNewest"
TargetPath="$(_FunctionsExtensionsJsonName)"
Condition="Exists('$(_FunctionsIntermediateExtensionUpdatedJsonPath)')"/>
</ItemGroup>
</Target>
</Project>
11 changes: 10 additions & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,18 @@
<PackageVersion Include="Microsoft.Orleans.Client" Version="8.2.0" />
<PackageVersion Include="Microsoft.Orleans.Server" Version="8.2.0" />
<PackageVersion Include="Microsoft.Orleans.Sdk" Version="8.2.0" />
<!-- playground apps dependencies for AzureFunctionsEndToEnd -->
<PackageVersion Include="Microsoft.Azure.Functions.Worker" Version="1.23.0" />
<PackageVersion Include="Microsoft.Azure.Functions.Worker.Extensions.Http.AspNetCore" Version="1.3.2" />
<PackageVersion Include="Microsoft.Azure.Functions.Worker.Extensions.Storage.Blobs" Version="6.6.0" />
<PackageVersion Include="Microsoft.Azure.Functions.Worker.Extensions.Storage.Queues" Version="5.5.0" />
<PackageVersion Include="Microsoft.Azure.Functions.Worker.Extensions.EventHubs" Version="6.3.5"/>
<PackageVersion Include="Microsoft.Azure.Functions.Worker.OpenTelemetry" Version="1.0.0-preview1" />
<PackageVersion Include="Microsoft.Azure.Functions.Worker.Sdk" Version="1.17.4" />
<PackageVersion Include="Microsoft.ApplicationInsights.WorkerService" Version="2.22.0" />
<!-- Pinned version for Component Governance - Remove when root dependencies are updated -->
<PackageVersion Include="Azure.Core" Version="1.42.0" />
<PackageVersion Include="Azure.Identity" Version="1.12.0" />
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" /> <!-- https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3313 -->
</ItemGroup>
</Project>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\Playground.ServiceDefaults\Playground.ServiceDefaults.csproj" />
</ItemGroup>

<ItemGroup>
<AspireProjectOrPackageReference Include="Aspire.Azure.Storage.Blobs" />
<AspireProjectOrPackageReference Include="Aspire.Azure.Storage.Queues" />
<AspireProjectOrPackageReference Include="Aspire.Azure.Messaging.EventHubs" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
using System.Security.Cryptography;
using System.Text;
#if !SKIP_EVENTHUBS_EMULATION
using Azure.Messaging.EventHubs;
using Azure.Messaging.EventHubs.Producer;
#endif
using Azure.Storage.Blobs;
using Azure.Storage.Queues;

var builder = WebApplication.CreateBuilder(args);

// Add service defaults & Aspire components.
builder.AddServiceDefaults();
builder.AddAzureQueueClient("queue");
builder.AddAzureBlobClient("blob");
#if !SKIP_EVENTHUBS_EMULATION
builder.AddAzureEventHubProducerClient("eventhubs", static settings => settings.EventHubName = "myhub");
#endif

var app = builder.Build();

app.MapGet("/publish/asq", async (QueueServiceClient client, CancellationToken cancellationToken) =>
captainsafia marked this conversation as resolved.
Show resolved Hide resolved
{
var queue = client.GetQueueClient("queue");
await queue.CreateIfNotExistsAsync(cancellationToken: cancellationToken);
var data = Convert.ToBase64String(Encoding.UTF8.GetBytes("Hello, World!"));
await queue.SendMessageAsync(data, cancellationToken: cancellationToken);
return Results.Ok("Message sent to Azure Storage Queue.");
});

static string RandomString(int length)
{
const string chars = "abcdefghijklmnopqrstuvwxyz";
return RandomNumberGenerator.GetString(chars, length);
}

app.MapGet("/publish/blob", async (BlobServiceClient client, CancellationToken cancellationToken, int length = 20) =>
{
var container = client.GetBlobContainerClient("blobs");
await container.CreateIfNotExistsAsync(cancellationToken: cancellationToken);

var entry = new { Id = Guid.NewGuid(), Text = RandomString(length) };
var blob = container.GetBlobClient(entry.Id.ToString());

await blob.UploadAsync(new BinaryData(entry));

return Results.Ok("String uploaded to Azure Storage Blobs.");
});

#if !SKIP_EVENTHUBS_EMULATION
app.MapGet("/publish/eventhubs", async (EventHubProducerClient client, CancellationToken cancellationToken, int length = 20) =>
{
var data = new BinaryData(Encoding.UTF8.GetBytes(RandomString(length)));
await client.SendAsync([new EventData(data)]);
return Results.Ok("Message sent to Azure EventHubs.");
});
#endif

app.MapGet("/", async (HttpClient client) =>
{
var stream = await client.GetStreamAsync("http://funcapp/api/weatherforecast");
return Results.Stream(stream, "application/json");
});

app.MapDefaultEndpoints();

app.Run();
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"$schema": "https://json.schemastore.org/launchsettings.json",
"profiles": {
"http": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"launchUrl": "publish/asq",
"applicationUrl": "http://localhost:5313",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"https": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"launchUrl": "publish/asq",
"applicationUrl": "https://localhost:7314;http://localhost:5313",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsAspireHost>true</IsAspireHost>
<UserSecretsId>d824db17-effc-4f8c-aa80-f0ae6aba93eb</UserSecretsId>
</PropertyGroup>

<ItemGroup>
<AspireProjectOrPackageReference Include="Aspire.Hosting.Azure.Functions" />
<AspireProjectOrPackageReference Include="Aspire.Hosting.Azure.EventHubs" />
<AspireProjectOrPackageReference Include="Aspire.Hosting.Azure.Storage" />
<AspireProjectOrPackageReference Include="Aspire.Hosting.AppHost" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\AzureFunctionsEndToEnd.ApiService\AzureFunctionsEndToEnd.ApiService.csproj" />
<ProjectReference Include="..\AzureFunctionsEndToEnd.Functions\AzureFunctionsEndToEnd.Functions.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
using Aspire.Hosting.Azure;

var builder = DistributedApplication.CreateBuilder(args);

var storage = builder.AddAzureStorage("storage").RunAsEmulator();
var queue = storage.AddQueues("queue");
var blob = storage.AddBlobs("blob");

#if !SKIP_EVENTHUBS_EMULATION
var eventHubs = builder.AddAzureEventHubs("eventhubs").RunAsEmulator().AddEventHub("myhub");
#endif

var funcApp = builder.AddAzureFunctionsProject<Projects.AzureFunctionsEndToEnd_Functions>("funcapp")
.WithExternalHttpEndpoints()
#if !SKIP_EVENTHUBS_EMULATION
.WithReference(eventHubs)
#endif
.WithReference(blob)
.WithReference(queue);

builder.AddProject<Projects.AzureFunctionsEndToEnd_ApiService>("apiservice")
#if !SKIP_EVENTHUBS_EMULATION
.WithReference(eventHubs)
#endif
.WithReference(queue)
.WithReference(blob)
.WithReference(funcApp);

builder.Build().Run();
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"$schema": "https://json.schemastore.org/launchsettings.json",
"profiles": {
"https": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "https://localhost:17244;http://localhost:15054",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development",
"DOTNET_ENVIRONMENT": "Development",
"DOTNET_DASHBOARD_OTLP_ENDPOINT_URL": "https://localhost:21003",
"DOTNET_RESOURCE_SERVICE_ENDPOINT_URL": "https://localhost:22110"
}
},
"http": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "http://localhost:15054",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development",
"DOTNET_ENVIRONMENT": "Development",
"DOTNET_DASHBOARD_OTLP_ENDPOINT_URL": "http://localhost:19010",
"DOTNET_RESOURCE_SERVICE_ENDPOINT_URL": "http://localhost:20125"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning",
"Aspire.Hosting.Dcp": "Warning"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
local.settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<AzureFunctionsVersion>v4</AzureFunctionsVersion>
<OutputType>Exe</OutputType>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.Azure.Functions.Worker" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Http.AspNetCore" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Storage.Blobs" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Storage.Queues" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.EventHubs" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.OpenTelemetry" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Sdk" />
<PackageReference Include="Microsoft.ApplicationInsights.WorkerService" />
<PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" />
<PackageReference Include="OpenTelemetry.Extensions.Hosting" />
</ItemGroup>
<ItemGroup>
<None Update="host.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="local.settings.json">
captainsafia marked this conversation as resolved.
Show resolved Hide resolved
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>Never</CopyToPublishDirectory>
</None>
</ItemGroup>
<ItemGroup>
<Using Include="System.Threading.ExecutionContext" Alias="ExecutionContext" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Playground.ServiceDefaults\Playground.ServiceDefaults.csproj" />
</ItemGroup>
<!-- HACK: Simulate running the Azure Functions project via `dotnet run` by spawning the host via a run command. -->
<PropertyGroup>
<RunCommand>func</RunCommand>
<RunArguments>start --csharp --verbose</RunArguments>
</PropertyGroup>
</Project>
Loading
Loading