simplcommerce / SimplCommerce

A simple, cross platform, modulith ecommerce system built on .NET
http://www.simplcommerce.com
Apache License 2.0
4.21k stars 1.59k forks source link

Using Modular Infrastructure for own App #957

Open davidbuckleyni opened 3 years ago

davidbuckleyni commented 3 years ago

I am using your brilliant modular abilties in my own app and I am nearly their just trying to test a very simple module but i am having issue with the new .net 5 version. I am getting this error when I try to add Microsoft.AspNetCore.App to add to my modual

[PM> Install-Package Microsoft.AspNetCore.App -Version 2.2.8
Restoring packages for D:\GitMaster\WareHouseCrm\WarehouseCrm.Module.PaymentPaypalExpress\WarehouseCrm.Module.PaymentPaypalExpress.csproj...
Install-Package : NU1107: Version conflict detected for Microsoft.AspNetCore.Cryptography.Internal. Install/reference Microsoft.AspNetCore.Cryptography.Internal 5.0.0 directly 
to project WarehouseCrm.Module.PaymentPaypalExpress to resolve this issue. 
 WarehouseCrm.Module.PaymentPaypalExpress -> Warehouse.Infrastructure -> Warehouse.Domain -> Microsoft.AspNetCore.Identity.EntityFrameworkCore 5.0.0 -> 
Microsoft.Extensions.Identity.Stores 5.0.0 -> Microsoft.Extensions.Identity.Core 5.0.0 -> Microsoft.AspNetCore.Cryptography.KeyDerivation 5.0.0 -> 
Microsoft.AspNetCore.Cryptography.Internal (>= 5.0.0) 
 WarehouseCrm.Module.PaymentPaypalExpress -> Microsoft.AspNetCore.App 2.2.8 -> Microsoft.AspNetCore.Cryptography.Internal (>= 2.2.0 && < 2.3.0).
At line:1 char:1
+ Install-Package Microsoft.AspNetCore.App -Version 2.2.8
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Install-Package], Exception
    + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand

Install-Package : Package restore failed. Rolling back package changes for 'WarehouseCrm.Module.PaymentPaypalExpress'.
At line:1 char:1
+ Install-Package Microsoft.AspNetCore.App -Version 2.2.8
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Install-Package], Exception
    + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
 ](url)

You will see here that its is showing net core but not aspnet one

image

The cs project file


<Project Sdk="Microsoft.NET.Sdk.Razor">
    <PropertyGroup>
        <TargetFramework>net5.0</TargetFramework>
    </PropertyGroup>

    <PropertyGroup>
    <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
  </PropertyGroup>

  <ItemGroup>
    <Content Remove="bundleconfig.json" />
  </ItemGroup>

  <ItemGroup>
    <EmbeddedResource Include="bundleconfig.json" />
  </ItemGroup>

  <ItemGroup>
    <Folder Include="Areas\PaymentPaypalExpress\Components\" />
    <Folder Include="Areas\PaymentPaypalExpress\Views\Shared\Components\" />
    <Folder Include="Data\" />
    <Folder Include="wwwroot\" />
  </ItemGroup>

  <ItemGroup>
    <ProjectReference Include="..\Warehouse.Infrastructure\Warehouse.Infrastructure\Warehouse.Infrastructure\Warehouse.Infrastructure.csproj" />
  </ItemGroup>

</Project>
tavershimafx commented 3 years ago

You should not try to install Microsoft.AspNetCore.App as it is a default package for every Asp.NetCore application. This is the Asp.NetCore framework itself