-
Notifications
You must be signed in to change notification settings - Fork 323
added cosmosdb sample #321
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
Open
bradygaster
wants to merge
23
commits into
main
Choose a base branch
from
bradyg/cosmosdb
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,125
−0
Open
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
eaf669f
added cosmosdb sample
bradygaster 9fcea51
Update samples/AspireWithCosmosDb/README.md
bradygaster 9862c1f
updated image per feedback
bradygaster 40eec45
Merge branch 'bradyg/cosmosdb' of https://github.com/dotnet/aspire-sa…
bradygaster 72fa8f9
Update samples/AspireWithCosmosDb/AspireWithCosmos.ApiService/Program.cs
bradygaster bc8d579
Update samples/AspireWithCosmosDb/AspireWithCosmos.AppHost/AspireWith…
bradygaster c04b9e3
formatting
bradygaster d3d82be
Merge branch 'bradyg/cosmosdb' of https://github.com/dotnet/aspire-sa…
bradygaster 1883ca0
more formatting per the ide's suggestions
bradygaster 4637d7e
Update samples/AspireWithCosmosDb/AspireWithCosmos.Web/TodoApiClient.cs
bradygaster 0a0d082
Update samples/AspireWithCosmosDb/AspireWithCosmos.Tests/AspireWithCo…
bradygaster c909987
Update samples/AspireWithCosmosDb/AspireWithCosmos.ServiceDefaults/As…
bradygaster 4d22886
Update samples/AspireWithCosmosDb/AspireWithCosmos.ServiceDefaults/As…
bradygaster 48a4de5
removed test project per feedback.
bradygaster f91372c
Merge branch 'bradyg/cosmosdb' of https://github.com/dotnet/aspire-sa…
bradygaster ec5f76e
simplified terminal image
bradygaster 789446c
added emulator call and comment.
bradygaster ba4f8bb
added cosmos db to tests
bradygaster 339c7d4
updated an otel lib
bradygaster c349ac1
one more tweak
bradygaster 1066a07
Bump packages & other tweaks
DamianEdwards c035293
Add retry policy & health check for Cosmos DB db creation
DamianEdwards d27bf16
Update samples/AspireWithCosmosDb/AspireWithCosmos.ApiService/AspireW…
bradygaster File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
samples/AspireWithCosmosDb/AspireWithCosmos.ApiService/AspireWithCosmos.ApiService.csproj
This file contains hidden or 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,19 @@ | ||
| <Project Sdk="Microsoft.NET.Sdk.Web"> | ||
|
|
||
| <PropertyGroup> | ||
| <TargetFramework>net8.0</TargetFramework> | ||
| <ImplicitUsings>enable</ImplicitUsings> | ||
| <Nullable>enable</Nullable> | ||
| </PropertyGroup> | ||
|
|
||
| <ItemGroup> | ||
| <PackageReference Include="Aspire.Microsoft.Azure.Cosmos" Version="8.0.1" /> | ||
| <PackageReference Include="NSwag.AspNetCore" Version="14.0.7" /> | ||
| <PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.5" /> | ||
| </ItemGroup> | ||
|
|
||
| <ItemGroup> | ||
| <ProjectReference Include="..\AspireWithCosmos.ServiceDefaults\AspireWithCosmos.ServiceDefaults.csproj" /> | ||
| </ItemGroup> | ||
|
|
||
| </Project> |
78 changes: 78 additions & 0 deletions
78
samples/AspireWithCosmosDb/AspireWithCosmos.ApiService/Program.cs
This file contains hidden or 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,78 @@ | ||
| using Microsoft.Azure.Cosmos; | ||
|
|
||
| var builder = WebApplication.CreateBuilder(args); | ||
|
|
||
| builder.AddServiceDefaults(); | ||
| builder.Services.AddProblemDetails(); | ||
| builder.Services.AddHostedService<DatabaseBootstrapper>(); | ||
| builder.Services.AddEndpointsApiExplorer(); | ||
| builder.Services.AddOpenApiDocument(); | ||
| builder.AddAzureCosmosClient("cosmos"); | ||
|
|
||
| var app = builder.Build(); | ||
|
|
||
| if (app.Environment.IsDevelopment()) | ||
| { | ||
| app.UseOpenApi(); | ||
| app.UseSwaggerUi(); | ||
| } | ||
|
|
||
| app.UseExceptionHandler(); | ||
|
|
||
| // create new todos | ||
| app.MapPost("/todos", async (Todo todo, CosmosClient cosmosClient) => | ||
| (await cosmosClient.GetAppDataContainer().CreateItemAsync<Todo>(todo)).Resource | ||
| ); | ||
|
|
||
| // get all the todos | ||
| app.MapGet("/todos", (CosmosClient cosmosClient) => | ||
| cosmosClient.GetAppDataContainer().GetItemLinqQueryable<Todo>(allowSynchronousQueryExecution: true).ToList() | ||
| ); | ||
|
|
||
| app.MapPut("/todos/{id}", async (string id, Todo todo, CosmosClient cosmosClient) => | ||
| (await cosmosClient.GetAppDataContainer().ReplaceItemAsync<Todo>(todo, id)).Resource | ||
| ); | ||
|
|
||
| app.MapDelete("/todos/{userId}/{id}", async (string userId, string id, CosmosClient cosmosClient) => | ||
| { | ||
| await cosmosClient.GetAppDataContainer().DeleteItemAsync<Todo>(id, new PartitionKey(userId)); | ||
| return Results.Ok(); | ||
| }); | ||
|
|
||
| app.MapDefaultEndpoints(); | ||
|
|
||
| app.Run(); | ||
|
|
||
| // The Todo service model used for transmitting data | ||
| public record Todo(string Description, string id, string UserId, bool IsComplete = false) | ||
| { | ||
| // partiion the todos by user id | ||
| internal static string UserIdPartitionKey = "/UserId"; | ||
| } | ||
|
|
||
| // Background service used to scaffold the Cosmos DB/Container | ||
| public class DatabaseBootstrapper(CosmosClient cosmosClient) : IHostedService | ||
| { | ||
| public async Task StartAsync(CancellationToken cancellationToken) | ||
| { | ||
| await cosmosClient.CreateDatabaseIfNotExistsAsync("tododb"); | ||
| var database = cosmosClient.GetDatabase("tododb"); | ||
| await database.CreateContainerIfNotExistsAsync(new ContainerProperties("todos", Todo.UserIdPartitionKey)); | ||
| } | ||
|
|
||
| public Task StopAsync(CancellationToken cancellationToken) => Task.CompletedTask; | ||
| } | ||
|
|
||
| // Convenience class for reusing boilerplate code | ||
| public static class CosmosClientTodoAppExtensions | ||
| { | ||
| public static Container GetAppDataContainer(this CosmosClient cosmosClient) | ||
| { | ||
| var database = cosmosClient.GetDatabase("tododb"); | ||
| var todos = database.GetContainer("todos"); | ||
|
|
||
| if(todos == null) throw new ApplicationException("Cosmos DB collection missing."); | ||
bradygaster marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| return todos; | ||
| } | ||
| } | ||
25 changes: 25 additions & 0 deletions
25
samples/AspireWithCosmosDb/AspireWithCosmos.ApiService/Properties/launchSettings.json
This file contains hidden or 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,25 @@ | ||
| { | ||
| "$schema": "https://json.schemastore.org/launchsettings.json", | ||
| "profiles": { | ||
| "http": { | ||
| "commandName": "Project", | ||
| "dotnetRunMessages": true, | ||
| "launchBrowser": true, | ||
| "launchUrl": "swagger", | ||
| "applicationUrl": "http://localhost:5535", | ||
| "environmentVariables": { | ||
| "ASPNETCORE_ENVIRONMENT": "Development" | ||
| } | ||
| }, | ||
| "https": { | ||
| "commandName": "Project", | ||
| "dotnetRunMessages": true, | ||
| "launchBrowser": true, | ||
| "launchUrl": "swagger", | ||
| "applicationUrl": "https://localhost:7422;http://localhost:5535", | ||
| "environmentVariables": { | ||
| "ASPNETCORE_ENVIRONMENT": "Development" | ||
| } | ||
| } | ||
| } | ||
| } |
8 changes: 8 additions & 0 deletions
8
samples/AspireWithCosmosDb/AspireWithCosmos.ApiService/appsettings.Development.json
This file contains hidden or 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,8 @@ | ||
| { | ||
| "Logging": { | ||
| "LogLevel": { | ||
| "Default": "Information", | ||
| "Microsoft.AspNetCore": "Warning" | ||
| } | ||
| } | ||
| } |
9 changes: 9 additions & 0 deletions
9
samples/AspireWithCosmosDb/AspireWithCosmos.ApiService/appsettings.json
This file contains hidden or 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,9 @@ | ||
| { | ||
| "Logging": { | ||
| "LogLevel": { | ||
| "Default": "Information", | ||
| "Microsoft.AspNetCore": "Warning" | ||
| } | ||
| }, | ||
| "AllowedHosts": "*" | ||
| } |
21 changes: 21 additions & 0 deletions
21
samples/AspireWithCosmosDb/AspireWithCosmos.AppHost/AspireWithCosmos.AppHost.csproj
This file contains hidden or 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,21 @@ | ||
| <Project Sdk="Microsoft.NET.Sdk"> | ||
|
|
||
| <PropertyGroup> | ||
| <OutputType>Exe</OutputType> | ||
| <TargetFramework>net8.0</TargetFramework> | ||
| <ImplicitUsings>enable</ImplicitUsings> | ||
| <Nullable>enable</Nullable> | ||
| <IsAspireHost>true</IsAspireHost> | ||
| </PropertyGroup> | ||
|
|
||
| <ItemGroup> | ||
| <ProjectReference Include="..\AspireWithCosmos.ApiService\AspireWithCosmos.ApiService.csproj" /> | ||
| <ProjectReference Include="..\AspireWithCosmos.Web\AspireWithCosmos.Web.csproj" /> | ||
| </ItemGroup> | ||
|
|
||
| <ItemGroup> | ||
| <PackageReference Include="Aspire.Hosting.AppHost" Version="8.0.0" /> | ||
bradygaster marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| <PackageReference Include="Aspire.Hosting.Azure.CosmosDB" Version="8.0.1" /> | ||
| </ItemGroup> | ||
|
|
||
| </Project> | ||
12 changes: 12 additions & 0 deletions
12
samples/AspireWithCosmosDb/AspireWithCosmos.AppHost/Program.cs
This file contains hidden or 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,12 @@ | ||
| var builder = DistributedApplication.CreateBuilder(args); | ||
|
|
||
| var cosmos = builder.AddAzureCosmosDB("cosmos"); | ||
bradygaster marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| var apiService = builder.AddProject<Projects.AspireWithCosmos_ApiService>("apiservice") | ||
| .WithReference(cosmos); | ||
|
|
||
| builder.AddProject<Projects.AspireWithCosmos_Web>("webfrontend") | ||
| .WithExternalHttpEndpoints() | ||
| .WithReference(apiService); | ||
bradygaster marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| builder.Build().Run(); | ||
29 changes: 29 additions & 0 deletions
29
samples/AspireWithCosmosDb/AspireWithCosmos.AppHost/Properties/launchSettings.json
This file contains hidden or 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,29 @@ | ||
| { | ||
| "$schema": "https://json.schemastore.org/launchsettings.json", | ||
| "profiles": { | ||
| "https": { | ||
| "commandName": "Project", | ||
| "dotnetRunMessages": true, | ||
| "launchBrowser": true, | ||
| "applicationUrl": "https://localhost:17097;http://localhost:15184", | ||
| "environmentVariables": { | ||
| "ASPNETCORE_ENVIRONMENT": "Development", | ||
| "DOTNET_ENVIRONMENT": "Development", | ||
| "DOTNET_DASHBOARD_OTLP_ENDPOINT_URL": "https://localhost:21143", | ||
| "DOTNET_RESOURCE_SERVICE_ENDPOINT_URL": "https://localhost:22152" | ||
| } | ||
| }, | ||
| "http": { | ||
| "commandName": "Project", | ||
| "dotnetRunMessages": true, | ||
| "launchBrowser": true, | ||
| "applicationUrl": "http://localhost:15184", | ||
| "environmentVariables": { | ||
| "ASPNETCORE_ENVIRONMENT": "Development", | ||
| "DOTNET_ENVIRONMENT": "Development", | ||
| "DOTNET_DASHBOARD_OTLP_ENDPOINT_URL": "http://localhost:19196", | ||
| "DOTNET_RESOURCE_SERVICE_ENDPOINT_URL": "http://localhost:20015" | ||
| } | ||
| } | ||
| } | ||
| } |
8 changes: 8 additions & 0 deletions
8
samples/AspireWithCosmosDb/AspireWithCosmos.AppHost/appsettings.Development.json
This file contains hidden or 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,8 @@ | ||
| { | ||
| "Logging": { | ||
| "LogLevel": { | ||
| "Default": "Information", | ||
| "Microsoft.AspNetCore": "Warning" | ||
| } | ||
| } | ||
| } |
9 changes: 9 additions & 0 deletions
9
samples/AspireWithCosmosDb/AspireWithCosmos.AppHost/appsettings.json
This file contains hidden or 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,9 @@ | ||
| { | ||
| "Logging": { | ||
| "LogLevel": { | ||
| "Default": "Information", | ||
| "Microsoft.AspNetCore": "Warning", | ||
| "Aspire.Hosting.Dcp": "Warning" | ||
| } | ||
| } | ||
| } |
22 changes: 22 additions & 0 deletions
22
...pireWithCosmosDb/AspireWithCosmos.ServiceDefaults/AspireWithCosmos.ServiceDefaults.csproj
This file contains hidden or 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,22 @@ | ||
| <Project Sdk="Microsoft.NET.Sdk"> | ||
|
|
||
| <PropertyGroup> | ||
| <TargetFramework>net8.0</TargetFramework> | ||
| <ImplicitUsings>enable</ImplicitUsings> | ||
| <Nullable>enable</Nullable> | ||
| <IsAspireSharedProject>true</IsAspireSharedProject> | ||
| </PropertyGroup> | ||
|
|
||
| <ItemGroup> | ||
| <FrameworkReference Include="Microsoft.AspNetCore.App" /> | ||
|
|
||
| <PackageReference Include="Microsoft.Extensions.Http.Resilience" Version="8.3.0" /> | ||
bradygaster marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| <PackageReference Include="Microsoft.Extensions.ServiceDiscovery" Version="8.0.0" /> | ||
bradygaster marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| <PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.8.1" /> | ||
| <PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.8.1" /> | ||
| <PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.8.1" /> | ||
| <PackageReference Include="OpenTelemetry.Instrumentation.Http" Version="1.8.1" /> | ||
| <PackageReference Include="OpenTelemetry.Instrumentation.Runtime" Version="1.8.0" /> | ||
bradygaster marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| </ItemGroup> | ||
|
|
||
| </Project> | ||
111 changes: 111 additions & 0 deletions
111
samples/AspireWithCosmosDb/AspireWithCosmos.ServiceDefaults/Extensions.cs
This file contains hidden or 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,111 @@ | ||
| using Microsoft.AspNetCore.Builder; | ||
| using Microsoft.AspNetCore.Diagnostics.HealthChecks; | ||
| using Microsoft.Extensions.DependencyInjection; | ||
| using Microsoft.Extensions.Diagnostics.HealthChecks; | ||
| using Microsoft.Extensions.Logging; | ||
| using OpenTelemetry; | ||
| using OpenTelemetry.Metrics; | ||
| using OpenTelemetry.Trace; | ||
|
|
||
| namespace Microsoft.Extensions.Hosting; | ||
|
|
||
| // Adds common .NET Aspire services: service discovery, resilience, health checks, and OpenTelemetry. | ||
| // This project should be referenced by each service project in your solution. | ||
| // To learn more about using this project, see https://aka.ms/dotnet/aspire/service-defaults | ||
| public static class Extensions | ||
| { | ||
| public static IHostApplicationBuilder AddServiceDefaults(this IHostApplicationBuilder builder) | ||
| { | ||
| builder.ConfigureOpenTelemetry(); | ||
|
|
||
| builder.AddDefaultHealthChecks(); | ||
|
|
||
| builder.Services.AddServiceDiscovery(); | ||
|
|
||
| builder.Services.ConfigureHttpClientDefaults(http => | ||
| { | ||
| // Turn on resilience by default | ||
| http.AddStandardResilienceHandler(); | ||
|
|
||
| // Turn on service discovery by default | ||
| http.AddServiceDiscovery(); | ||
| }); | ||
|
|
||
| return builder; | ||
| } | ||
|
|
||
| public static IHostApplicationBuilder ConfigureOpenTelemetry(this IHostApplicationBuilder builder) | ||
| { | ||
| builder.Logging.AddOpenTelemetry(logging => | ||
| { | ||
| logging.IncludeFormattedMessage = true; | ||
| logging.IncludeScopes = true; | ||
| }); | ||
|
|
||
| builder.Services.AddOpenTelemetry() | ||
| .WithMetrics(metrics => | ||
| { | ||
| metrics.AddAspNetCoreInstrumentation() | ||
| .AddHttpClientInstrumentation() | ||
| .AddRuntimeInstrumentation(); | ||
| }) | ||
| .WithTracing(tracing => | ||
| { | ||
| tracing.AddAspNetCoreInstrumentation() | ||
| // Uncomment the following line to enable gRPC instrumentation (requires the OpenTelemetry.Instrumentation.GrpcNetClient package) | ||
| //.AddGrpcClientInstrumentation() | ||
bradygaster marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| .AddHttpClientInstrumentation(); | ||
| }); | ||
|
|
||
| builder.AddOpenTelemetryExporters(); | ||
|
|
||
| return builder; | ||
| } | ||
|
|
||
| private static IHostApplicationBuilder AddOpenTelemetryExporters(this IHostApplicationBuilder builder) | ||
| { | ||
| var useOtlpExporter = !string.IsNullOrWhiteSpace(builder.Configuration["OTEL_EXPORTER_OTLP_ENDPOINT"]); | ||
|
|
||
| if (useOtlpExporter) | ||
| { | ||
| builder.Services.AddOpenTelemetry().UseOtlpExporter(); | ||
| } | ||
|
|
||
| // Uncomment the following lines to enable the Azure Monitor exporter (requires the Azure.Monitor.OpenTelemetry.AspNetCore package) | ||
| //if (!string.IsNullOrEmpty(builder.Configuration["APPLICATIONINSIGHTS_CONNECTION_STRING"])) | ||
| //{ | ||
| // builder.Services.AddOpenTelemetry() | ||
| // .UseAzureMonitor(); | ||
| //} | ||
bradygaster marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| return builder; | ||
| } | ||
|
|
||
| public static IHostApplicationBuilder AddDefaultHealthChecks(this IHostApplicationBuilder builder) | ||
| { | ||
| builder.Services.AddHealthChecks() | ||
| // Add a default liveness check to ensure app is responsive | ||
| .AddCheck("self", () => HealthCheckResult.Healthy(), ["live"]); | ||
|
|
||
| return builder; | ||
| } | ||
|
|
||
| public static WebApplication MapDefaultEndpoints(this WebApplication app) | ||
| { | ||
| // Adding health checks endpoints to applications in non-development environments has security implications. | ||
| // See https://aka.ms/dotnet/aspire/healthchecks for details before enabling these endpoints in non-development environments. | ||
| if (app.Environment.IsDevelopment()) | ||
| { | ||
| // All health checks must pass for app to be considered ready to accept traffic after starting | ||
| app.MapHealthChecks("/health"); | ||
|
|
||
| // Only health checks tagged with the "live" tag must pass for app to be considered alive | ||
| app.MapHealthChecks("/alive", new HealthCheckOptions | ||
| { | ||
| Predicate = r => r.Tags.Contains("live") | ||
| }); | ||
| } | ||
|
|
||
| return app; | ||
| } | ||
| } | ||
28 changes: 28 additions & 0 deletions
28
samples/AspireWithCosmosDb/AspireWithCosmos.Tests/AspireWithCosmos.Tests.csproj
This file contains hidden or 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,28 @@ | ||
| <Project Sdk="Microsoft.NET.Sdk"> | ||
|
|
||
| <PropertyGroup> | ||
| <TargetFramework>net8.0</TargetFramework> | ||
| <ImplicitUsings>enable</ImplicitUsings> | ||
| <Nullable>enable</Nullable> | ||
| <IsPackable>false</IsPackable> | ||
| <IsTestProject>true</IsTestProject> | ||
| </PropertyGroup> | ||
|
|
||
| <ItemGroup> | ||
| <PackageReference Include="Aspire.Hosting.Testing" Version="8.0.0" /> | ||
bradygaster marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| <PackageReference Include="coverlet.collector" Version="6.0.0" /> | ||
| <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" /> | ||
| <PackageReference Include="xunit" Version="2.5.3" /> | ||
| <PackageReference Include="xunit.runner.visualstudio" Version="2.5.3" /> | ||
bradygaster marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| </ItemGroup> | ||
|
|
||
| <ItemGroup> | ||
| <ProjectReference Include="..\AspireWithCosmos.AppHost\AspireWithCosmos.AppHost.csproj" /> | ||
| </ItemGroup> | ||
|
|
||
| <ItemGroup> | ||
| <Using Include="Aspire.Hosting.Testing" /> | ||
| <Using Include="Xunit" /> | ||
| </ItemGroup> | ||
|
|
||
| </Project> | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.