Skip to content

Commit f63b380

Browse files
author
Paul Johnson
committed
Added workaround for net6 AddEnvironmentVariables(prefix) bug.
1 parent e4184e8 commit f63b380

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

src/Directory.Build.props

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<Project>
22
<PropertyGroup>
3-
<AssemblyVersion>4.0.0</AssemblyVersion>
4-
<InformationalVersion>4.0.0</InformationalVersion>
5-
<FileVersion>4.0.0.0</FileVersion>
3+
<AssemblyVersion>4.0.1</AssemblyVersion>
4+
<InformationalVersion>4.0.1</InformationalVersion>
5+
<FileVersion>4.0.1.0</FileVersion>
66
<NeutralLanguage>en-US</NeutralLanguage>
77
<Company>Umbraco</Company>
88
<Copyright>Copyright © Umbraco 2021</Copyright>

src/Umbraco.Cloud.StorageProviders.AzureBlob/AzureBlobComposer.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,13 @@ public void Compose(IUmbracoBuilder builder)
1919
{
2020
if (builder == null) throw new ArgumentNullException(nameof(builder));
2121

22+
/* There's a bug in Microsoft.Extensions.Configuration.EnvironmentVariables @ 6.0.0 WRT env var normalization + AddEnvironmentVariables(prefix)
23+
* See https://github.com/dotnet/runtime/pull/62916, should be resolved upstream in https://github.com/dotnet/runtime/milestone/87
24+
* Until then, safest thing to do is explicitly add environment variables using both prefixes.
25+
* (otherwise there are issues when folks update TFM to net6) */
2226
var configuration = new ConfigurationBuilder()
2327
.AddEnvironmentVariables("Umbraco:Cloud:")
28+
.AddEnvironmentVariables("Umbraco__Cloud__")
2429
.Build();
2530

2631
// Get options and manually validate (no need to add them to the service collection)

0 commit comments

Comments
 (0)