From 8c8599b366a7180e4b77b6f2bb50a1d8a3ab2328 Mon Sep 17 00:00:00 2001 From: Rob Maas Date: Wed, 24 Jul 2024 11:47:23 +0200 Subject: [PATCH] rebase and fixes --- .github/workflows/Dev-CI.yml | 3 +++ .github/workflows/Release.yml | 10 ++++++++ CommonSettings.targets | 22 +++++++++++++++++- Glass.Mapper.sln | 23 +++++++++++++++++++ .../Glass.Mapper.Sc.ContentSearch.csproj | 5 ++-- .../Glass.Mapper.Sc.Mvc.csproj | 5 ++-- .../Glass.Mapper.Sc.WebForms.csproj | 5 ++-- .../Configuration/SitecoreInfoType.cs | 2 +- .../SitecoreFieldScWrapperMappers.cs | 2 +- .../DataMappers/SitecoreInfoMapper.cs | 2 +- Source/Glass.Mapper.Sc/Glass.Mapper.Sc.csproj | 5 ++-- Source/Glass.Mapper.Sc/GlassHtml.cs | 2 +- .../GetChromeData/EditFrameBuilder.cs | 4 ++-- .../SitecoreVersionAbstractions.cs | 15 +++++++++--- Source/Glass.Mapper.Sc/Utilities.cs | 4 ++-- Source/Glass.Mapper/Glass.Mapper.csproj | 10 ++++++-- .../Glass.Mapper.Sc.FakeDb.ThirdParty.csproj | 7 +++--- .../SitecoreFieldFileMapperFixture.cs | 6 ++--- .../SitecoreFieldImageMapperFixture.cs | 8 +++---- .../SitecoreFieldLinkMapperFixture.cs | 16 ++++++------- .../DataMappers/SitecoreInfoMapperFixture.cs | 6 ++--- .../Glass.Mapper.Sc.FakeDb.csproj | 8 ++++--- .../GlassHtmlFixture.cs | 12 +++++----- .../Pipelines/RenderField/RenderWebEdit.cs | 8 +++---- .../Glass.Mapper.Sc.FakeDb/ScVersionTest.cs | 8 ++++++- .../Glass.Mapper.Sc.Mvc.Tests.csproj | 7 +++--- .../Glass.Mapper.Sc.V5.Tests.csproj | 7 +++--- .../Glass.Mapper.Sc.WebForms.FakeDb.csproj | 7 +++--- .../Glass.Mapper.Tests.csproj | 5 ++-- 29 files changed, 156 insertions(+), 68 deletions(-) diff --git a/.github/workflows/Dev-CI.yml b/.github/workflows/Dev-CI.yml index 166a09c27..7ba004339 100644 --- a/.github/workflows/Dev-CI.yml +++ b/.github/workflows/Dev-CI.yml @@ -17,6 +17,9 @@ jobs: steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@master + + - name: Dotnet build Sitecore v10.4.0 + run: dotnet build Glass.Mapper.sln --packages .\NuGetv104 --configfile .nuget\NuGet.Config -p:ScVersion=10.4.0 - name: Dotnet build Sitecore v10.3.0 run: dotnet build Glass.Mapper.sln --packages .\NuGetv103 --configfile .nuget\NuGet.Config -p:ScVersion=10.3.0 diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml index 621259481..35e1f61eb 100644 --- a/.github/workflows/Release.yml +++ b/.github/workflows/Release.yml @@ -7,6 +7,9 @@ on: env: NUGET_PACKAGE_PATH: '.\NuGetPackages' # set this to your nuget package path + + SC_V104_VERSION: '10.4.0' # set this to your Sitecore dll version for v10.4.0 + NUGET_SC_V104_VERSION: '104' #set this to the Number for the Sitecore version on the NuGet package SC_V103_VERSION: '10.3.0' # set this to your Sitecore dll version for v10.3.0 NUGET_SC_V103_VERSION: '103' #set this to the Number for the Sitecore version on the NuGet package @@ -51,6 +54,13 @@ jobs: steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@master + + - name: Dotnet pack Sitecore v10.4.0 + run: | + dotnet pack "./Source/Glass.Mapper.Sc/Glass.Mapper.Sc.csproj" --packages .\NuGetv104 --configfile .nuget\NuGet.Config -p:Version=${{ github.event.release.tag_name }} -p:ScVersion=${{ env.SC_V104_VERSION }} -p:PackageScVersion=${{ env.NUGET_SC_V104_VERSION }} -p:TargetFramework=net48 -o:'${{ env.NUGET_PACKAGE_PATH }}' + dotnet pack "./Source/Glass.Mapper.Sc.WebForms/Glass.Mapper.Sc.WebForms.csproj" --packages .\NuGetv104 --configfile .nuget\NuGet.Config -p:Version=${{ github.event.release.tag_name }} -p:ScVersion=${{ env.SC_V104_VERSION }} -p:PackageScVersion=${{ env.NUGET_SC_V104_VERSION }} -p:TargetFramework=net48 -o:'${{ env.NUGET_PACKAGE_PATH }}' + dotnet pack "./Source/Glass.Mapper.Sc.Mvc/Glass.Mapper.Sc.Mvc.csproj" --packages .\NuGetv104 --configfile .nuget\NuGet.Config -p:Version=${{ github.event.release.tag_name }} -p:ScVersion=${{ env.SC_V104_VERSION }} -p:PackageScVersion=${{ env.NUGET_SC_V104_VERSION }} -p:TargetFramework=net48 -o:'${{ env.NUGET_PACKAGE_PATH }}' + dotnet pack "./Source/Glass.Mapper/Glass.Mapper.csproj" --packages .\NuGetv104 --configfile .nuget\NuGet.Config -p:Version=${{ github.event.release.tag_name }} -p:ScVersion=${{ env.SC_V104_VERSION }} -p:PackageScVersion=${{ env.NUGET_SC_V104_VERSION }} -p:TargetFramework=net48 -o:'${{ env.NUGET_PACKAGE_PATH }}' - name: Dotnet pack Sitecore v10.3.0 run: | diff --git a/CommonSettings.targets b/CommonSettings.targets index 86f179576..6ec5bd80e 100644 --- a/CommonSettings.targets +++ b/CommonSettings.targets @@ -1,7 +1,27 @@ - + + true + 3.0.0-alpha1 + 4.2.1 + 4.4.0 + net48 + 5.2.4 + 3.2.4 + true + SC104 + full + AnyCPU + prompt + MinimumRecommendedRules.ruleset + bin\104\ + 10.4.0 + + + + true 3.0.0-alpha1 diff --git a/Glass.Mapper.sln b/Glass.Mapper.sln index a177ac8e1..e0e7210ff 100644 --- a/Glass.Mapper.sln +++ b/Glass.Mapper.sln @@ -88,6 +88,7 @@ Global Sc101|Any CPU = Sc101|Any CPU Sc102|Any CPU = Sc102|Any CPU Sc103|Any CPU = Sc103|Any CPU + Sc104|Any CPU = Sc104|Any CPU Sc70|Any CPU = Sc70|Any CPU Sc71|Any CPU = Sc71|Any CPU Sc72|Any CPU = Sc72|Any CPU @@ -115,6 +116,8 @@ Global {566109ED-A88A-467E-BDDB-BBF7F831A006}.Sc102|Any CPU.Build.0 = Debug|Any CPU {566109ED-A88A-467E-BDDB-BBF7F831A006}.Sc103|Any CPU.ActiveCfg = Sc103|Any CPU {566109ED-A88A-467E-BDDB-BBF7F831A006}.Sc103|Any CPU.Build.0 = Sc103|Any CPU + {566109ED-A88A-467E-BDDB-BBF7F831A006}.Sc104|Any CPU.ActiveCfg = Sc104|Any CPU + {566109ED-A88A-467E-BDDB-BBF7F831A006}.Sc104|Any CPU.Build.0 = Sc104|Any CPU {566109ED-A88A-467E-BDDB-BBF7F831A006}.Sc70|Any CPU.ActiveCfg = Release|Any CPU {566109ED-A88A-467E-BDDB-BBF7F831A006}.Sc70|Any CPU.Build.0 = Release|Any CPU {566109ED-A88A-467E-BDDB-BBF7F831A006}.Sc71|Any CPU.ActiveCfg = Release|Any CPU @@ -151,6 +154,8 @@ Global {0B8E0B06-46B8-4794-862F-73B391F8B1A1}.Sc102|Any CPU.Build.0 = Debug|Any CPU {0B8E0B06-46B8-4794-862F-73B391F8B1A1}.Sc103|Any CPU.ActiveCfg = Sc103|Any CPU {0B8E0B06-46B8-4794-862F-73B391F8B1A1}.Sc103|Any CPU.Build.0 = Sc103|Any CPU + {0B8E0B06-46B8-4794-862F-73B391F8B1A1}.Sc104|Any CPU.ActiveCfg = Sc104|Any CPU + {0B8E0B06-46B8-4794-862F-73B391F8B1A1}.Sc104|Any CPU.Build.0 = Sc104|Any CPU {0B8E0B06-46B8-4794-862F-73B391F8B1A1}.Sc70|Any CPU.ActiveCfg = Release|Any CPU {0B8E0B06-46B8-4794-862F-73B391F8B1A1}.Sc70|Any CPU.Build.0 = Release|Any CPU {0B8E0B06-46B8-4794-862F-73B391F8B1A1}.Sc71|Any CPU.ActiveCfg = Release|Any CPU @@ -187,6 +192,8 @@ Global {728CF1A7-0F06-4464-B434-33A982D97C82}.Sc102|Any CPU.Build.0 = Debug|Any CPU {728CF1A7-0F06-4464-B434-33A982D97C82}.Sc103|Any CPU.ActiveCfg = Sc103|Any CPU {728CF1A7-0F06-4464-B434-33A982D97C82}.Sc103|Any CPU.Build.0 = Sc103|Any CPU + {728CF1A7-0F06-4464-B434-33A982D97C82}.Sc104|Any CPU.ActiveCfg = Sc104|Any CPU + {728CF1A7-0F06-4464-B434-33A982D97C82}.Sc104|Any CPU.Build.0 = Sc104|Any CPU {728CF1A7-0F06-4464-B434-33A982D97C82}.Sc70|Any CPU.ActiveCfg = Release|Any CPU {728CF1A7-0F06-4464-B434-33A982D97C82}.Sc70|Any CPU.Build.0 = Release|Any CPU {728CF1A7-0F06-4464-B434-33A982D97C82}.Sc71|Any CPU.ActiveCfg = Release|Any CPU @@ -223,6 +230,8 @@ Global {CE1CC8D6-60CC-4DCA-9B6C-0256778D107A}.Sc102|Any CPU.Build.0 = Debug|Any CPU {CE1CC8D6-60CC-4DCA-9B6C-0256778D107A}.Sc103|Any CPU.ActiveCfg = Sc103|Any CPU {CE1CC8D6-60CC-4DCA-9B6C-0256778D107A}.Sc103|Any CPU.Build.0 = Sc103|Any CPU + {CE1CC8D6-60CC-4DCA-9B6C-0256778D107A}.Sc104|Any CPU.ActiveCfg = Sc104|Any CPU + {CE1CC8D6-60CC-4DCA-9B6C-0256778D107A}.Sc104|Any CPU.Build.0 = Sc104|Any CPU {CE1CC8D6-60CC-4DCA-9B6C-0256778D107A}.Sc70|Any CPU.ActiveCfg = Debug|Any CPU {CE1CC8D6-60CC-4DCA-9B6C-0256778D107A}.Sc70|Any CPU.Build.0 = Debug|Any CPU {CE1CC8D6-60CC-4DCA-9B6C-0256778D107A}.Sc71|Any CPU.ActiveCfg = Debug|Any CPU @@ -259,6 +268,8 @@ Global {F872CEFA-8F7B-4703-ADAB-49B8081B8EBE}.Sc102|Any CPU.Build.0 = Debug|Any CPU {F872CEFA-8F7B-4703-ADAB-49B8081B8EBE}.Sc103|Any CPU.ActiveCfg = Sc103|Any CPU {F872CEFA-8F7B-4703-ADAB-49B8081B8EBE}.Sc103|Any CPU.Build.0 = Sc103|Any CPU + {F872CEFA-8F7B-4703-ADAB-49B8081B8EBE}.Sc104|Any CPU.ActiveCfg = Sc104|Any CPU + {F872CEFA-8F7B-4703-ADAB-49B8081B8EBE}.Sc104|Any CPU.Build.0 = Sc104|Any CPU {F872CEFA-8F7B-4703-ADAB-49B8081B8EBE}.Sc70|Any CPU.ActiveCfg = Debug|Any CPU {F872CEFA-8F7B-4703-ADAB-49B8081B8EBE}.Sc70|Any CPU.Build.0 = Debug|Any CPU {F872CEFA-8F7B-4703-ADAB-49B8081B8EBE}.Sc71|Any CPU.ActiveCfg = Debug|Any CPU @@ -295,6 +306,8 @@ Global {93828C18-FFB1-4597-86C9-CA3B462AD4E0}.Sc102|Any CPU.Build.0 = Debug|Any CPU {93828C18-FFB1-4597-86C9-CA3B462AD4E0}.Sc103|Any CPU.ActiveCfg = Sc103|Any CPU {93828C18-FFB1-4597-86C9-CA3B462AD4E0}.Sc103|Any CPU.Build.0 = Sc103|Any CPU + {93828C18-FFB1-4597-86C9-CA3B462AD4E0}.Sc104|Any CPU.ActiveCfg = Sc104|Any CPU + {93828C18-FFB1-4597-86C9-CA3B462AD4E0}.Sc104|Any CPU.Build.0 = Sc104|Any CPU {93828C18-FFB1-4597-86C9-CA3B462AD4E0}.Sc70|Any CPU.ActiveCfg = Debug|Any CPU {93828C18-FFB1-4597-86C9-CA3B462AD4E0}.Sc70|Any CPU.Build.0 = Debug|Any CPU {93828C18-FFB1-4597-86C9-CA3B462AD4E0}.Sc71|Any CPU.ActiveCfg = Debug|Any CPU @@ -331,6 +344,8 @@ Global {3EEF523D-F61C-4DD3-BBE1-C22BE90AFF3F}.Sc102|Any CPU.Build.0 = Debug|Any CPU {3EEF523D-F61C-4DD3-BBE1-C22BE90AFF3F}.Sc103|Any CPU.ActiveCfg = Sc103|Any CPU {3EEF523D-F61C-4DD3-BBE1-C22BE90AFF3F}.Sc103|Any CPU.Build.0 = Sc103|Any CPU + {3EEF523D-F61C-4DD3-BBE1-C22BE90AFF3F}.Sc104|Any CPU.ActiveCfg = Sc104|Any CPU + {3EEF523D-F61C-4DD3-BBE1-C22BE90AFF3F}.Sc104|Any CPU.Build.0 = Sc104|Any CPU {3EEF523D-F61C-4DD3-BBE1-C22BE90AFF3F}.Sc70|Any CPU.ActiveCfg = Debug|Any CPU {3EEF523D-F61C-4DD3-BBE1-C22BE90AFF3F}.Sc70|Any CPU.Build.0 = Debug|Any CPU {3EEF523D-F61C-4DD3-BBE1-C22BE90AFF3F}.Sc71|Any CPU.ActiveCfg = Debug|Any CPU @@ -367,6 +382,8 @@ Global {D03EFAFB-E535-45D3-96C9-52D1F5B35B87}.Sc102|Any CPU.Build.0 = Debug|Any CPU {D03EFAFB-E535-45D3-96C9-52D1F5B35B87}.Sc103|Any CPU.ActiveCfg = Sc103|Any CPU {D03EFAFB-E535-45D3-96C9-52D1F5B35B87}.Sc103|Any CPU.Build.0 = Sc103|Any CPU + {D03EFAFB-E535-45D3-96C9-52D1F5B35B87}.Sc104|Any CPU.ActiveCfg = Sc104|Any CPU + {D03EFAFB-E535-45D3-96C9-52D1F5B35B87}.Sc104|Any CPU.Build.0 = Sc104|Any CPU {D03EFAFB-E535-45D3-96C9-52D1F5B35B87}.Sc70|Any CPU.ActiveCfg = Debug|Any CPU {D03EFAFB-E535-45D3-96C9-52D1F5B35B87}.Sc70|Any CPU.Build.0 = Debug|Any CPU {D03EFAFB-E535-45D3-96C9-52D1F5B35B87}.Sc71|Any CPU.ActiveCfg = Debug|Any CPU @@ -403,6 +420,8 @@ Global {F1095B93-944C-44FD-AB13-B952CD7E8E68}.Sc102|Any CPU.Build.0 = Debug|Any CPU {F1095B93-944C-44FD-AB13-B952CD7E8E68}.Sc103|Any CPU.ActiveCfg = Sc103|Any CPU {F1095B93-944C-44FD-AB13-B952CD7E8E68}.Sc103|Any CPU.Build.0 = Sc103|Any CPU + {F1095B93-944C-44FD-AB13-B952CD7E8E68}.Sc104|Any CPU.ActiveCfg = Sc104|Any CPU + {F1095B93-944C-44FD-AB13-B952CD7E8E68}.Sc104|Any CPU.Build.0 = Sc104|Any CPU {F1095B93-944C-44FD-AB13-B952CD7E8E68}.Sc70|Any CPU.ActiveCfg = Debug|Any CPU {F1095B93-944C-44FD-AB13-B952CD7E8E68}.Sc70|Any CPU.Build.0 = Debug|Any CPU {F1095B93-944C-44FD-AB13-B952CD7E8E68}.Sc71|Any CPU.ActiveCfg = Debug|Any CPU @@ -439,6 +458,8 @@ Global {1D32E144-84DF-45D4-8047-E227A736C0C4}.Sc102|Any CPU.Build.0 = Debug|Any CPU {1D32E144-84DF-45D4-8047-E227A736C0C4}.Sc103|Any CPU.ActiveCfg = Sc103|Any CPU {1D32E144-84DF-45D4-8047-E227A736C0C4}.Sc103|Any CPU.Build.0 = Sc103|Any CPU + {1D32E144-84DF-45D4-8047-E227A736C0C4}.Sc104|Any CPU.ActiveCfg = Sc104|Any CPU + {1D32E144-84DF-45D4-8047-E227A736C0C4}.Sc104|Any CPU.Build.0 = Sc104|Any CPU {1D32E144-84DF-45D4-8047-E227A736C0C4}.Sc70|Any CPU.ActiveCfg = Debug|Any CPU {1D32E144-84DF-45D4-8047-E227A736C0C4}.Sc70|Any CPU.Build.0 = Debug|Any CPU {1D32E144-84DF-45D4-8047-E227A736C0C4}.Sc71|Any CPU.ActiveCfg = Debug|Any CPU @@ -475,6 +496,8 @@ Global {E5EAEA70-541C-4F98-9D04-EDD9CF48F1B5}.Sc102|Any CPU.Build.0 = Debug|Any CPU {E5EAEA70-541C-4F98-9D04-EDD9CF48F1B5}.Sc103|Any CPU.ActiveCfg = Sc103|Any CPU {E5EAEA70-541C-4F98-9D04-EDD9CF48F1B5}.Sc103|Any CPU.Build.0 = Sc103|Any CPU + {E5EAEA70-541C-4F98-9D04-EDD9CF48F1B5}.Sc104|Any CPU.ActiveCfg = Sc104|Any CPU + {E5EAEA70-541C-4F98-9D04-EDD9CF48F1B5}.Sc104|Any CPU.Build.0 = Sc104|Any CPU {E5EAEA70-541C-4F98-9D04-EDD9CF48F1B5}.Sc70|Any CPU.ActiveCfg = Release|Any CPU {E5EAEA70-541C-4F98-9D04-EDD9CF48F1B5}.Sc70|Any CPU.Build.0 = Release|Any CPU {E5EAEA70-541C-4F98-9D04-EDD9CF48F1B5}.Sc71|Any CPU.ActiveCfg = Release|Any CPU diff --git a/Source/Glass.Mapper.Sc.ContentSearch/Glass.Mapper.Sc.ContentSearch.csproj b/Source/Glass.Mapper.Sc.ContentSearch/Glass.Mapper.Sc.ContentSearch.csproj index a73ee5fc7..c13e5df13 100644 --- a/Source/Glass.Mapper.Sc.ContentSearch/Glass.Mapper.Sc.ContentSearch.csproj +++ b/Source/Glass.Mapper.Sc.ContentSearch/Glass.Mapper.Sc.ContentSearch.csproj @@ -10,7 +10,8 @@ 512 ..\..\ true - Debug;Release;sc100;sc93;sc92;sc91;sc90;sc82;sc81;sc80;sc75;sc72;sc71;sc70;sc101;sc102;Sc103 + Debug;Release;sc100;sc93;sc92;sc91;sc90;sc82;sc81;sc80;sc75;sc72;sc71;sc70;sc101;sc102;Sc103;Sc104 + net48 true @@ -21,7 +22,7 @@ prompt 4 - + true full false diff --git a/Source/Glass.Mapper.Sc.Mvc/Glass.Mapper.Sc.Mvc.csproj b/Source/Glass.Mapper.Sc.Mvc/Glass.Mapper.Sc.Mvc.csproj index 1e47a3306..6ac13ad46 100644 --- a/Source/Glass.Mapper.Sc.Mvc/Glass.Mapper.Sc.Mvc.csproj +++ b/Source/Glass.Mapper.Sc.Mvc/Glass.Mapper.Sc.Mvc.csproj @@ -11,7 +11,7 @@ ..\..\ bin\Glass.Mapper.Sc.Mvc.XML - Debug;Release;sc100;sc93;sc92;sc91;sc90;sc82;sc81;sc80;sc75;sc72;sc71;sc70;sc101;sc102;Sc103 + Debug;Release;sc100;sc93;sc92;sc91;sc90;sc82;sc81;sc80;sc75;sc72;sc71;sc70;sc101;sc102;Sc103;Sc104 true @@ -21,6 +21,7 @@ $(NuspecProperties);version=$(Version) $(NuspecProperties);scVersion=$(PackageScVersion) $(NuspecProperties);netVersion=$(TargetFramework) + net48 AnyCPU @@ -33,7 +34,7 @@ 4 false - + AnyCPU true full diff --git a/Source/Glass.Mapper.Sc.WebForms/Glass.Mapper.Sc.WebForms.csproj b/Source/Glass.Mapper.Sc.WebForms/Glass.Mapper.Sc.WebForms.csproj index 538d2067d..c5dac15c1 100644 --- a/Source/Glass.Mapper.Sc.WebForms/Glass.Mapper.Sc.WebForms.csproj +++ b/Source/Glass.Mapper.Sc.WebForms/Glass.Mapper.Sc.WebForms.csproj @@ -10,7 +10,7 @@ 512 ..\..\ bin\Glass.Mapper.Sc.WebForms.xml - Debug;Release;sc100;sc93;sc92;sc91;sc90;sc82;sc81;sc80;sc75;sc72;sc71;sc70;sc101;sc102;Sc103 + Debug;Release;sc100;sc93;sc92;sc91;sc90;sc82;sc81;sc80;sc75;sc72;sc71;sc70;sc101;sc102;Sc103;Sc104 true @@ -20,6 +20,7 @@ $(NuspecProperties);version=$(Version) $(NuspecProperties);scVersion=$(PackageScVersion) $(NuspecProperties);netVersion=$(TargetFramework) + net48 true @@ -30,7 +31,7 @@ prompt 4 - + true full false diff --git a/Source/Glass.Mapper.Sc/Configuration/SitecoreInfoType.cs b/Source/Glass.Mapper.Sc/Configuration/SitecoreInfoType.cs index 04cc1747b..4987e6539 100644 --- a/Source/Glass.Mapper.Sc/Configuration/SitecoreInfoType.cs +++ b/Source/Glass.Mapper.Sc/Configuration/SitecoreInfoType.cs @@ -67,7 +67,7 @@ public enum SitecoreInfoType /// BaseTemplateIds=14, -#if SC81 || SC82 || SC90 || SC91 || SC92 || SC93 || SC100 || SC101 || SC102 || SC103 +#if SC81 || SC82 || SC90 || SC91 || SC92 || SC93 || SC100 || SC101 || SC102 || SC103 || SC104 /// /// Gets the original language. /// diff --git a/Source/Glass.Mapper.Sc/DataMappers/SitecoreFieldScWrapperMappers.cs b/Source/Glass.Mapper.Sc/DataMappers/SitecoreFieldScWrapperMappers.cs index 873672a3a..c647038ce 100644 --- a/Source/Glass.Mapper.Sc/DataMappers/SitecoreFieldScWrapperMappers.cs +++ b/Source/Glass.Mapper.Sc/DataMappers/SitecoreFieldScWrapperMappers.cs @@ -217,7 +217,7 @@ protected override ValueLookupField Create(Field field) } } -#if !SC93 && !SC100 && !SC101 && !SC102 && !SC103 //removed in > SC93 +#if !SC93 && !SC100 && !SC101 && !SC102 && !SC103 && !SC104 //removed in > SC93 public class SitecoreFieldScVersionLinkFieldMapper : SitecoreFieldScFieldBaseMapper { diff --git a/Source/Glass.Mapper.Sc/DataMappers/SitecoreInfoMapper.cs b/Source/Glass.Mapper.Sc/DataMappers/SitecoreInfoMapper.cs index 3a32ccb74..3af0f3108 100644 --- a/Source/Glass.Mapper.Sc/DataMappers/SitecoreInfoMapper.cs +++ b/Source/Glass.Mapper.Sc/DataMappers/SitecoreInfoMapper.cs @@ -237,7 +237,7 @@ public override void Setup(DataMapperResolverArgs args) case SitecoreInfoType.ItemUri: _getValue = (item, getOptions) => new ItemUri(item.ID, item.Language, item.Version, item.Database); break; -#if (SC82 || SC90 || SC91 || SC92 || SC93 || SC100 || SC101 || SC102 || SC103) +#if (SC82 || SC90 || SC91 || SC92 || SC93 || SC100 || SC101 || SC102 || SC103 || SC104) case SitecoreInfoType.OriginalLanguage: _getValue = (item, getOptions) => item.OriginalLanguage; break; diff --git a/Source/Glass.Mapper.Sc/Glass.Mapper.Sc.csproj b/Source/Glass.Mapper.Sc/Glass.Mapper.Sc.csproj index 632192b4e..0f95cdbca 100644 --- a/Source/Glass.Mapper.Sc/Glass.Mapper.Sc.csproj +++ b/Source/Glass.Mapper.Sc/Glass.Mapper.Sc.csproj @@ -14,7 +14,7 @@ true bin\Glass.Mapper.Sc.XML - Debug;Release;sc100;sc93;sc92;sc91;sc90;sc82;sc81;sc80;sc75;sc72;sc71;sc70;sc101;sc102;Sc103 + Debug;Release;sc100;sc93;sc92;sc91;sc90;sc82;sc81;sc80;sc75;sc72;sc71;sc70;sc101;sc102;Sc103;Sc104 true @@ -23,6 +23,7 @@ $(SolutionDir)/NugetDefinitions/Glass.Mapper.Sc.symbols.nuspec $(NuspecProperties);version=$(Version) $(NuspecProperties);scVersion=$(PackageScVersion) + net48 true @@ -34,7 +35,7 @@ 4 false - + true full false diff --git a/Source/Glass.Mapper.Sc/GlassHtml.cs b/Source/Glass.Mapper.Sc/GlassHtml.cs index 25fabb3a9..c7e1dabce 100644 --- a/Source/Glass.Mapper.Sc/GlassHtml.cs +++ b/Source/Glass.Mapper.Sc/GlassHtml.cs @@ -503,7 +503,7 @@ public static RenderingResult BeginRenderLink(Link link, SafeDictionary AttributeCheck(attributes, "title", title); AttributeCheck(attributes, "style", link.Style); -#if SC90 || SC91|| SC92 || SC93 || SC100 || SC101 || SC102 || SC103 +#if SC90 || SC91|| SC92 || SC93 || SC100 || SC101 || SC102 || SC103 || SC104 if (attributes["target"] == "_blank" && Settings.ProtectExternalLinksWithBlankTarget) { diff --git a/Source/Glass.Mapper.Sc/Pipelines/GetChromeData/EditFrameBuilder.cs b/Source/Glass.Mapper.Sc/Pipelines/GetChromeData/EditFrameBuilder.cs index 8cfc460ee..1b9973ee6 100644 --- a/Source/Glass.Mapper.Sc/Pipelines/GetChromeData/EditFrameBuilder.cs +++ b/Source/Glass.Mapper.Sc/Pipelines/GetChromeData/EditFrameBuilder.cs @@ -1,7 +1,7 @@ using System; using System.Text.RegularExpressions; using Sitecore; -#if SC93 || SC100 || SC101 || SC102 || SC103 +#if SC93 || SC100 || SC101 || SC102 || SC103 || SC104 using Sitecore.Abstractions; #endif using Sitecore.Configuration; @@ -38,7 +38,7 @@ public class EditFrameBuilder : GetChromeDataProcessor private readonly Regex _titleRegex = new Regex("(?<title>([^<]*))<title>"); -#if SC93 || SC100 || SC101 || SC102 || SC103 +#if SC93 || SC100 || SC101 || SC102 || SC103 || SC104 public EditFrameBuilder(BaseClient client) : base(client) { diff --git a/Source/Glass.Mapper.Sc/SitecoreVersionAbstractions.cs b/Source/Glass.Mapper.Sc/SitecoreVersionAbstractions.cs index 9f35256d2..9dcf9df60 100644 --- a/Source/Glass.Mapper.Sc/SitecoreVersionAbstractions.cs +++ b/Source/Glass.Mapper.Sc/SitecoreVersionAbstractions.cs @@ -4,7 +4,7 @@ using System.Text; using System.Threading.Tasks; -#if SC90 || SC91 || SC92 || SC93 || SC100 || SC101 || SC102 || SC103 +#if SC90 || SC91 || SC92 || SC93 || SC100 || SC101 || SC102 || SC103 || SC104 using Sitecore.Abstractions; using Sitecore.DependencyInjection; #endif @@ -18,12 +18,12 @@ namespace Glass.Mapper.Sc { public class SitecoreVersionAbstractions { -#if SC90 || SC91 || SC92 || SC93 || SC100 || SC101 || SC102 || SC103 +#if SC90 || SC91 || SC92 || SC93 || SC100 || SC101 || SC102 || SC103 || SC104 internal static LazyResetable<BaseMediaManager> MediaManager = ServiceLocator.GetRequiredResetableService<BaseMediaManager>(); internal static LazyResetable<BaseLinkManager> LinkManager = ServiceLocator.GetRequiredResetableService<BaseLinkManager>(); - + internal static string renderingParamKey = "renderingParameters"; public static string GetMediaUrl(MediaItem media, MediaUrlOptions mediaUrlOptions) { return MediaManager.Value.GetMediaUrl(media, mediaUrlOptions); @@ -35,6 +35,15 @@ public static string GetMediaUrl(MediaItem media) public static string GetItemUrl(Item item, UrlOptions urlOptions) { +#if SC104 + //Added check for when rendering paramater request comes as Sitecore.Links.UrlBuilders.Helpers.ItemPathBuilder.GetRelativePath + //implementation has been changed in Sitecore 10.4 + //below changes will return only url when requested for a item + if (item != null && item.Name != null && item.Name == renderingParamKey) + { + return "/renderingparameters"; + } +#endif return LinkManager.Value.GetItemUrl(item, urlOptions); } diff --git a/Source/Glass.Mapper.Sc/Utilities.cs b/Source/Glass.Mapper.Sc/Utilities.cs index a678c58d0..ca663481f 100644 --- a/Source/Glass.Mapper.Sc/Utilities.cs +++ b/Source/Glass.Mapper.Sc/Utilities.cs @@ -23,7 +23,7 @@ public static bool IsPageEditor { get { -#if SC82 || SC90 || SC91 || SC92 || SC93 || SC100 || SC101 || SC102 || SC103 +#if SC82 || SC90 || SC91 || SC92 || SC93 || SC100 || SC101 || SC102 || SC103 || SC104 return Sitecore.Context.PageMode.IsExperienceEditor; #else return Sitecore.Context.PageMode.IsPageEditor; @@ -37,7 +37,7 @@ public static bool IsPageEditorEditing internal static Func<bool> GetIsPageEditorEditing = () => { -#if SC82 || SC90 || SC91 || SC92 || SC93 || SC100 || SC101 || SC102 || SC103 +#if SC82 || SC90 || SC91 || SC92 || SC93 || SC100 || SC101 || SC102 || SC103 || SC104 return Sitecore.Context.PageMode.IsExperienceEditorEditing; #else return Sitecore.Context.PageMode.IsPageEditorEditing; diff --git a/Source/Glass.Mapper/Glass.Mapper.csproj b/Source/Glass.Mapper/Glass.Mapper.csproj index 8f93c8924..9256082cd 100644 --- a/Source/Glass.Mapper/Glass.Mapper.csproj +++ b/Source/Glass.Mapper/Glass.Mapper.csproj @@ -14,7 +14,7 @@ <RestorePackages>true</RestorePackages> <TargetFrameworkProfile /> <DocumentationFile>bin\Glass.Mapper.XML</DocumentationFile> - <Configurations>Debug;Release;sc100;sc93;sc92;sc91;sc90;sc82;sc81;sc80;sc75;sc72;sc71;sc70;sc101;sc102;Sc103</Configurations> + <Configurations>Debug;Release;sc100;sc93;sc92;sc91;sc90;sc82;sc81;sc80;sc75;sc72;sc71;sc70;sc101;sc102;Sc103;Sc104</Configurations> </PropertyGroup> <PropertyGroup> <IsPackable>true</IsPackable> @@ -37,7 +37,7 @@ <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Sc103|AnyCPU'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Sc104|AnyCPU'"> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> @@ -56,6 +56,11 @@ <WarningLevel>4</WarningLevel> <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> + <ItemGroup> + <Compile Remove="Properties\PublishProfiles\**" /> + <EmbeddedResource Remove="Properties\PublishProfiles\**" /> + <None Remove="Properties\PublishProfiles\**" /> + </ItemGroup> <ItemGroup> <Compile Remove="Pipelines\ObjectConstruction\Tasks\Diagnostics\ConstructionCalledMonitorTask.cs" /> <Compile Remove="Pipelines\ObjectConstruction\Tasks\Diagnostics\ConstructionCreatedMonitorTask.cs" /> @@ -95,6 +100,7 @@ <PropertyGroup> <SHFBROOT>C:\Program Files (x86)\EWSoftware\Sandcastle Help File Builder</SHFBROOT> + <TargetFramework>net48</TargetFramework> </PropertyGroup> <!-- Target Name="AfterBuild"> < Build source code docs > diff --git a/Tests/Unit Tests/Glass.Mapper.Sc.FakeDb.ThirdParty/Glass.Mapper.Sc.FakeDb.ThirdParty.csproj b/Tests/Unit Tests/Glass.Mapper.Sc.FakeDb.ThirdParty/Glass.Mapper.Sc.FakeDb.ThirdParty.csproj index 1116b15cb..c6d94977e 100644 --- a/Tests/Unit Tests/Glass.Mapper.Sc.FakeDb.ThirdParty/Glass.Mapper.Sc.FakeDb.ThirdParty.csproj +++ b/Tests/Unit Tests/Glass.Mapper.Sc.FakeDb.ThirdParty/Glass.Mapper.Sc.FakeDb.ThirdParty.csproj @@ -9,7 +9,8 @@ <AssemblyName>Glass.Mapper.Sc.FakeDb.ThirdParty</AssemblyName> <FileAlignment>512</FileAlignment> <RestorePackages>true</RestorePackages> - <Configurations>Debug;Release;sc100;sc93;sc92;sc91;sc90;sc82;sc81;sc80;sc75;sc72;sc71;sc70;sc101;sc102;Sc103</Configurations> + <Configurations>Debug;Release;sc100;sc93;sc92;sc91;sc90;sc82;sc81;sc80;sc75;sc72;sc71;sc70;sc101;sc102;Sc103;Sc104</Configurations> + <TargetFramework>net48</TargetFramework> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PlatformTarget>AnyCPU</PlatformTarget> @@ -21,7 +22,7 @@ <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Sc103|AnyCPU'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Sc104|AnyCPU'"> <PlatformTarget>AnyCPU</PlatformTarget> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> @@ -57,7 +58,7 @@ </ItemGroup> <ItemGroup> <PackageReference Include="Sitecore.Kernel" Version="$(ScVersion)" /> - <PackageReference Include="Sitecore.Nexus" Version="$(ScVersion)" Condition="'$(ScVersion)' != '10.2.0' and '$(ScVersion)' != '10.3.0'" /> + <PackageReference Include="Sitecore.Nexus" Version="$(ScVersion)" Condition="'$(ScVersion)' != '10.2.0' and '$(ScVersion)' != '10.3.0' and '$(ScVersion)' != '10.4.0'" /> <PackageReference Include="Sitecore.Analytics" Version="$(ScVersion)" /> <PackageReference Include="Sitecore.Client" Version="$(ScVersion)" /> </ItemGroup> diff --git a/Tests/Unit Tests/Glass.Mapper.Sc.FakeDb/DataMappers/SitecoreFieldFileMapperFixture.cs b/Tests/Unit Tests/Glass.Mapper.Sc.FakeDb/DataMappers/SitecoreFieldFileMapperFixture.cs index e741612c2..9adc556b5 100644 --- a/Tests/Unit Tests/Glass.Mapper.Sc.FakeDb/DataMappers/SitecoreFieldFileMapperFixture.cs +++ b/Tests/Unit Tests/Glass.Mapper.Sc.FakeDb/DataMappers/SitecoreFieldFileMapperFixture.cs @@ -7,7 +7,7 @@ using Sitecore.FakeDb; using Sitecore.Resources.Media; -#if SC90 || SC91 || SC92 || SC93 || SC100 || SC101 || SC102 || SC103 +#if SC90 || SC91 || SC92 || SC93 || SC100 || SC101 || SC102 || SC103 || SC104 using Sitecore.Abstractions; using Sitecore.DependencyInjection; #endif @@ -42,7 +42,7 @@ public void GetViewValue_FieldPointsAtFile_ReturnFileObject() { -#if SC90 || SC91 || SC92 || SC93 || SC100 || SC101 || SC102 || SC103 +#if SC90 || SC91 || SC92 || SC93 || SC100 || SC101 || SC102 || SC103 || SC104 var mediaUrlProvider = Substitute.For<BaseMediaManager>(); @@ -178,7 +178,7 @@ public void SetField_FileObjectPass_FieldPopulated() -#if SC90 || SC91 || SC92 || SC93 || SC100 || SC101 || SC102 || SC103 +#if SC90 || SC91 || SC92 || SC93 || SC100 || SC101 || SC102 || SC103 || SC104 var mediaUrlProvider = Substitute.For<BaseMediaManager>(); diff --git a/Tests/Unit Tests/Glass.Mapper.Sc.FakeDb/DataMappers/SitecoreFieldImageMapperFixture.cs b/Tests/Unit Tests/Glass.Mapper.Sc.FakeDb/DataMappers/SitecoreFieldImageMapperFixture.cs index 69c43de4c..e7f01f81b 100644 --- a/Tests/Unit Tests/Glass.Mapper.Sc.FakeDb/DataMappers/SitecoreFieldImageMapperFixture.cs +++ b/Tests/Unit Tests/Glass.Mapper.Sc.FakeDb/DataMappers/SitecoreFieldImageMapperFixture.cs @@ -14,7 +14,7 @@ using Sitecore.Resources.Media; using Image = Glass.Mapper.Sc.Fields.Image; -#if SC90 || SC91 || SC92 || SC93 || SC100 || SC101 || SC102 || SC103 +#if SC90 || SC91 || SC92 || SC93 || SC100 || SC101 || SC102 || SC103 || SC104 using Sitecore.Abstractions; using Sitecore.DependencyInjection; #endif @@ -56,7 +56,7 @@ public void GetField_ImageInField_ReturnsImageObject() { -#if SC90 || SC91 || SC92 || SC93 || SC100 || SC101 || SC102 || SC103 +#if SC90 || SC91 || SC92 || SC93 || SC100 || SC101 || SC102 || SC103 || SC104 var mediaUrlProvider = Substitute.For<BaseMediaManager>(); @@ -121,7 +121,7 @@ public void GetField_ImageInField_MissingMediaItem_ReturnsImageObjectWithSrc() }) { -#if SC90 || SC91 || SC92 || SC93 || SC100 || SC101 || SC102 || SC103 +#if SC90 || SC91 || SC92 || SC93 || SC100 || SC101 || SC102 || SC103 || SC104 var mediaUrlProvider = Substitute.For<BaseMediaManager>(); @@ -324,7 +324,7 @@ SitecoreMediaUrlOptions option -#if SC90 || SC91 || SC92 || SC93 || SC100 || SC101 || SC102 || SC103 +#if SC90 || SC91 || SC92 || SC93 || SC100 || SC101 || SC102 || SC103 || SC104 var mediaUrlProvider = Substitute.For<BaseMediaManager>(); diff --git a/Tests/Unit Tests/Glass.Mapper.Sc.FakeDb/DataMappers/SitecoreFieldLinkMapperFixture.cs b/Tests/Unit Tests/Glass.Mapper.Sc.FakeDb/DataMappers/SitecoreFieldLinkMapperFixture.cs index 1af03f930..665a9b4cb 100644 --- a/Tests/Unit Tests/Glass.Mapper.Sc.FakeDb/DataMappers/SitecoreFieldLinkMapperFixture.cs +++ b/Tests/Unit Tests/Glass.Mapper.Sc.FakeDb/DataMappers/SitecoreFieldLinkMapperFixture.cs @@ -8,7 +8,7 @@ using Sitecore.FakeDb; using Sitecore.Links; -#if SC90 || SC91 || SC92 || SC93 || SC100 || SC101 || SC102 || SC103 +#if SC90 || SC91 || SC92 || SC93 || SC100 || SC101 || SC102 || SC103 || SC104 using Sitecore.Abstractions; using Sitecore.DependencyInjection; #endif @@ -258,7 +258,7 @@ public void GetField_FieldContainsInternal_ReturnsInternalLink() field.Value = fieldValue; } -#if SC90 || SC91 || SC92 || SC93 || SC100 || SC101 || SC102 || SC103 +#if SC90 || SC91 || SC92 || SC93 || SC100 || SC101 || SC102 || SC103 || SC104 var linkProvider = Substitute.For<BaseLinkManager>(); linkProvider @@ -335,7 +335,7 @@ public void GetField__InternalLink_FieldContainsInternal_ReturnsInternalLink() } -#if SC90 || SC91 || SC92 || SC93 || SC100 || SC101 || SC102 || SC103 +#if SC90 || SC91 || SC92 || SC93 || SC100 || SC101 || SC102 || SC103 || SC104 var linkProvider = Substitute.For<BaseLinkManager>(); linkProvider @@ -411,7 +411,7 @@ public void GetField_FieldContainsInternalWithSpecialCharacters_ReturnsInternalL field.Value = fieldValue; } -#if SC90 || SC91 || SC92 || SC93 || SC100 || SC101 || SC102 || SC103 +#if SC90 || SC91 || SC92 || SC93 || SC100 || SC101 || SC102 || SC103 || SC104 var linkProvider = Substitute.For<BaseLinkManager>(); linkProvider @@ -543,7 +543,7 @@ public void GetField_FieldContainsInternalAbsoluteUrl_ReturnsInternalLink() } -#if SC90 || SC91 || SC92 || SC93 || SC100 || SC101 || SC102 || SC103 +#if SC90 || SC91 || SC92 || SC93 || SC100 || SC101 || SC102 || SC103 || SC104 var linkProvider = Substitute.For<BaseLinkManager>(); linkProvider @@ -670,7 +670,7 @@ public void GetField_FieldContainsMediaLink_ReturnsMediaLink() } -#if SC90 || SC91 || SC92 || SC93 || SC100 || SC101 || SC102 || SC103 +#if SC90 || SC91 || SC92 || SC93 || SC100 || SC101 || SC102 || SC103 || SC104 var mediaUrlProvider = Substitute.For<BaseMediaManager>(); @@ -1001,7 +1001,7 @@ public void SetField_InternalLink_InternalLinkSetOnField() { var mapper = new SitecoreFieldLinkMapper(new FakeUrlOptionsResolver()); -#if SC93 || SC100 || SC101 || SC102 || SC103 +#if SC93 || SC100 || SC101 || SC102 || SC103 || SC104 var expected = "<link target=\"testTarget\" title=\"test alternative\" querystring=\"q%3ds\" linktype=\"internal\" id=\"{0}\" anchor=\"testAnchor\" url=\"/en/sitecore/content/Target\" class=\"testClass\" text=\"Test description\" />" .Formatted(targetId.Guid.ToString("B").ToUpperInvariant()); @@ -1261,7 +1261,7 @@ public void SetField_MedialLink_MediaLinkSetOnField() } -#if SC90 || SC91 || SC92 || SC93 || SC100 || SC101 || SC102 || SC103 +#if SC90 || SC91 || SC92 || SC93 || SC100 || SC101 || SC102 || SC103 || SC104 var mediaUrlProvider = Substitute.For<BaseMediaManager>(); diff --git a/Tests/Unit Tests/Glass.Mapper.Sc.FakeDb/DataMappers/SitecoreInfoMapperFixture.cs b/Tests/Unit Tests/Glass.Mapper.Sc.FakeDb/DataMappers/SitecoreInfoMapperFixture.cs index d4c19da37..3d41faa7c 100644 --- a/Tests/Unit Tests/Glass.Mapper.Sc.FakeDb/DataMappers/SitecoreInfoMapperFixture.cs +++ b/Tests/Unit Tests/Glass.Mapper.Sc.FakeDb/DataMappers/SitecoreInfoMapperFixture.cs @@ -19,7 +19,7 @@ using Sitecore.Resources.Media; using Sitecore.SecurityModel; -#if SC90 || SC91 || SC92 || SC93 || SC100 || SC101 || SC102 || SC103 +#if SC90 || SC91 || SC92 || SC93 || SC100 || SC101 || SC102 || SC103 || SC104 using Sitecore.Abstractions; using Sitecore.DependencyInjection; #endif @@ -70,7 +70,7 @@ public void MapToProperty_SitecoreInfoType_GetsExpectedValueFromSitecore( }) { -#if SC90 || SC91 || SC92 || SC93 || SC100 || SC101 || SC102 || SC103 +#if SC90 || SC91 || SC92 || SC93 || SC100 || SC101 || SC102 || SC103 || SC104 var mediaUrlProvider = Substitute.For<BaseMediaManager>(); @@ -298,7 +298,7 @@ SitecoreInfoMediaUrlOptions option }; -#if SC90 || SC91 || SC92 || SC93 || SC100 || SC101 || SC102 || SC103 +#if SC90 || SC91 || SC92 || SC93 || SC100 || SC101 || SC102 || SC103 || SC104 var mediaUrlProvider = Substitute.For<BaseMediaManager>(); diff --git a/Tests/Unit Tests/Glass.Mapper.Sc.FakeDb/Glass.Mapper.Sc.FakeDb.csproj b/Tests/Unit Tests/Glass.Mapper.Sc.FakeDb/Glass.Mapper.Sc.FakeDb.csproj index 06983a363..beeb6a828 100644 --- a/Tests/Unit Tests/Glass.Mapper.Sc.FakeDb/Glass.Mapper.Sc.FakeDb.csproj +++ b/Tests/Unit Tests/Glass.Mapper.Sc.FakeDb/Glass.Mapper.Sc.FakeDb.csproj @@ -10,7 +10,8 @@ <FileAlignment>512</FileAlignment> <TargetFrameworkProfile /> <RestorePackages>true</RestorePackages> - <Configurations>Debug;Release;sc100;sc93;sc92;sc91;sc90;sc82;sc81;sc80;sc75;sc72;sc71;sc70;sc101;sc102;Sc103</Configurations> + <Configurations>Debug;Release;sc100;sc93;sc92;sc91;sc90;sc82;sc81;sc80;sc75;sc72;sc71;sc70;sc101;sc102;Sc103;Sc104</Configurations> + <TargetFramework>net48</TargetFramework> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> @@ -21,7 +22,7 @@ <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Sc103|AnyCPU'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Sc104|AnyCPU'"> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> @@ -63,12 +64,13 @@ <Reference Include="System.Xml" /> </ItemGroup> <ItemGroup> + <PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="7.0.0" /> <PackageReference Include="Sitecore.FakeDb" Version="$(ScFakeDBVersion)" /> <PackageReference Include="Sitecore.FakeDb.NSubstitute" Version="$(ScFakeDBVersion)" /> </ItemGroup> <ItemGroup> <PackageReference Include="Sitecore.Kernel" Version="$(ScVersion)" /> - <PackageReference Include="Sitecore.Nexus" Version="$(ScVersion)" Condition="'$(ScVersion)' != '10.2.0' and '$(ScVersion)' != '10.3.0'" /> + <PackageReference Include="Sitecore.Nexus" Version="$(ScVersion)" Condition="'$(ScVersion)' != '10.2.0' and '$(ScVersion)' != '10.3.0' and '$(ScVersion)' != '10.4.0'" /> <PackageReference Include="Sitecore.Analytics" Version="$(ScVersion)" /> <PackageReference Include="Sitecore.Client" Version="$(ScVersion)" /> </ItemGroup> diff --git a/Tests/Unit Tests/Glass.Mapper.Sc.FakeDb/GlassHtmlFixture.cs b/Tests/Unit Tests/Glass.Mapper.Sc.FakeDb/GlassHtmlFixture.cs index 37e6ceffe..a69a83d68 100644 --- a/Tests/Unit Tests/Glass.Mapper.Sc.FakeDb/GlassHtmlFixture.cs +++ b/Tests/Unit Tests/Glass.Mapper.Sc.FakeDb/GlassHtmlFixture.cs @@ -13,7 +13,7 @@ using Glass.Mapper.Sc.Fields; using NSubstitute; using NUnit.Framework; -#if SC90 || SC91 || SC92 || SC93 || SC100 || SC101 || SC102 || SC103 +#if SC90 || SC91 || SC92 || SC93 || SC100 || SC101 || SC102 || SC103 || SC104 using Sitecore.Abstractions; using Sitecore.DependencyInjection; #endif @@ -28,7 +28,7 @@ using Site = System.Security.Policy.Site; -#if SC100 || SC101 || SC102 || SC103 +#if SC100 || SC101 || SC102 || SC103 || SC104 using Sitecore.Links.UrlBuilders; #endif @@ -233,7 +233,7 @@ public void RenderImage_MatchesSitecoreOutput_Issue133() -#if SC90 || SC91 || SC92 || SC93 || SC100 || SC101 || SC102 || SC103 +#if SC90 || SC91 || SC92 || SC93 || SC100 || SC101 || SC102 || SC103 || SC104 var mediaUrlProvider = Substitute.For<BaseMediaManager>(); @@ -342,7 +342,7 @@ public void RenderImage_MatchesSitecoreOutput_Issue133_Test2() var html = GetGlassHtml(service); -#if SC90 || SC91 || SC92 || SC93 || SC100 || SC101 || SC102 || SC103 +#if SC90 || SC91 || SC92 || SC93 || SC100 || SC101 || SC102 || SC103 || SC104 var mediaUrlProvider = Substitute.For<BaseMediaManager>(); @@ -442,7 +442,7 @@ public void RenderImage_MatchesSitecoreOutput_Issue133_Test3() var service = new SitecoreService(database.Database); var html = GetGlassHtml(service); -#if SC90 || SC91 || SC92 || SC93 || SC100 || SC101 || SC102 || SC103 +#if SC90 || SC91 || SC92 || SC93 || SC100 || SC101 || SC102 || SC103 || SC104 var mediaUrlProvider = Substitute.For<BaseMediaManager>(); @@ -3206,7 +3206,7 @@ public void RenderLink_UrlContainsTwoQuestionMarks_ReturnsAValidUrl() Assert.AreEqual(expected, result); } -#if SC90 || SC91 || SC92 || SC93 || SC100 || SC101 || SC102 || SC103 +#if SC90 || SC91 || SC92 || SC93 || SC100 || SC101 || SC102 || SC103 || SC104 [Test] public void RenderLink_BlankTarget_AddsNoOpener() { diff --git a/Tests/Unit Tests/Glass.Mapper.Sc.FakeDb/Infrastructure/Pipelines/RenderField/RenderWebEdit.cs b/Tests/Unit Tests/Glass.Mapper.Sc.FakeDb/Infrastructure/Pipelines/RenderField/RenderWebEdit.cs index 4a340c831..f99fe9d16 100644 --- a/Tests/Unit Tests/Glass.Mapper.Sc.FakeDb/Infrastructure/Pipelines/RenderField/RenderWebEdit.cs +++ b/Tests/Unit Tests/Glass.Mapper.Sc.FakeDb/Infrastructure/Pipelines/RenderField/RenderWebEdit.cs @@ -66,7 +66,7 @@ public void Process(RenderFieldArgs args) private bool CanEditField(Field field) { Assert.ArgumentNotNull((object)field, "field"); -#if SC93 || SC100 || SC101 || SC102 || SC103 +#if SC93 || SC100 || SC101 || SC102 || SC103 || SC104 return true; #else @@ -103,7 +103,7 @@ private bool CanWebEdit(RenderFieldArgs args) return site != null && site.DisplayMode == DisplayMode.Edit && (!(WebUtil.GetQueryString("sc_duration") == "temporary") -#if SC82 || SC90 || SC91 || SC92 || SC93 || SC100 || SC101 || SC102 || SC103 +#if SC82 || SC90 || SC91 || SC92 || SC93 || SC100 || SC101 || SC102 || SC103 || SC104 && Sitecore.Context.PageMode.IsExperienceEditorEditing); #else && Sitecore.Context.PageMode.IsPageEditorEditing); @@ -170,7 +170,7 @@ private void RenderWrappedField(HtmlTextWriter output, RenderFieldArgs args, Fie str =GetDefaultText(args); } this.AddParameters(fieldTag, args); -#if !SC93 && !SC100 && !SC101 && !SC102 && !SC103 +#if !SC93 && !SC100 && !SC101 && !SC102 && !SC103 && !SC104 if (args.FieldTypeKey.ToLowerInvariant() == "word document" && args.Parameters["editormode"] == "inline") ApplyWordFieldStyle(fieldTag, args); #endif @@ -267,7 +267,7 @@ private static string GetFieldDisplayName(RenderFieldArgs args) return args.FieldName; } -#if !SC93 && !SC100 && !SC101 && !SC102 && !SC103 //removed in SC93 & SC100 +#if !SC93 && !SC100 && !SC101 && !SC102 && !SC103 && !SC104 //removed in SC93 & SC100 /// <summary>Gets the word style string.</summary> /// <param name="tag">The tag.</param> diff --git a/Tests/Unit Tests/Glass.Mapper.Sc.FakeDb/ScVersionTest.cs b/Tests/Unit Tests/Glass.Mapper.Sc.FakeDb/ScVersionTest.cs index 8f90781d8..7ceaca2ae 100644 --- a/Tests/Unit Tests/Glass.Mapper.Sc.FakeDb/ScVersionTest.cs +++ b/Tests/Unit Tests/Glass.Mapper.Sc.FakeDb/ScVersionTest.cs @@ -76,11 +76,17 @@ public void Sc102() } #endif -#if SC102 +#if SC103 public void Sc103() { Assert.True(true); } +#endif +#if SC104 + public void Sc104() + { + Assert.True(true); + } #endif } } diff --git a/Tests/Unit Tests/Glass.Mapper.Sc.Mvc.Tests/Glass.Mapper.Sc.Mvc.Tests.csproj b/Tests/Unit Tests/Glass.Mapper.Sc.Mvc.Tests/Glass.Mapper.Sc.Mvc.Tests.csproj index c1e0a345a..e2acb87fc 100644 --- a/Tests/Unit Tests/Glass.Mapper.Sc.Mvc.Tests/Glass.Mapper.Sc.Mvc.Tests.csproj +++ b/Tests/Unit Tests/Glass.Mapper.Sc.Mvc.Tests/Glass.Mapper.Sc.Mvc.Tests.csproj @@ -10,7 +10,8 @@ <FileAlignment>512</FileAlignment> <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir> <RestorePackages>true</RestorePackages> - <Configurations>Debug;Release;sc100;sc93;sc92;sc91;sc90;sc82;sc81;sc80;sc75;sc72;sc71;sc70;sc101;sc102;Sc103</Configurations> + <Configurations>Debug;Release;sc100;sc93;sc92;sc91;sc90;sc82;sc81;sc80;sc75;sc72;sc71;sc70;sc101;sc102;Sc103;Sc104</Configurations> + <TargetFramework>net48</TargetFramework> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> @@ -21,7 +22,7 @@ <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Sc103|AnyCPU'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Sc104|AnyCPU'"> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> @@ -55,8 +56,8 @@ </ItemGroup> <ItemGroup> <PackageReference Include="Sitecore.Kernel" Version="$(ScVersion)" /> + <PackageReference Include="Sitecore.Nexus" Version="$(ScVersion)" Condition="'$(ScVersion)' != '10.2.0' and '$(ScVersion)' != '10.3.0' and '$(ScVersion)' != '10.4.0'" /> <PackageReference Include="Sitecore.Mvc" Version="$(ScVersion)" /> - <PackageReference Include="Sitecore.Nexus" Version="$(ScVersion)" Condition="'$(ScVersion)' != '10.2.0' and '$(ScVersion)' != '10.3.0'" /> </ItemGroup> <ItemGroup Condition="'$(IncludeContentExtractionDll)' == 'true'"> <PackageReference Include="Sitecore.ContentSearch.ContentExtraction" Version="$(ScVersion)" /> diff --git a/Tests/Unit Tests/Glass.Mapper.Sc.V5.Tests/Glass.Mapper.Sc.V5.Tests.csproj b/Tests/Unit Tests/Glass.Mapper.Sc.V5.Tests/Glass.Mapper.Sc.V5.Tests.csproj index 7d07d4e19..419739f89 100644 --- a/Tests/Unit Tests/Glass.Mapper.Sc.V5.Tests/Glass.Mapper.Sc.V5.Tests.csproj +++ b/Tests/Unit Tests/Glass.Mapper.Sc.V5.Tests/Glass.Mapper.Sc.V5.Tests.csproj @@ -10,7 +10,8 @@ <FileAlignment>512</FileAlignment> <TargetFrameworkProfile /> <RestorePackages>true</RestorePackages> - <Configurations>Debug;Release;sc100;sc93;sc92;sc91;sc90;sc82;sc81;sc80;sc75;sc72;sc71;sc70;sc101;sc102;Sc103</Configurations> + <Configurations>Debug;Release;sc100;sc93;sc92;sc91;sc90;sc82;sc81;sc80;sc75;sc72;sc71;sc70;sc101;sc102;Sc103;Sc104</Configurations> + <TargetFramework>net48</TargetFramework> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> @@ -21,7 +22,7 @@ <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Sc103|AnyCPU'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Sc104|AnyCPU'"> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> @@ -56,7 +57,7 @@ </ItemGroup> <ItemGroup> <PackageReference Include="Sitecore.Kernel" Version="$(ScVersion)" /> - <PackageReference Include="Sitecore.Nexus" Version="$(ScVersion)" Condition="'$(ScVersion)' != '10.2.0' and '$(ScVersion)' != '10.3.0'" /> + <PackageReference Include="Sitecore.Nexus" Version="$(ScVersion)" Condition="'$(ScVersion)' != '10.2.0' and '$(ScVersion)' != '10.3.0' and '$(ScVersion)' != '10.4.0'" /> <PackageReference Include="Sitecore.Analytics" Version="$(ScVersion)" /> <PackageReference Include="Sitecore.Client" Version="$(ScVersion)" /> </ItemGroup> diff --git a/Tests/Unit Tests/Glass.Mapper.Sc.WebForms.FakeDb/Glass.Mapper.Sc.WebForms.FakeDb.csproj b/Tests/Unit Tests/Glass.Mapper.Sc.WebForms.FakeDb/Glass.Mapper.Sc.WebForms.FakeDb.csproj index de726db06..8af4f17b3 100644 --- a/Tests/Unit Tests/Glass.Mapper.Sc.WebForms.FakeDb/Glass.Mapper.Sc.WebForms.FakeDb.csproj +++ b/Tests/Unit Tests/Glass.Mapper.Sc.WebForms.FakeDb/Glass.Mapper.Sc.WebForms.FakeDb.csproj @@ -8,7 +8,8 @@ <RootNamespace>Glass.Mapper.Sc.WebForms.FakeDb</RootNamespace> <AssemblyName>Glass.Mapper.Sc.WebForms.FakeDb</AssemblyName> <FileAlignment>512</FileAlignment> - <Configurations>Debug;Release;sc100;sc93;sc92;sc91;sc90;sc82;sc81;sc80;sc75;sc72;sc71;sc70;sc101;sc102;Sc103</Configurations> + <Configurations>Debug;Release;sc100;sc93;sc92;sc91;sc90;sc82;sc81;sc80;sc75;sc72;sc71;sc70;sc101;sc102;Sc103;Sc104</Configurations> + <TargetFramework>net48</TargetFramework> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> @@ -19,7 +20,7 @@ <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Sc103|AnyCPU'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Sc104|AnyCPU'"> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> @@ -54,7 +55,7 @@ </ItemGroup> <ItemGroup> <PackageReference Include="Sitecore.Kernel" Version="$(ScVersion)" /> - <PackageReference Include="Sitecore.Nexus" Version="$(ScVersion)" Condition="'$(ScVersion)' != '10.2.0' and '$(ScVersion)' != '10.3.0'" /> + <PackageReference Include="Sitecore.Nexus" Version="$(ScVersion)" Condition="'$(ScVersion)' != '10.2.0' and '$(ScVersion)' != '10.3.0' and '$(ScVersion)' != '10.4.0'" /> </ItemGroup> <ItemGroup Condition="'$(IncludeContentExtractionDll)' == 'true'"> <PackageReference Include="Sitecore.ContentSearch.ContentExtraction" Version="$(ScVersion)" /> diff --git a/Tests/Unit Tests/Glass.Mapper.Tests/Glass.Mapper.Tests.csproj b/Tests/Unit Tests/Glass.Mapper.Tests/Glass.Mapper.Tests.csproj index 4a466d686..4a03d611e 100644 --- a/Tests/Unit Tests/Glass.Mapper.Tests/Glass.Mapper.Tests.csproj +++ b/Tests/Unit Tests/Glass.Mapper.Tests/Glass.Mapper.Tests.csproj @@ -12,8 +12,9 @@ <FileAlignment>512</FileAlignment> <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\..\</SolutionDir> <RestorePackages>true</RestorePackages> - <Configurations>Debug;Release;sc100;sc93;sc92;sc91;sc90;sc82;sc81;sc80;sc75;sc72;sc71;sc70;sc101;sc102;Sc103</Configurations> + <Configurations>Debug;Release;sc100;sc93;sc92;sc91;sc90;sc82;sc81;sc80;sc75;sc72;sc71;sc70;sc101;sc102;Sc103;Sc104</Configurations> <TargetFrameworkProfile /> + <TargetFramework>net48</TargetFramework> </PropertyGroup> <Import Project="$(SolutionDir)CommonSettings.targets" /> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> @@ -25,7 +26,7 @@ <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Sc103|AnyCPU'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Sc104|AnyCPU'"> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize>