Skip to content

Commit 57e749c

Browse files
committed
More tweaks
1 parent afca5fc commit 57e749c

10 files changed

Lines changed: 28 additions & 40 deletions

File tree

Cqrs.sln

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Azure", "Azure", "{C4EE28F4
2121
EndProject
2222
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C154BF92-2B45-46C4-ADDD-1E6D2AFBAD86}"
2323
ProjectSection(SolutionItems) = preProject
24+
.editorconfig = .editorconfig
2425
Code\Cqrs.Azure.BlobStorage.Test.Integration.app.config = Code\Cqrs.Azure.BlobStorage.Test.Integration.app.config
2526
Code\Cqrs.Azure.ServiceBus.Tests.Integration.App.config = Code\Cqrs.Azure.ServiceBus.Tests.Integration.App.config
2627
Code\Cqrs.Azure.Storage.Test.Integration.app.config = Code\Cqrs.Azure.Storage.Test.Integration.app.config
@@ -512,9 +513,9 @@ Global
512513
{6C8C843C-D380-49B3-A8A4-F0C2DC32EFED} = {42553B5E-EFF5-4323-BF49-C0A56EFD0D4D}
513514
EndGlobalSection
514515
GlobalSection(ExtensibilityGlobals) = postSolution
515-
EnterpriseLibraryConfigurationToolBinariesPath = packages\TransientFaultHandling.Core.5.1.1209.1\lib\NET4;packages\Unity.Interception.2.1.505.2\lib\NET35;packages\Unity.2.1.505.0\lib\NET35;packages\Unity.Interception.2.1.505.0\lib\NET35;packages\EnterpriseLibrary.Common.5.0.505.0\lib\NET35;packages\EnterpriseLibrary.WindowsAzure.TransientFaultHandling.5.1.1212.0\lib\NET4;packages\EnterpriseLibrary.WindowsAzure.TransientFaultHandling.5.1.1212.0\DesignTime;packages\TransientFaultHandling.Core.5.1.1209.0\lib\NET4
516-
EnterpriseLibraryConfigurationToolBinariesPathV6 = packages\EnterpriseLibrary.TransientFaultHandling.6.0.1304.0\lib\portable-net45+win+wp8
517516
SolutionGuid = {657FC3AE-4AFA-447D-B22B-D53587D334D1}
517+
EnterpriseLibraryConfigurationToolBinariesPathV6 = packages\EnterpriseLibrary.TransientFaultHandling.6.0.1304.0\lib\portable-net45+win+wp8
518+
EnterpriseLibraryConfigurationToolBinariesPath = packages\TransientFaultHandling.Core.5.1.1209.1\lib\NET4;packages\Unity.Interception.2.1.505.2\lib\NET35;packages\Unity.2.1.505.0\lib\NET35;packages\Unity.Interception.2.1.505.0\lib\NET35;packages\EnterpriseLibrary.Common.5.0.505.0\lib\NET35;packages\EnterpriseLibrary.WindowsAzure.TransientFaultHandling.5.1.1212.0\lib\NET4;packages\EnterpriseLibrary.WindowsAzure.TransientFaultHandling.5.1.1212.0\DesignTime;packages\TransientFaultHandling.Core.5.1.1209.0\lib\NET4
518519
EndGlobalSection
519520
GlobalSection(MonoDevelopProperties) = preSolution
520521
StartupItem = Sample\CQRSWeb\CQRSWeb.csproj

Framework/Azure/Cqrs.Azure.Storage/Cqrs.Azure.Storage.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
<PropertyGroup>
3030
<OutputType>library</OutputType>
31-
<TargetFrameworks>net472;net48;netstandard2.0</TargetFrameworks>
31+
<TargetFrameworks>net472;net48;netstandard2.0;net6.0</TargetFrameworks>
3232
<DocumentationFile>Cqrs.Azure.Storage.xml</DocumentationFile>
3333
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
3434
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>

Framework/Cqrs.MongoDB/Cqrs.MongoDB.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
<PropertyGroup>
2626
<OutputType>library</OutputType>
27-
<TargetFrameworks>net472;netstandard2.0</TargetFrameworks>
27+
<TargetFrameworks>net472;netstandard2.0;net6.0</TargetFrameworks>
2828
<DocumentationFile>Cqrs.MongoDB.xml</DocumentationFile>
2929
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
3030
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>

