A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More.
AI OnAI Off
A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More.
I think there might be a bug in the Visual Studio tools for Episerver, which doesn't allow to initialize/update episerver database when User Secrets for project are enabled. I have come up with reproduction scenario.
<appSettings configBuilders="Secrets">Update-EPiDatabaseepideploy.exe :At C:\Development\EPiServer\Secrets\AlloySecrets\packages\EPiServer.Framework.11.16.0\tools\upgrade.psm1:263 char:3+ &$epideploy -a "sql" -s $sitePath -p $sqlFilePattern -c $c ...+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+ CategoryInfo : NotSpecified: (:String) [], RemoteException+ FullyQualifiedErrorId : NativeCommandErrorEPiDeploy was stopped due to an exception, more details:System.Configuration.ConfigurationErrorsException: An error occurred loading a configuration file: Could not load file or assembly 'Microsoft.Configuration.ConfigurationBuilders.UserSecrets, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. (C:\Development\EPiServer\Secrets\AlloySecrets\AlloySecrets\web.config line 21) ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Configuration.ConfigurationBuilders.UserSecrets, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies.The system cannot find the file specified.at System.Configuration.TypeUtil.GetTypeImpl(String typeString, Boolean throwOnError)at System.Configuration.ConfigurationBuildersSection.InstantiateBuilder(ProviderSettings ps)at System.Configuration.ConfigurationBuildersSection.GetBuilderFromName(String builderName)at System.Configuration.BaseConfigurationRecord.GetSectionXmlReader(String[] keys, SectionInput input)--- End of inner exception stack trace ---at System.Configuration.BaseConfigurationRecord.EvaluateOne(String[] keys, SectionInput input, Boolean isTrusted, FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult)at System.Configuration.BaseConfigurationRecord.Evaluate(FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult, Boolean getLkg, Boolean getRuntimeObject, Object&result, Object& resultRuntimeObject)at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject)at System.Configuration.Configuration.get_AppSettings()at EPiDeploy.Deploy.ReadAllowedActionsFromConfig(String theWebConfigPath)at EPiDeploy.Deploy.HandleActionType(Options options, String theWebConfigPath)at EPiDeploy.Deploy.Run(Options options)at EPiDeploy.Program.Main(String[] args)Expected behavior: script should run without errors.
Workarounds:
configBuilders="Secrets"attribute from<appSettings>nodecreateDatabaseSchema="true"attribute to<episerver.framework>node to create schema on application start