Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add net8.0 and efcore 8.0 #475

Closed
wants to merge 56 commits into from
Closed
Show file tree
Hide file tree
Changes from 44 commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
a001f42
Add generic method to Asp.Core
ehsangfl May 6, 2023
b49e06b
Add generic method to Asp.Core
ehsangfl May 6, 2023
9e6a135
Merge branch 'main' of https://github.com/ehsangfl/OpenRiaServices
ehsangfl May 6, 2023
941f2f1
Merge branch 'main' of https://github.com/ehsangfl/OpenRiaServices
ehsangfl May 28, 2023
ee86d6c
Add generic method to Asp.Core
ehsangfl May 6, 2023
75f52d4
Add generic extension methods to AspCore services and pipline (#413)
ehsangfl May 9, 2023
75076fc
Update README.md with .NET Foundation content (#415)
ChrisSfanos May 15, 2023
b75e7de
Fix to prevent #247 from happening again (#412)
Daniel-Svensson May 16, 2023
1987df6
Update nugets for .csproj and .nuspec files
SandstromErik May 16, 2023
d9d11b2
Remove NET40 define from tools project (#417)
Daniel-Svensson May 22, 2023
6d134ee
Update assembly info and prepare building codegen nuget directly from…
Daniel-Svensson May 22, 2023
73cef2c
Fix filepath in CodeGen.nuspec
SandstromErik May 22, 2023
a87d22a
Fix version prefix for AspNetCore and EntityFrameworkCore
SandstromErik May 22, 2023
0e2d13a
update C# languange version to 11 (#419)
Daniel-Svensson May 24, 2023
29175c2
Improvements to AspNetCore endpoint metadata and net7 support (#418)
Daniel-Svensson May 24, 2023
5f4960b
Fixed CodeGen target name in nuspec file (#420)
SandstromErik May 24, 2023
f8fd158
Modify the next size to rent for buffer in ArrayPoolStream (#421)
SandstromErik May 25, 2023
2788466
Update Changelog.md (#422)
SandstromErik May 25, 2023
b6064ab
Fix error in Assembly and Task name. (#423)
lindellhugo May 26, 2023
d96a33c
Merge branch 'main' of https://github.com/ehsangfl/OpenRiaServices
ehsangfl May 28, 2023
6bdaacb
Add generic method to Asp.Core
ehsangfl May 6, 2023
3c2b93a
Add generic extension methods to AspCore services and pipline (#413)
ehsangfl May 9, 2023
57b996a
Update README.md with .NET Foundation content (#415)
ChrisSfanos May 15, 2023
c6b5597
Fix to prevent #247 from happening again (#412)
Daniel-Svensson May 16, 2023
233eff9
Update nugets for .csproj and .nuspec files
SandstromErik May 16, 2023
d47bb07
Remove NET40 define from tools project (#417)
Daniel-Svensson May 22, 2023
cb466fc
Update assembly info and prepare building codegen nuget directly from…
Daniel-Svensson May 22, 2023
c5f89fd
Fix filepath in CodeGen.nuspec
SandstromErik May 22, 2023
917941f
Fix version prefix for AspNetCore and EntityFrameworkCore
SandstromErik May 22, 2023
5430ca1
update C# languange version to 11 (#419)
Daniel-Svensson May 24, 2023
8793dfb
Improvements to AspNetCore endpoint metadata and net7 support (#418)
Daniel-Svensson May 24, 2023
af4dddf
Fixed CodeGen target name in nuspec file (#420)
SandstromErik May 24, 2023
fb17d5a
Modify the next size to rent for buffer in ArrayPoolStream (#421)
SandstromErik May 25, 2023
1b0a5fe
Update Changelog.md (#422)
SandstromErik May 25, 2023
b4760b1
Fix error in Assembly and Task name. (#423)
lindellhugo May 26, 2023
5b1058a
Merge branch 'OpenRIAServices:main' into main
ehsangfl Nov 27, 2023
d0e9791
Update nugets for .csproj and .nuspec files
SandstromErik May 16, 2023
1293448
Fix filepath in CodeGen.nuspec
SandstromErik May 22, 2023
a0d91c9
merge with remote
ehsangfl Nov 27, 2023
b9d3561
Merge branch 'OpenRIAServices:main' into main
ehsangfl Jan 6, 2024
13c8e2e
add net8.0 and efcore8
ehsangfl Jan 7, 2024
3f4539d
Improve debugging symbols
ehsangfl Jan 7, 2024
9374d70
Improve compiler symbols
ehsangfl Jan 7, 2024
de2c1f0
Merge branch 'main' of https://github.com/ehsangfl/OpenRiaServices
ehsangfl Jan 7, 2024
08858c1
Update Changelog.md (#476)
SandstromErik Jan 10, 2024
df236ed
Add net8 build of OpenRiaServices.Hosting.AspNetCore so that users do…
Daniel-Svensson Jan 19, 2024
a94c683
stop generating odata nuget (#478)
Daniel-Svensson Jan 19, 2024
2c9f4c2
Use portable pdb for .NET Framework (#484)
Daniel-Svensson Jan 22, 2024
0f00bbd
Update Mstest to 3.2.0 (#486)
Daniel-Svensson Jan 29, 2024
069a03f
Improve Add/Attach performance for large graphs (#487)
Daniel-Svensson Feb 7, 2024
46b789d
Various performance improvements (#488)
Daniel-Svensson Feb 8, 2024
d9710a1
Spanify DynamicQueryable (#485)
Daniel-Svensson Feb 8, 2024
e89b39f
Skip OfType in EntityRef.GetSingleMatch if possible (#491)
Daniel-Svensson Feb 14, 2024
a2cb57e
Update OpenRiaServices.Hosting.AspNetCore to 1.1.0
Daniel-Svensson Mar 14, 2024
cdf36ac
Make sure code generation using text template does not use compiler a…
SandstromErik Apr 12, 2024
62b7de9
merge with origin
ehsangfl Apr 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/OpenRiaServices.Client/Framework/TypeUtility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ internal static class TypeUtility
"b03f5f7f11d50a3a", // Microsoft.VisualBasic, Microsoft.CSharp, System.Configuration
"7cec85d7bea7798e", // Silverlight system assemblies
OpenRiaServicesPublicKeyToken, // OpenRiaServices.
#if NETCOREAPP
"adb9793829ddae60"
#endif
};

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<NoWarn>618</NoWarn>
<RootNamespace>CodeFirstModels</RootNamespace>
<AssemblyName>CodeFirstModels</AssemblyName>
<TargetFrameworks>net472;net6.0</TargetFrameworks>
<TargetFrameworks>net472;net6.0;net8.0</TargetFrameworks>
<DefineConstants>$(DefineConstants);DBCONTEXT</DefineConstants>
<Version>1.0.0.0</Version>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<NoWarn>618</NoWarn>
<RootNamespace>DbContextModels</RootNamespace>
<AssemblyName>DbContextModels</AssemblyName>
<TargetFrameworks>net472;net6.0</TargetFrameworks>
<TargetFrameworks>net472;net6.0;net8.0</TargetFrameworks>
<Version>1.0.0.0</Version>
</PropertyGroup>
<Target Name="WriteProjectPath" BeforeTargets="GetCopyToOutputDirectoryItems">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,6 @@ public IEndpointConventionBuilder AddDomainService<T>() where T : DomainService
{
return AddDomainService(typeof(T));
}

}
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net8.0</TargetFrameworks>
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
<RootNamespace>OpenRiaServices.Hosting.AspNetCore</RootNamespace>
<Version>1.0.0.0</Version>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="EntityFramework" Version="6.4.4" />
<ItemGroup Condition="'$(TargetFramework)'=='net6.0'">
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.25" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)'=='net8.0'">
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.1.1" />
<PackageReference Include="MSTest.TestFramework" Version="3.1.1" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0;netstandard2.0</TargetFrameworks>
<TargetFrameworks>net6.0;netstandard2.0;net8.0</TargetFrameworks>
<DefineConstants>$(DefineConstants);SERVERFX;EFCORE</DefineConstants>
<GeneratePackageOnBuild Condition="'$(Configuration)'=='Release'">true</GeneratePackageOnBuild>
<VersionPrefix>2.0.2</VersionPrefix>
Expand All @@ -13,8 +13,11 @@
<PackageReference Include="Microsoft.EntityFrameworkCore" Condition="'$(TargetFramework)'=='netstandard2.0'" Version="3.1.24" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Condition="'$(TargetFramework)'=='netstandard2.0'" Version="3.1.24" />

<PackageReference Include="Microsoft.EntityFrameworkCore" Condition="'$(TargetFramework)'!='netstandard2.0'" Version="6.0.*" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Condition="'$(TargetFramework)'!='netstandard2.0'" Version="6.0.*" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Condition="'$(TargetFramework)'=='net6.0'" Version="6.0.*" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Condition="'$(TargetFramework)'=='net6.0'" Version="6.0.*" />

<PackageReference Include="Microsoft.EntityFrameworkCore" Condition="'$(TargetFramework)'=='net8.0'" Version="8.0.*" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Condition="'$(TargetFramework)'=='net8.0'" Version="8.0.*" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\OpenRiaServices.Server\Framework\OpenRiaServices.Server.csproj" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,25 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<NoWarn>618</NoWarn>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFrameworks>netstandard2.0;net6.0;net8.0</TargetFrameworks>
<Version>1.0.0.0</Version>
</PropertyGroup>
<ItemGroup>
<ItemGroup Condition="'$(TargetFramework)'=='netstandard2.0'">
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.1.32" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.1.32" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="3.1.32" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)'=='net6.0'">
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.25" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.25" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.25" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)'=='net8.0'">
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.0" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
</ItemGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,13 @@
<DefineConstants>$(DefineConstants);SERVERFX</DefineConstants>
<TargetFrameworks>net472;net6.0;net8.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<ItemGroup Condition="'$(TargetFramework)'!='net8.0'">
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)'=='net8.0'">
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.1.1" />
<PackageReference Include="MSTest.TestFramework" Version="3.1.1" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,31 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<ItemGroup Condition="'$(TargetFramework)'=='net472'">
<PackageReference Include="EntityFramework" Version="6.4.4" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.8.0" />
<PackageReference Include="Microsoft.CodeAnalysis.VisualBasic" Version="4.8.0" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)'=='net6.0'">
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.25" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.8.0" />
<PackageReference Include="Microsoft.CodeAnalysis.VisualBasic" Version="4.8.0" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)'=='net8.0'">
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.5.0" />
<PackageReference Include="Microsoft.CodeAnalysis.VisualBasic" Version="4.5.0" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Build.Locator" Version="1.6.10" />
<PackageReference Include="Microsoft.Build" Version="17.0.0" PrivateAssets="All" ExcludeAssets="Runtime" />
<PackageReference Include="Microsoft.Build.Framework" Version="17.0.0" PrivateAssets="All" ExcludeAssets="Runtime" />
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="17.0.0" PrivateAssets="All" ExcludeAssets="Runtime" />
<PackageReference Include="Microsoft.Build.Tasks.Core" Version="17.0.0" PrivateAssets="All" ExcludeAssets="Runtime" />
<PackageReference Include="System.Reflection.MetadataLoadContext" Version="8.0.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.8.0" />
<PackageReference Include="Microsoft.CodeAnalysis.VisualBasic" Version="4.8.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.1.1" />
<PackageReference Include="MSTest.TestFramework" Version="3.1.1" />
Expand Down
9 changes: 8 additions & 1 deletion src/OpenRiaServices.Tools/Framework/DbContextUtilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ internal static class DbContextUtilities
{
private const string DatabaseTypeName = @"System.Data.Entity.Database";
private const string IDatabaseInitializerTypeName = "System.Data.Entity.IDatabaseInitializer`1";
#if NETCOREAPP
internal const string DbContextTypeName = @"Microsoft.EntityFrameworkCore.DbContext";
#else
internal const string DbContextTypeName = @"System.Data.Entity.DbContext";
#endif

private static Type _dbContextTypeReference;

Expand Down Expand Up @@ -183,9 +187,12 @@ public static bool IsDbContext(this Type type)
}
}
}
#else
#if NETCOREAPP
private const string DbDomainServiceTypeName = @"OpenRiaServices.Server.EntityFrameworkCore.DbDomainService`1";
#else
private const string DbDomainServiceTypeName = @"OpenRiaServices.EntityFramework.DbDomainService`1";

#endif
/// <summary>
/// Returns the DbContext type given the <see cref="DomainService"/> type. Uses late binding so as to avoid adding a reference to EF 4.1.
/// </summary>
Expand Down
14 changes: 14 additions & 0 deletions src/OpenRiaServices.Tools/Test/DbContextUtilitiesTest.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
using System;
#if NETCOREAPP
using Microsoft.EntityFrameworkCore;
#else
using System.Data.Entity;
#endif
using System.Reflection;
using CodeFirstModels;
using Microsoft.VisualStudio.TestTools.UnitTesting;
Expand All @@ -13,11 +17,21 @@ public class DbContextUtilitiesTest
[Description("Test various utility methods in DbContextUtilities")]
public void TestDbContextUtilitiesMethods()
{
#if NETCOREAPP
Type dbContextTypeRef = DbContextUtilities.GetDbContextTypeReference(typeof(EFCoreModels.Northwind.EFCoreDbCtxNorthwindEntities));
#else
Type dbContextTypeRef = DbContextUtilities.GetDbContextTypeReference(typeof(EFCFNorthwindEntities));
#endif
Assert.AreEqual(typeof(DbContext), dbContextTypeRef);

#if NETCOREAPP
Type dbContextType = DbContextUtilities.GetDbContextType(typeof(TestDomainServices.EFCore.Northwind));
Assert.AreEqual(typeof(EFCoreModels.Northwind.EFCoreDbCtxNorthwindEntities), dbContextType);
#else
Type dbContextType = DbContextUtilities.GetDbContextType(typeof(TestDomainServices.EFCF.Northwind));
Assert.AreEqual(typeof(EFCFNorthwindEntities), dbContextType);
#endif


Type dbSetType = DbContextUtilities.LoadTypeFromAssembly(typeof(DbContext).Assembly, typeof(DbSet<>).FullName);
Assert.IsNotNull(dbSetType);
Expand Down
19 changes: 18 additions & 1 deletion src/OpenRiaServices.Tools/Test/OpenRiaServices.Tools.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,24 @@
</Content>
</ItemGroup>

<ItemGroup>
<ItemGroup Condition="'$(TargetFramework)'=='net8.0'">
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.5.0" />
<PackageReference Include="Microsoft.CodeAnalysis.Common" Version="4.5.0" />
<PackageReference Include="Microsoft.CodeAnalysis.VisualBasic" Version="4.5.0" />
<PackageReference Include="Microsoft.Build.Locator" Version="1.6.10" />
<PackageReference Include="Microsoft.Build" Version="17.0.0" PrivateAssets="All" ExcludeAssets="Runtime" />
<PackageReference Include="Microsoft.Build.Framework" Version="17.0.0" PrivateAssets="All" ExcludeAssets="Runtime" />
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="17.0.0" PrivateAssets="All" ExcludeAssets="Runtime" />
<PackageReference Include="Microsoft.Build.Tasks.Core" Version="17.0.0" PrivateAssets="All" ExcludeAssets="Runtime" />
<PackageReference Include="Mono.Cecil" Version="0.11.5" />
<PackageReference Include="System.Reflection.MetadataLoadContext" Version="8.0.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.1.1" />
<PackageReference Include="MSTest.TestFramework" Version="3.1.1" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)'!='net8.0'">
<PackageReference Include="EntityFramework" Version="6.4.4" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.8.0" />
Expand Down
6 changes: 5 additions & 1 deletion src/OpenRiaServices.Tools/Test/TestHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,11 @@ public static string GetOutputPath(string projectOutputDir, string baseName)
public static void GetProjectPaths(string relativeTestDir, out string projectPath, out string outputPath)
{
// Read file from output folder
string inputString = File.ReadAllText("ProjectPath.txt");
string inputString;
if (!string.IsNullOrEmpty(relativeTestDir))
inputString = File.ReadAllText($"{relativeTestDir}\\ProjectPath.txt");
else
inputString = File.ReadAllText("ProjectPath.txt");


string[] split = inputString.Split(',');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.Data.SqlClient;
using System.IO;
#if !NET6_0
#if !NET6_0_OR_GREATER
using System.Web.Hosting;
#endif

Expand Down Expand Up @@ -33,7 +33,7 @@ private static string GetDBFileCore(string fileName)
return Path.Combine(Directory.GetCurrentDirectory(), fileName);

// If path is not relative to working directory then check if it is a virtual path
#if NET6_0
#if NET6_0_OR_GREATER
// Relative directoy when running in website project folder
string mappedPath = fileName.Replace("~/", "../WebsiteFullTrust/");
if (File.Exists(mappedPath))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public ObjectContextInstantiationScenarios()
}
}

#if !NET6_0
#if !NET6_0_OR_GREATER
/// <summary>
/// This class is used to test instantiation errors at code gen
/// </summary>
Expand All @@ -44,7 +44,7 @@ public ObjectContextInheritanceScenarios()
}
}

#if !NET6_0
#if !NET6_0_OR_GREATER
/// <summary>
/// This class is used to make sure one can inherit from DataContext and BO wizard still works.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
using System.Threading;
using DataModels.ScenarioModels;

#if !NET6_0
#if !NET6_0_OR_GREATER
using DataTests.AdventureWorks.LTS;
using OpenRiaServices.LinqToSql;
using System.Web;
Expand Down Expand Up @@ -200,7 +200,7 @@ public class NonDomainService
}
}

#if !NET6_0
#if !NET6_0_OR_GREATER
/// <summary>
/// This domain service attempts to declare L2S description provider with EF context
/// </summary>
Expand Down Expand Up @@ -268,7 +268,7 @@ public IQueryable<A> GetProducts()
}
}

#if !NET6_0
#if !NET6_0_OR_GREATER
/// <summary>
/// This mock LINQ to SQL DomainService throws an exception in its constructor
/// </summary>
Expand Down Expand Up @@ -1096,7 +1096,7 @@ public IEnumerable<A> GetAsReturnNull()
public IQueryable<TestSideEffects> CreateAndGetSideEffectsObjects(string name, [InjectParameter] HttpContext httpContext)
{
HttpRequest request = httpContext.Request;
#if NET6_0
#if NET6_0_OR_GREATER
string verb = request.Method;
var url = new Uri ("http://" + request.Host.ToString() + request.Path.ToString() + request.QueryString.ToString());
#else
Expand Down Expand Up @@ -2114,7 +2114,7 @@ public TestEnum ReturnsEnum_Online(TestEnum value)
[Invoke(HasSideEffects = true)]
public string ReturnHttpMethodWithSideEffects_Online([InjectParameter] HttpContext httpContext)
{
#if NET6_0
#if NET6_0_OR_GREATER
return httpContext.Request.Method;
#else
return httpContext.Request.HttpMethod;
Expand All @@ -2124,7 +2124,7 @@ public string ReturnHttpMethodWithSideEffects_Online([InjectParameter] HttpConte
[Invoke(HasSideEffects = false)]
public string ReturnHttpMethodWithoutSideEffects_Online([InjectParameter] HttpContext httpContext)
{
#if NET6_0
#if NET6_0_OR_GREATER
return httpContext.Request.Method;
#else
return httpContext.Request.HttpMethod;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<TargetFrameworks>net472;net6.0</TargetFrameworks>
<TargetFrameworks>net472;net6.0;net8.0</TargetFrameworks>
<DebugType>pdbonly</DebugType>

<NoWarn Condition="'$(TargetFramework)'!='net472'">$(NoWarn);CS0618</NoWarn>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<TargetFrameworks>net472;net6.0</TargetFrameworks>
<TargetFrameworks>net472;net6.0;net8.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
Loading