Framework/Cqrs/Configuration/ConfigurationExtensions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public static ITelemetryHelper CreateTelemetryHelper(this IConfigurationManager
5252
Action action = () => {
5353
try
5454
{
55-
#if NETSTANDARD2_0
55+
#if NETSTANDARD
5656
helper = (ITelemetryHelper)DotNetStandard2Helper.CreateInstanceFrom(assemblyFile, "Chinchilla.Logging.Azure.ApplicationInsights.TelemetryHelper", false, BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance | BindingFlags.CreateInstance, null, new object[] { correlationIdHelper, DependencyResolver.Current.Resolve<ILoggerSettings>(), DependencyResolver.Current.Resolve<IContextItemCollectionFactory>(), false }, null, null);
5757
#else
5858
helper = (ITelemetryHelper)Activator.CreateInstanceFrom(assemblyFile, "Chinchilla.Logging.Azure.ApplicationInsights.TelemetryHelper", false, BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance | BindingFlags.CreateInstance, null, new object[] { correlationIdHelper, DependencyResolver.Current.Resolve<ILoggerSettings>(), DependencyResolver.Current.Resolve<IContextItemCollectionFactory>(), false }, null, null).Unwrap();
@@ -64,7 +64,7 @@ public static ITelemetryHelper CreateTelemetryHelper(this IConfigurationManager
6464
}
6565
catch
6666
{
67-
#if NETSTANDARD2_0
67+
#if NETSTANDARD
6868
helper = (ITelemetryHelper)DotNetStandard2Helper.CreateInstanceFrom(assemblyFile, "Chinchilla.Logging.Azure.ApplicationInsights.TelemetryHelper", false, BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance | BindingFlags.CreateInstance, null, new object[] { correlationIdHelper, null, DependencyResolver.Current.Resolve<IContextItemCollectionFactory>(), false }, null, null);
6969
#else
7070
helper = (ITelemetryHelper)Activator.CreateInstanceFrom(assemblyFile, "Chinchilla.Logging.Azure.ApplicationInsights.TelemetryHelper", false, BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance | BindingFlags.CreateInstance, null, new object[] { correlationIdHelper, null, DependencyResolver.Current.Resolve<IContextItemCollectionFactory>(), false }, null, null).Unwrap();

Framework/Cqrs/Configuration/ConfigurationManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ namespace Cqrs.Configuration
1616
/// </summary>
1717
public class ConfigurationManager : IConfigurationManager
1818
{
19-
#if NETSTANDARD2_0
19+
#if NETSTANDARD
2020
/// <summary>
2121
/// Gets or sets the <see cref="Microsoft.Extensions.Configuration.IConfiguration"/>. This must be set manually as dependency injection may not be ready in-time.
2222
/// </summary>

Framework/Cqrs/Cqrs.csproj

Lines changed: 10 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>netstandard2.0;net40;net48;net6.0</TargetFrameworks>
3+
<TargetFrameworks>netstandard2.0;netstandard2.1;net40;net48</TargetFrameworks>
44
<title>CQRS.NET</title>
55
<Authors>Chinchilla Software</Authors>
66
<Company>Chinchilla Software</Company>
@@ -126,35 +126,28 @@
126126

127127
<PropertyGroup>
128128
<OutputType>library</OutputType>
129-
<TargetFrameworks>net40;netstandard2.0;net48;net6.0</TargetFrameworks>
129+
<TargetFrameworks>net40;netstandard2.0;netstandard2.1;net48</TargetFrameworks>
130130
<DocumentationFile>Cqrs.xml</DocumentationFile>
131131
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
132132
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
133133
</PropertyGroup>
134134

135-
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
136-
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.1.32" />
137-
<!--
135+
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' or '$(TargetFramework)' == 'netstandard2.1' ">
136+
<PackageReference Include="Azure.Identity" Version="1.13.1" />
137+
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.1.32" />
138+
<!--
138139
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="2.2.6">
139140
<PrivateAssets>all</PrivateAssets>
140141
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
141142
</PackageReference>
142143
-->
143-
</ItemGroup>
144-
145-
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
146-
<PackageReference Include="System.Configuration.ConfigurationManager" Version="8.0.1" />
147-
<PackageReference Include="System.ServiceModel.Primitives" Version="8.1.1" />
148-
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
149-
</ItemGroup>
150-
151-
<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
152144
<PackageReference Include="System.Configuration.ConfigurationManager" Version="8.0.1" />
153145
<PackageReference Include="System.ServiceModel.Primitives" Version="8.1.1" />
146+
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="6.0.0" />
154147
</ItemGroup>
155-
156-
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
157-
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="6.0.0" />
148+
149+
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
150+
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
158151
</ItemGroup>
159152

160153
<ItemGroup Condition=" '$(TargetFramework)' == 'net40' OR '$(TargetFramework)' == 'net48' ">
@@ -187,12 +180,6 @@
187180
<None Remove="tools\Create-Log-Table.sql" />
188181
</ItemGroup>
189182

190-
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
191-
<PackageReference Include="Azure.Identity">
192-
<Version>1.13.1</Version>
193-
</PackageReference>
194-
</ItemGroup>
195-
196183
<ItemGroup Condition="'$(TargetFramework)' == 'net48'">
197184
<PackageReference Include="Azure.Identity">
198185
<Version>1.13.1</Version>

Framework/Cqrs/DataStores/SqlDataStore.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ async Task AddAsync
305305
// This optimises for single connection handling
306306
if (writeableConnection != DbDataContext)
307307
table = writeableConnection.Set<TData>();
308-
#if NETSTANDARD2_0
308+
#if NETSTANDARD
309309
await table.AddAsync
310310
#else
311311
table.Add
@@ -352,7 +352,7 @@ async Task AddAsync
352352
// This optimises for single connection handling
353353
if (writeableConnection != DbDataContext)
354354
table = writeableConnection.Set<TData>();
355-
#if NETSTANDARD2_0
355+
#if NETSTANDARD
356356
await table.AddRangeAsync
357357
#else
358358
table.AddRange

Framework/Cqrs/DataStores/SqlDataStoreExtension.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public static void Truncate<TEntity>(this DbSet<TEntity> table) where TEntity :
3838
string tableName = table.GetTableName(context);
3939
const string sqlCommand = "TRUNCATE TABLE {0}";
4040
#pragma warning disable EF1000 // Review SQL queries for security vulnerabilities
41-
#if NETSTANDARD2_0
41+
#if NETSTANDARD
4242
_ = context.Database.ExecuteSqlRaw(string.Format(sqlCommand, tableName));
4343
#else
4444
_ = context.Database.ExecuteSqlCommand(string.Format(sqlCommand, tableName));

Framework/Cqrs/Events/SqlEventStoreDataContext.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#else
1717
using Microsoft.EntityFrameworkCore;
1818
#endif
19-
#if NETSTANDARD2_0
19+
#if NETSTANDARD
2020
using Microsoft.EntityFrameworkCore.Diagnostics;
2121
#endif
2222
using System.Linq;
@@ -51,7 +51,7 @@ public SqlEventStoreDataContext(string nameOrConnectionString)
5151
#else
5252
private string NameOrConnectionString { get; }
5353

54-
#if NETSTANDARD2_0
54+
#if NETSTANDARD
5555
private static DbCommandInterceptor Interceptor { get; }
5656
#endif
5757

@@ -62,7 +62,7 @@ public SqlEventStoreDataContext(string nameOrConnectionString)
6262
/// <param name="optionsBuilder">A builder used to create or modify options for this context. Databases (and other extensions) typically define extension methods on this object that allow you to configure the context.</param>
6363
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
6464
{
65-
#if NETSTANDARD2_0
65+
#if NETSTANDARD
6666
optionsBuilder.UseSqlServer(NameOrConnectionString)
6767
.AddInterceptors(Interceptor);
6868
#else
@@ -78,7 +78,7 @@ static SqlEventStoreDataContext()
7878
#if NET40_OR_GREATER
7979
DbInterception.Add(new QueueMessageInterceptor());
8080
#endif
81-
#if NETSTANDARD2_0
81+
#if NETSTANDARD
8282
Interceptor = new QueueMessageInterceptor();
8383
#endif
8484
}
@@ -94,7 +94,7 @@ protected SqlEventStoreDataContext(string nameOrConnectionString, string tableNa
9494
TableName = tableName;
9595
}
9696

97-
#if NETSTANDARD2_0
97+
#if NETSTANDARD
9898
/// <summary>
9999
/// Instantiates a new instance of the <see cref="SqlEventStoreDataContext"/> class by referencing a file source.
100100
/// </summary>
@@ -126,7 +126,7 @@ public static SqlEventStoreDataContext New(string tableName, string fileOrServer
126126
}
127127
#endif
128128

129-
#if NETSTANDARD2_0
129+
#if NETSTANDARD
130130
internal class QueueMessageInterceptor : DbCommandInterceptor
131131
{
132132
private const string TableReplaceString = "[EventStore]";

Framework/Cqrs/Infrastructure/DotNetStandard2Helper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#if NETSTANDARD2_0
1+
#if NETSTANDARD
22
using System;
33
using System.Globalization;
44
using System.Reflection;

0 commit comments

Comments
 (0)