Skip to content

Commit

Permalink
fix(circulardependencies,packagereference): added frameworkreference …
Browse files Browse the repository at this point in the history
…instead of packagereference for aspnetcore.app to avoid warning and fixed automapper circular dependencies related to the use of entity instead of dto
  • Loading branch information
mezdelex committed Nov 13, 2024
1 parent ae76527 commit a4463b9
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 16 deletions.
2 changes: 2 additions & 0 deletions src/Application/Application.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
Expand All @@ -17,4 +18,5 @@
<ItemGroup>
<ProjectReference Include="..\Domain\Domain.csproj" />
</ItemGroup>

</Project>
1 change: 1 addition & 0 deletions src/Application/Extensions/ApplicationExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ public static void AddApplicationDependencies(this IServiceCollection services)

services.AddMediatR(configuration => configuration.RegisterServicesFromAssembly(assembly));
services.AddValidatorsFromAssembly(assembly);
services.AddAutoMapper(assembly);
}
}
2 changes: 1 addition & 1 deletion src/Application/Features/Shared/CategoryDTO.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
namespace Application.Features.Shared;

public record CategoryDTO(Guid Id, string Name, string Description, List<Expense> Expenses);
public record CategoryDTO(Guid Id, string Name, string Description, List<ExpenseDTO> Expenses);
18 changes: 9 additions & 9 deletions src/Infrastructure/Infrastructure.csproj
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">

<ItemGroup>
<ProjectReference Include="..\Domain\Domain.csproj" />
<ProjectReference Include="..\Application\Application.csproj" />
</ItemGroup>
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="ardalis.specification" Version="8.0.0" />
Expand All @@ -20,10 +21,9 @@
<PackageReference Include="stackexchange.redis" Version="2.8.0" />
</ItemGroup>

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Domain\Domain.csproj" />
<ProjectReference Include="..\Application\Application.csproj" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion src/Presentation/Presentation.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
</PropertyGroup>

<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="mediatr" Version="12.4.0" />
<PackageReference Include="microsoft.aspnetcore.app" Version="2.2.8" />
<PackageReference Include="microsoft.extensions.dependencyinjection.abstractions" Version="8.0.1" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion src/WebApi/WebApi.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

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

<ItemGroup>
Expand Down
7 changes: 3 additions & 4 deletions tests/UnitTests/UnitTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
</PropertyGroup>
Expand All @@ -22,12 +21,12 @@
</ItemGroup>

<ItemGroup>
<Using Include="Xunit" />
<ProjectReference Include="..\..\src\Domain\Domain.csproj" />
<ProjectReference Include="..\..\src\Application\Application.csproj" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\Domain\Domain.csproj" />
<ProjectReference Include="..\..\src\Application\Application.csproj" />
<Using Include="Xunit" />
</ItemGroup>

</Project>

0 comments on commit a4463b9

Please sign in to comment.