接続文字列の暗号化でエラーが発生する


解説

Sitecore XP 9.3 Initial Releaseで、Sitecore XP 9.2 Initial Release向けの手順を実行して、\App_Config\ConnectionStrings.configファイルからの接続文字列を暗号化しようとすると、失敗する場合があります。 この場合、ログに次のようなエラーが記録されることがあります。

Microsoft (R) ASP.NET RegIIS version 4.0.30319.0
Administration utility to install and uninstall ASP.NET on the local machine.
Copyright (C) Microsoft Corporation. All rights reserved.
Encrypting configuration section...
An error occurred loading a configuration file: Could not load file or assembly 'Microsoft.Configuration.ConfigurationBuilders.Environment, Version=1.0.0.0, Culture=neutral' or one of its dependencies. The system cannot find the file specified. (F:\website\som-dev.rightpoint.com\App_Config\ConnectionStrings.config)

Could not load file or assembly 'Microsoft.Configuration.ConfigurationBuilders.Environment, Version=1.0.0.0, Culture=neutral' or one of its dependencies. The system cannot find the file specified.

Sitecore XP 9.3.0から、マイクロソフトの構成ビルダー機能が標準で使用されるようになり、より柔軟な設定が可能になりました(https://docs.microsoft.com/ja-jp/aspnet/config-builder)。
しかし、ASPNET_REGIISツールがDLLファイルの欠落により正常に動作しないため、このエラーが発生します。

解決策

Microsoft.Configuration.ConfigurationBuilders.Environment.dllMicrosoft.Configuration.ConfigurationBuilders.Base.dll をSitecore XPの\binフォルダーから C:\Windows\Microsoft.NET\Framework64\<version>フォルダーにコピーすると、この問題を解決することができます。

本件につきましてご不明な点がございましたら、Microsoft社のサポート窓口までお問い合わせください。