Skip to content

Commit

Permalink
fix: revert some platform targets to netstandard (#469)
Browse files Browse the repository at this point in the history
changed aspnetcore3.1 targets to netstandard2.1 (except aspnetcore project)
  • Loading branch information
AndrewTriesToCode authored Sep 29, 2021
1 parent 960458a commit aceff1d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ private static void UpdateIdentityUserIndex(this EntityTypeBuilder builder)
builder.RemoveIndex("NormalizedUserName");
#if NET // Covers .NET 5.0 and later.
builder.HasIndex("NormalizedUserName", "TenantId").HasDatabaseName("UserNameIndex").IsUnique();
#elif NETCOREAPP3_1 // .NET Core 3.1
#elif NETSTANDARD2_1 // .NET Core 3.1
builder.HasIndex("NormalizedUserName", "TenantId").HasName("UserNameIndex").IsUnique();
#endif
}
Expand All @@ -156,7 +156,7 @@ private static void UpdateIdentityRoleIndex(this EntityTypeBuilder builder)
builder.RemoveIndex("NormalizedName");
#if NET // Covers .NET 5.0 and later.
builder.HasIndex("NormalizedName", "TenantId").HasDatabaseName("RoleNameIndex").IsUnique();
#elif NETCOREAPP3_1 // .NET Core 3.1
#elif NETSTANDARD2_1 // .NET Core 3.1
builder.HasIndex("NormalizedName", "TenantId").HasName("RoleNameIndex").IsUnique();
#endif
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net5.0;netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>net5.0;netstandard2.1</TargetFrameworks>
<Title>Finbuckle.MultiTenant.EntityFrameworkCore</Title>
<Description>Entity Framework Core support for Finbuckle.MultiTenant.</Description>
</PropertyGroup>
Expand All @@ -19,11 +19,12 @@
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="5.0.*" />
</ItemGroup>
</When>
<When Condition=" '$(TargetFramework)' == 'netcoreapp3.1' ">
<When Condition=" '$(TargetFramework)' == 'netstandard2.1' ">
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="3.1.*" />
<PackageReference Include="Microsoft.Extensions.Identity.Stores" Version="3.1.*" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="3.1.*" />
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
</ItemGroup>
</When>
</Choose>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public MultiTenantEntityTypeBuilder AdjustIndex(IMutableIndex index)
else
indexBuilder = Builder.HasIndex(index.Properties.Select(p => p.Name).Append("TenantId").ToArray())
.HasDatabaseName(index.GetDatabaseName());
#elif NETCOREAPP3_1
#elif NETSTANDARD2_1
Builder.Metadata.RemoveIndex(index.Properties);
indexBuilder = Builder.HasIndex(index.Properties.Select(p => p.Name).Append("TenantId").ToArray())
.HasName(index.GetName());
Expand Down
4 changes: 2 additions & 2 deletions src/Finbuckle.MultiTenant/Finbuckle.MultiTenant.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net5.0;netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>net5.0;netstandard2.1</TargetFrameworks>
<Title>Finbuckle.MultiTenant</Title>
<Description>Main library package for Finbuckle.MultiTenant.</Description>
</PropertyGroup>
Expand All @@ -23,7 +23,7 @@
<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="5.0.*" />
</ItemGroup>
</When>
<When Condition=" '$(TargetFramework)' == 'netcoreapp3.1' ">
<When Condition=" '$(TargetFramework)' == 'netstandard2.1' ">
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging" Version="3.1.*" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="3.1.*" />
Expand Down

0 comments on commit aceff1d

Please sign in to comment.