diff --git a/src/Session/Directory.Build.targets b/src/Session/Directory.Build.targets index 78626b773e..7e3f8df92e 100644 --- a/src/Session/Directory.Build.targets +++ b/src/Session/Directory.Build.targets @@ -1,10 +1,6 @@ - $(MicrosoftNETCoreApp20PackageVersion) - $(MicrosoftNETCoreApp21PackageVersion) - $(MicrosoftNETCoreApp22PackageVersion) + $(MicrosoftNETCoreAppPackageVersion) $(NETStandardLibrary20PackageVersion) - - 99.9 diff --git a/src/Session/build/dependencies.props b/src/Session/build/dependencies.props index 78eb063ed4..777db42244 100644 --- a/src/Session/build/dependencies.props +++ b/src/Session/build/dependencies.props @@ -3,28 +3,27 @@ $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - 2.2.0-preview2-20181004.6 - 2.2.0-preview3-35425 - 2.2.0-preview3-35425 - 2.2.0-preview3-35425 - 2.2.0-preview3-35425 - 2.2.0-preview3-35425 - 2.2.0-preview3-35425 - 2.2.0-preview3-35425 - 2.2.0-preview3-35425 - 2.2.0-preview3-35425 - 2.2.0-preview3-35425 - 2.2.0-preview3-35425 - 2.2.0-preview3-35425 - 2.2.0-preview3-35425 - 2.0.9 - 2.1.3 - 2.2.0-preview3-27001-02 + 3.0.0-build-20181116.1 + 3.0.0-alpha1-10742 + 3.0.0-alpha1-10742 + 3.0.0-alpha1-10742 + 3.0.0-alpha1-10742 + 3.0.0-alpha1-10742 + 3.0.0-preview-181113-11 + 3.0.0-preview-181113-11 + 3.0.0-preview-181113-11 + 3.0.0-preview-181113-11 + 3.0.0-preview-181113-11 + 3.0.0-preview-181113-11 + 3.0.0-preview-181113-11 + 3.0.0-preview-181113-11 + 3.0.0-preview-181113-11 + 3.0.0-preview1-26907-05 15.6.1 2.0.3 2.3.1 2.4.0 - + diff --git a/src/Session/build/repo.props b/src/Session/build/repo.props index f1fe24dd27..4402da1d0d 100644 --- a/src/Session/build/repo.props +++ b/src/Session/build/repo.props @@ -4,13 +4,10 @@ Internal.AspNetCore.Universe.Lineup - 2.2.0-* https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json - - - + diff --git a/src/Session/samples/SessionSample/SessionSample.csproj b/src/Session/samples/SessionSample/SessionSample.csproj index 103dffc357..d28b96492e 100644 --- a/src/Session/samples/SessionSample/SessionSample.csproj +++ b/src/Session/samples/SessionSample/SessionSample.csproj @@ -1,7 +1,7 @@ - netcoreapp2.2;net461 + netcoreapp3.0 @@ -12,8 +12,9 @@ - + + diff --git a/src/Session/samples/SessionSample/Startup.cs b/src/Session/samples/SessionSample/Startup.cs index 41fcb566c5..38d8199d93 100644 --- a/src/Session/samples/SessionSample/Startup.cs +++ b/src/Session/samples/SessionSample/Startup.cs @@ -5,6 +5,7 @@ using System; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Http; +using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; @@ -12,23 +13,39 @@ namespace SessionSample { public class Startup { + public Startup(IHostingEnvironment env) + { + var builder = new ConfigurationBuilder() + .SetBasePath(env.ContentRootPath) + .AddJsonFile("appsettings.json"); + + if (env.IsDevelopment()) + { + builder.AddUserSecrets(); + } + + Configuration = builder.Build(); + } + + public IConfigurationRoot Configuration { get; set; } + public void ConfigureServices(IServiceCollection services) { - // Adds a default in-memory implementation of IDistributedCache + // Uncomment the following line to use the in-memory implementation of IDistributedCache services.AddDistributedMemoryCache(); // Uncomment the following line to use the Microsoft SQL Server implementation of IDistributedCache. // Note that this would require setting up the session state database. - //services.AddSqlServerCache(o => + //services.AddDistributedSqlServerCache(o => //{ - // o.ConnectionString = "Server=.;Database=ASPNET5SessionState;Trusted_Connection=True;"; + // o.ConnectionString = Configuration["AppSettings:ConnectionString"]; // o.SchemaName = "dbo"; // o.TableName = "Sessions"; //}); // Uncomment the following line to use the Redis implementation of IDistributedCache. // This will override any previously registered IDistributedCache service. - //services.AddDistributedRedisCache(o => + //services.AddStackExchangeRedisCache(o => //{ // o.Configuration = "localhost"; // o.InstanceName = "SampleInstance"; diff --git a/src/Session/samples/SessionSample/appsettings.json b/src/Session/samples/SessionSample/appsettings.json new file mode 100644 index 0000000000..aecaf5a74b --- /dev/null +++ b/src/Session/samples/SessionSample/appsettings.json @@ -0,0 +1,5 @@ +{ + "AppSettings": { + "ConnectionString": "Server=.;Database=SessionStateCache;Trusted_Connection=True;" + } +} diff --git a/src/Session/src/Microsoft.AspNetCore.Session/Microsoft.AspNetCore.Session.csproj b/src/Session/src/Microsoft.AspNetCore.Session/Microsoft.AspNetCore.Session.csproj index 3da00b9032..38f676a8d8 100644 --- a/src/Session/src/Microsoft.AspNetCore.Session/Microsoft.AspNetCore.Session.csproj +++ b/src/Session/src/Microsoft.AspNetCore.Session/Microsoft.AspNetCore.Session.csproj @@ -2,7 +2,7 @@ ASP.NET Core session state middleware. - netstandard2.0 + netcoreapp3.0 $(NoWarn);CS1591 true true diff --git a/src/Session/test/Directory.Build.props b/src/Session/test/Directory.Build.props index 3a373e2cb8..4b89a431e7 100644 --- a/src/Session/test/Directory.Build.props +++ b/src/Session/test/Directory.Build.props @@ -1,13 +1,6 @@ - - netcoreapp2.2 - $(DeveloperBuildTestTfms) - - $(StandardTestTfms);net461 - - diff --git a/src/Session/test/Microsoft.AspNetCore.Session.Tests/Microsoft.AspNetCore.Session.Tests.csproj b/src/Session/test/Microsoft.AspNetCore.Session.Tests/Microsoft.AspNetCore.Session.Tests.csproj index 9dc11b9d2f..2b2ee05119 100644 --- a/src/Session/test/Microsoft.AspNetCore.Session.Tests/Microsoft.AspNetCore.Session.Tests.csproj +++ b/src/Session/test/Microsoft.AspNetCore.Session.Tests/Microsoft.AspNetCore.Session.Tests.csproj @@ -1,9 +1,7 @@  - $(StandardTestTfms) - true - true + netcoreapp3.0 diff --git a/src/Session/version.props b/src/Session/version.props index 4889a26987..d977b437b6 100644 --- a/src/Session/version.props +++ b/src/Session/version.props @@ -1,12 +1,6 @@ - + - 2.2.0 - rtm - $(VersionPrefix) - $(VersionPrefix)-$(VersionSuffix)-final - t000 - a- - $(FeatureBranchVersionPrefix)$(VersionSuffix)-$([System.Text.RegularExpressions.Regex]::Replace('$(FeatureBranchVersionSuffix)', '[^\w-]', '-')) - $(VersionSuffix)-$(BuildNumber) + 3.0.0 + dev