Skip to content

Commit

Permalink
feat: upgraded to .net v8
Browse files Browse the repository at this point in the history
  • Loading branch information
sekmenhuseyin committed Jun 7, 2024
1 parent 86ab4c6 commit c7084b5
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 20 deletions.
9 changes: 7 additions & 2 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<!-- Project Setup -->

<PropertyGroup>
<TargetFrameworks>net7.0;net6.0;net5.0</TargetFrameworks>
<TargetFrameworks>net8.0;net7.0;net6.0</TargetFrameworks>
<LangVersion>latest</LangVersion>
<NoWarn>1591;1701;1702;8032;NU1701;AD0001;CA1041;CS0311;CS5001</NoWarn>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
Expand All @@ -31,6 +31,11 @@
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)' == 'net8.0'">
<Nullable>enable</Nullable>
<ImplicitUsings>disable</ImplicitUsings>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)' == 'net7.0'">
<Nullable>enable</Nullable>
<ImplicitUsings>disable</ImplicitUsings>
Expand All @@ -54,7 +59,7 @@
</PropertyGroup>

<!-- Source Link -->
<ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' != 'net8.0'">
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All"/>
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<ContentTargetFolders>.</ContentTargetFolders>
<PackageId>Cogworks.AzureSearch.IoC.Umbraco</PackageId>
<Title>Cogworks.AzureSearch.IoC.Umbraco</Title>
<Description>An Umbraco extension to Cogworks.AzureSearch.</Description>
<Product>An Umbraco 9, 10, 11 extension to Cogworks.AzureSearch</Product>
<Description>An Umbraco 10+ extension to Cogworks.AzureSearch.</Description>
<Product>An Umbraco 10+ extension to Cogworks.AzureSearch</Product>
<PackageTags>Azure Search Umbraco container IoC</PackageTags>
<Version></Version>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
Expand All @@ -15,18 +15,18 @@
<None Include="..\..\README.md" Pack="true" PackagePath="\" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<PackageReference Include="Umbraco.Cms.Core" Version="[12.0.0,)" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net7.0'">
<PackageReference Include="Umbraco.Cms.Core" Version="[11.0.0,)" />
<PackageReference Include="Umbraco.Cms.Core" Version="[11.0.0,12.0.0)" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
<PackageReference Include="Umbraco.Cms.Core" Version="[10.0.0, 11.0.0)" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net5.0'">
<PackageReference Include="Umbraco.Cms.Core" Version="[9.0.0, 10.0.0)" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Azure.Search.Documents" Version="11.2.0" />
<PackageReference Include="Cogworks.AzureSearch" Version="1.0.2" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
</PropertyGroup>

<PropertyGroup>
<TargetFrameworks>net7.0;net6.0;net5.0</TargetFrameworks>
<TargetFrameworks>net8.0;net7.0;net6.0</TargetFrameworks>
<LangVersion>latest</LangVersion>
<NoWarn>1591;1701;1702;8032;NU1701;AD0001;CA1041;CS0311;CS5001</NoWarn>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
Expand All @@ -21,6 +21,11 @@
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)' == 'net8.0'">
<Nullable>disable</Nullable>
<ImplicitUsings>disable</ImplicitUsings>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)' == 'net7.0'">
<Nullable>disable</Nullable>
<ImplicitUsings>disable</ImplicitUsings>
Expand All @@ -35,18 +40,19 @@
<ProjectReference Include="..\..\..\src\Cogworks.AzureSearch.IoC.Umbraco\Cogworks.AzureSearch.IoC.Umbraco.csproj"/>
</ItemGroup>


<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<PackageReference Include="Umbraco.Cms.Core" Version="[12.0.0,)" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net7.0'">
<PackageReference Include="Umbraco.Cms.Core" Version="[11.0.0,)"/>
<PackageReference Include="Umbraco.Cms.Core" Version="[11.0.0,12.0.0)" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
<PackageReference Include="Umbraco.Cms.Core" Version="[10.0.0, 11.0.0)"/>
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net5.0'">
<PackageReference Include="Umbraco.Cms.Core" Version="[9.0.0, 10.0.0)"/>
</ItemGroup>

<ItemGroup>
<PackageReference Include="AutoFixture" Version="4.17.0"/>
<PackageReference Include="DotLiquid" Version="2.2.595"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,17 @@ public class UmbracoIocExtensionTests
public UmbracoIocExtensionTests()
{
_serviceCollection = new ServiceCollection();
var dirName = Path.GetDirectoryName(
Assembly.GetExecutingAssembly()
.Location
.Replace("bin\\Debug", string.Empty));

var typeLoader =
#if NET6_0_OR_GREATER || NET7_0
#if NET6_0_OR_GREATER || NET7_0 || NET8_0
new TypeLoader(
Substitute.For<ITypeFinder>(),
Substitute.For<ILogger<TypeLoader>>());
#else
var dirName = Path.GetDirectoryName(
Assembly.GetExecutingAssembly()
.Location
.Replace("bin\\Debug", string.Empty));
new TypeLoader(
Substitute.For<ITypeFinder>(),
new VaryingRuntimeHash(),
Expand Down

0 comments on commit c7084b5

Please sign in to comment.