Skip to content

Commit 5868052

Browse files
authored
Merge pull request #64 from umbraco/v11/bugfix/compatibility-issue
Umbraco 11 test site; Hubspot - fix compatibility issue and update targeting frameworks
2 parents abe03a1 + 156342e commit 5868052

9 files changed

+291
-8
lines changed

src/Umbraco.Cms.Integrations.Crm.Hubspot/HubspotComposer.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
namespace Umbraco.Cms.Integrations.Crm.Hubspot
1515
{
16-
public class HubspotComposer : IUserComposer
16+
public class HubspotComposer : IComposer
1717
{
1818
#if NETCOREAPP
1919
public void Compose(IUmbracoBuilder builder)

src/Umbraco.Cms.Integrations.Crm.Hubspot/Umbraco.Cms.Integrations.Crm.Hubspot.csproj

+18-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>net472;net50</TargetFrameworks>
3+
<TargetFrameworks>net472;net50;net60;net70</TargetFrameworks>
44
</PropertyGroup>
55

66
<PropertyGroup>
@@ -10,21 +10,33 @@
1010
<PackageIconUrl></PackageIconUrl>
1111
<PackageProjectUrl>https://github.com/umbraco/Umbraco.Cms.Integrations/blob/main/src/Umbraco.Cms.Integrations.Crm.Hubspot</PackageProjectUrl>
1212
<RepositoryUrl>https://github.com/umbraco/Umbraco.Cms.Integrations</RepositoryUrl>
13-
<Version>1.1.5</Version>
13+
<Version>1.1.6</Version>
1414
<Authors>Umbraco HQ</Authors>
1515
<Company>Umbraco</Company>
1616
<PackageTags>Umbraco;Umbraco-Marketplace</PackageTags>
1717
<PackageIcon>hubspot.png</PackageIcon>
1818
</PropertyGroup>
1919

2020
<ItemGroup Condition="'$(TargetFramework)' == 'net472'">
21-
<PackageReference Include="UmbracoCms.Web" version="8.4.0" />
21+
<PackageReference Include="UmbracoCms.Web" version="[8.4.0, 9)" />
2222
</ItemGroup>
2323

2424
<ItemGroup Condition="'$(TargetFramework)' == 'net50'">
25-
<PackageReference Include="Umbraco.Cms.Web.Website" version="9.0.1" />
26-
<PackageReference Include="Umbraco.Cms.Web.BackOffice" version="9.0.1" />
27-
<PackageReference Include="Umbraco.Cms.Web.Common" version="9.0.1" />
25+
<PackageReference Include="Umbraco.Cms.Web.Website" version="[9.0.1,10)" />
26+
<PackageReference Include="Umbraco.Cms.Web.BackOffice" version="[9.0.1,10)" />
27+
<PackageReference Include="Umbraco.Cms.Web.Common" version="[9.0.1,10)" />
28+
</ItemGroup>
29+
30+
<ItemGroup Condition="'$(TargetFramework)' == 'net60'">
31+
<PackageReference Include="Umbraco.Cms.Web.Website" version="[10.0.0,11)" />
32+
<PackageReference Include="Umbraco.Cms.Web.BackOffice" version="[10.0.0,11)" />
33+
<PackageReference Include="Umbraco.Cms.Web.Common" version="[10.0.0,11)" />
34+
</ItemGroup>
35+
36+
<ItemGroup Condition="'$(TargetFramework)' == 'net70'">
37+
<PackageReference Include="Umbraco.Cms.Web.Website" version="[11.0.0,12)" />
38+
<PackageReference Include="Umbraco.Cms.Web.BackOffice" version="[11.0.0,12)" />
39+
<PackageReference Include="Umbraco.Cms.Web.Common" version="[11.0.0,12)" />
2840
</ItemGroup>
2941

3042
<ItemGroup>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
namespace Umbraco.Cms.Integrations.Testsite.V11
2+
{
3+
public class Program
4+
{
5+
public static void Main(string[] args)
6+
=> CreateHostBuilder(args)
7+
.Build()
8+
.Run();
9+
10+
public static IHostBuilder CreateHostBuilder(string[] args) =>
11+
Host.CreateDefaultBuilder(args)
12+
#if DEBUG
13+
.ConfigureAppConfiguration(config =>
14+
config.AddJsonFile(
15+
"appsettings.Local.json",
16+
optional: true,
17+
reloadOnChange: true))
18+
#endif
19+
.ConfigureUmbracoDefaults()
20+
.ConfigureWebHostDefaults(webBuilder =>
21+
{
22+
webBuilder.UseStaticWebAssets();
23+
webBuilder.UseStartup<Startup>();
24+
});
25+
}
26+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"$schema": "https://json.schemastore.org/launchsettings.json",
3+
"iisSettings": {
4+
"windowsAuthentication": false,
5+
"anonymousAuthentication": true,
6+
"iisExpress": {
7+
"applicationUrl": "http://localhost:15123",
8+
"sslPort": 44321
9+
}
10+
},
11+
"profiles": {
12+
"IIS Express": {
13+
"commandName": "IISExpress",
14+
"launchBrowser": true,
15+
"environmentVariables": {
16+
"ASPNETCORE_ENVIRONMENT": "Development"
17+
}
18+
},
19+
"Umbraco.Web.UI": {
20+
"commandName": "Project",
21+
"dotnetRunMessages": true,
22+
"launchBrowser": true,
23+
"applicationUrl": "https://localhost:44321;http://localhost:15123",
24+
"environmentVariables": {
25+
"ASPNETCORE_ENVIRONMENT": "Development"
26+
}
27+
}
28+
}
29+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
namespace Umbraco.Cms.Integrations.Testsite.V11
2+
{
3+
public class Startup
4+
{
5+
private readonly IWebHostEnvironment _env;
6+
private readonly IConfiguration _config;
7+
8+
/// <summary>
9+
/// Initializes a new instance of the <see cref="Startup" /> class.
10+
/// </summary>
11+
/// <param name="webHostEnvironment">The web hosting environment.</param>
12+
/// <param name="config">The configuration.</param>
13+
/// <remarks>
14+
/// Only a few services are possible to be injected here https://github.com/dotnet/aspnetcore/issues/9337.
15+
/// </remarks>
16+
public Startup(IWebHostEnvironment webHostEnvironment, IConfiguration config)
17+
{
18+
_env = webHostEnvironment ?? throw new ArgumentNullException(nameof(webHostEnvironment));
19+
_config = config ?? throw new ArgumentNullException(nameof(config));
20+
}
21+
22+
/// <summary>
23+
/// Configures the services.
24+
/// </summary>
25+
/// <param name="services">The services.</param>
26+
/// <remarks>
27+
/// This method gets called by the runtime. Use this method to add services to the container.
28+
/// For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940.
29+
/// </remarks>
30+
public void ConfigureServices(IServiceCollection services)
31+
{
32+
services.AddUmbraco(_env, _config)
33+
.AddBackOffice()
34+
.AddWebsite()
35+
.AddComposers()
36+
.Build();
37+
}
38+
39+
/// <summary>
40+
/// Configures the application.
41+
/// </summary>
42+
/// <param name="app">The application builder.</param>
43+
/// <param name="env">The web hosting environment.</param>
44+
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
45+
{
46+
if (env.IsDevelopment())
47+
{
48+
app.UseDeveloperExceptionPage();
49+
}
50+
51+
app.UseUmbraco()
52+
.WithMiddleware(u =>
53+
{
54+
u.UseBackOffice();
55+
u.UseWebsite();
56+
})
57+
.WithEndpoints(u =>
58+
{
59+
u.UseInstallerEndpoints();
60+
u.UseBackOfficeEndpoints();
61+
u.UseWebsiteEndpoints();
62+
});
63+
}
64+
}
65+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
<Project Sdk="Microsoft.NET.Sdk.Web">
2+
<PropertyGroup>
3+
<TargetFramework>net7.0</TargetFramework>
4+
<ImplicitUsings>enable</ImplicitUsings>
5+
<Nullable>enable</Nullable>
6+
</PropertyGroup>
7+
<ItemGroup>
8+
<Content Include="App_Plugins\UmbracoCms.Integrations\Crm\Hubspot\css\styles.css">
9+
<PackagePath>App_Plugins\UmbracoCms.Integrations\Crm\Hubspot\</PackagePath>
10+
<Pack>true</Pack>
11+
</Content>
12+
<Content Include="App_Plugins\UmbracoCms.Integrations\Crm\Hubspot\js\formpicker.controller.js">
13+
<PackagePath>App_Plugins\UmbracoCms.Integrations\Crm\Hubspot\</PackagePath>
14+
<Pack>true</Pack>
15+
</Content>
16+
<Content Include="App_Plugins\UmbracoCms.Integrations\Crm\Hubspot\js\hubspot.resource.js">
17+
<PackagePath>App_Plugins\UmbracoCms.Integrations\Crm\Hubspot\</PackagePath>
18+
<Pack>true</Pack>
19+
</Content>
20+
<Content Include="App_Plugins\UmbracoCms.Integrations\Crm\Hubspot\js\hubspot.service.js">
21+
<PackagePath>App_Plugins\UmbracoCms.Integrations\Crm\Hubspot\</PackagePath>
22+
<Pack>true</Pack>
23+
</Content>
24+
<Content Include="App_Plugins\UmbracoCms.Integrations\Crm\Hubspot\js\hubspotauthorization.directive.js">
25+
<PackagePath>App_Plugins\UmbracoCms.Integrations\Crm\Hubspot\</PackagePath>
26+
<Pack>true</Pack>
27+
</Content>
28+
<Content Include="App_Plugins\UmbracoCms.Integrations\Crm\Hubspot\js\settings.controller.js">
29+
<PackagePath>App_Plugins\UmbracoCms.Integrations\Crm\Hubspot\</PackagePath>
30+
<Pack>true</Pack>
31+
</Content>
32+
<Content Include="App_Plugins\UmbracoCms.Integrations\Crm\Hubspot\package.manifest">
33+
<PackagePath>App_Plugins\UmbracoCms.Integrations\Crm\Hubspot\</PackagePath>
34+
<Pack>true</Pack>
35+
</Content>
36+
<Content Include="App_Plugins\UmbracoCms.Integrations\Crm\Hubspot\Render\HubspotForm.cshtml">
37+
<PackagePath>App_Plugins\UmbracoCms.Integrations\Crm\Hubspot\</PackagePath>
38+
<Pack>true</Pack>
39+
</Content>
40+
<Content Include="App_Plugins\UmbracoCms.Integrations\Crm\Hubspot\Render\HubspotFormV9.cshtml">
41+
<PackagePath>App_Plugins\UmbracoCms.Integrations\Crm\Hubspot\</PackagePath>
42+
<Pack>true</Pack>
43+
</Content>
44+
<Content Include="App_Plugins\UmbracoCms.Integrations\Crm\Hubspot\views\formpicker.html">
45+
<PackagePath>App_Plugins\UmbracoCms.Integrations\Crm\Hubspot\</PackagePath>
46+
<Pack>true</Pack>
47+
</Content>
48+
<Content Include="App_Plugins\UmbracoCms.Integrations\Crm\Hubspot\views\formpickereditor.html">
49+
<PackagePath>App_Plugins\UmbracoCms.Integrations\Crm\Hubspot\</PackagePath>
50+
<Pack>true</Pack>
51+
</Content>
52+
<Content Include="App_Plugins\UmbracoCms.Integrations\Crm\Hubspot\views\settings.html">
53+
<PackagePath>App_Plugins\UmbracoCms.Integrations\Crm\Hubspot\</PackagePath>
54+
<Pack>true</Pack>
55+
</Content>
56+
</ItemGroup>
57+
58+
<ItemGroup>
59+
<PackageReference Include="Umbraco.Cms" Version="11.0.0" />
60+
</ItemGroup>
61+
62+
<ItemGroup>
63+
<!-- Opt-in to app-local ICU to ensure consistent globalization APIs across different platforms -->
64+
<PackageReference Include="Microsoft.ICU.ICU4C.Runtime" Version="68.2.0.9" />
65+
<ProjectReference Include="..\Umbraco.Cms.Integrations.Crm.Hubspot\Umbraco.Cms.Integrations.Crm.Hubspot.csproj" />
66+
<RuntimeHostConfigurationOption Include="System.Globalization.AppLocalIcu" Value="68.2.0.9" Condition="$(RuntimeIdentifier.StartsWith('linux')) or $(RuntimeIdentifier.StartsWith('win')) or ('$(RuntimeIdentifier)' == '' and !$([MSBuild]::IsOSPlatform('osx')))" />
67+
</ItemGroup>
68+
69+
<PropertyGroup>
70+
<!-- Razor files are needed for the backoffice to work correctly -->
71+
<CopyRazorGenerateFilesToPublishDirectory>true</CopyRazorGenerateFilesToPublishDirectory>
72+
</PropertyGroup>
73+
74+
<PropertyGroup>
75+
<!-- Remove RazorCompileOnBuild and RazorCompileOnPublish when not using ModelsMode InMemoryAuto -->
76+
<RazorCompileOnBuild>false</RazorCompileOnBuild>
77+
<RazorCompileOnPublish>false</RazorCompileOnPublish>
78+
</PropertyGroup>
79+
80+
</Project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"$schema": "appsettings-schema.json",
3+
"Serilog": {
4+
"MinimumLevel": {
5+
"Default": "Information"
6+
},
7+
"WriteTo": [
8+
{
9+
"Name": "Async",
10+
"Args": {
11+
"configure": [
12+
{
13+
"Name": "Console"
14+
}
15+
]
16+
}
17+
}
18+
]
19+
},
20+
"Umbraco": {
21+
"CMS": {
22+
"Content": {
23+
"MacroErrors": "Throw"
24+
},
25+
"Hosting": {
26+
"Debug": true
27+
},
28+
"RuntimeMinification": {
29+
"UseInMemoryCache": true,
30+
"CacheBuster": "Timestamp"
31+
}
32+
}
33+
}
34+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"$schema": "appsettings-schema.json",
3+
"Serilog": {
4+
"MinimumLevel": {
5+
"Default": "Information",
6+
"Override": {
7+
"Microsoft": "Warning",
8+
"Microsoft.Hosting.Lifetime": "Information",
9+
"System": "Warning"
10+
}
11+
}
12+
},
13+
"Umbraco": {
14+
"CMS": {
15+
"Global": {
16+
"Id": "8c8fb050-efbf-44ed-a170-6ad6e34069b5",
17+
"SanitizeTinyMce": true
18+
},
19+
"Content": {
20+
"AllowEditInvariantFromNonDefault": true,
21+
"ContentVersionCleanupPolicy": {
22+
"EnableCleanup": true
23+
}
24+
}
25+
}
26+
},
27+
"ConnectionStrings": {
28+
"umbracoDbDSN": "Data Source=|DataDirectory|/Umbraco.sqlite.db;Cache=Shared;Foreign Keys=True;Pooling=True",
29+
"umbracoDbDSN_ProviderName": "Microsoft.Data.Sqlite"
30+
}
31+
}

src/Umbraco.Cms.Integrations.sln

+7-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,9 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Search", "Search", "{F56605
6767
EndProject
6868
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Algolia", "Algolia", "{F2CAA1F7-9BED-4EB6-8875-D176B92D393A}"
6969
EndProject
70-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Umbraco.Cms.Integrations.Search.Algolia", "Umbraco.Cms.Integrations.Search.Algolia\Umbraco.Cms.Integrations.Search.Algolia.csproj", "{54A624E5-5321-4CC8-B74B-11ABF3605242}"
70+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Umbraco.Cms.Integrations.Search.Algolia", "Umbraco.Cms.Integrations.Search.Algolia\Umbraco.Cms.Integrations.Search.Algolia.csproj", "{54A624E5-5321-4CC8-B74B-11ABF3605242}"
71+
EndProject
72+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Umbraco.Cms.Integrations.Testsite.V11", "Umbraco.Cms.Integrations.Testsite.V11\Umbraco.Cms.Integrations.Testsite.V11.csproj", "{C3A51214-F058-4864-B0B2-4F788383A5EC}"
7173
EndProject
7274
Global
7375
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -131,6 +133,10 @@ Global
131133
{54A624E5-5321-4CC8-B74B-11ABF3605242}.Debug|Any CPU.Build.0 = Debug|Any CPU
132134
{54A624E5-5321-4CC8-B74B-11ABF3605242}.Release|Any CPU.ActiveCfg = Release|Any CPU
133135
{54A624E5-5321-4CC8-B74B-11ABF3605242}.Release|Any CPU.Build.0 = Release|Any CPU
136+
{C3A51214-F058-4864-B0B2-4F788383A5EC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
137+
{C3A51214-F058-4864-B0B2-4F788383A5EC}.Debug|Any CPU.Build.0 = Debug|Any CPU
138+
{C3A51214-F058-4864-B0B2-4F788383A5EC}.Release|Any CPU.ActiveCfg = Release|Any CPU
139+
{C3A51214-F058-4864-B0B2-4F788383A5EC}.Release|Any CPU.Build.0 = Release|Any CPU
134140
EndGlobalSection
135141
GlobalSection(SolutionProperties) = preSolution
136142
HideSolutionNode = FALSE

0 commit comments

Comments
 (0)