web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Copilot Studio / Need Microsoft Bot Fra...
Copilot Studio
Unanswered

Need Microsoft Bot Framework deprecated function Fix

(0) ShareShare
ReportReport
Posted on by

Hi, I am facing an issue with Microsoft Bot Framework.

I'm working with a legacy project built on dotnetcore3.1 and Microsoft.Bot.Builder Framework 4.8.3. Right now, I'm trying to upgrade the vulnerable packages detected by our Code Scan Tool.

 

When upgrading to higher versions of Microsoft.Bot.Builder (beyond 4.8.3), I encounter DialogManager class is marked as "Obsolete" and hence it cannot be instantiated.

 

I am looking for a fix which needs to be implemented for this class.

Can someone please help me find out the documentation or implementation (in a sample project) for this.

Here's the code:

 

Snippet 1(calling the function where error pops up)

private void LoadRootDialogAsync()

{

try

{

var rootDialogName = this.Configuration.GetSection("rootDialogName").Get<string>();

var rootFile = this.resourceExplorer.GetResource(rootDialogName);

var rootDialog = this.resourceExplorer.LoadType<Dialog>(rootFile);

this.dialogManager = new DialogManager(rootDialog)

.UseResourceExplorer(this.resourceExplorer)

.UseLanguageGeneration();

}

Decompiled dll in Visual Studio

namespace Microsoft.Bot.Builder.Dialogs

{

    /// <summary>

    /// Class which runs the dialog system.

    /// </summary>

    [Obsolete("This class will be deprecated in the next version of the Bot Framework SDK.")]

    public class DialogManager

    {

        private const string LastAccess = "_lastAccess";

        private string _rootDialogId;

        private readonly string _dialogStateProperty;

        /// <summary>

        /// Initializes a new instance of the <see cref="DialogManager"/> class.

        /// </summary>

        /// <param name="rootDialog">Root dialog to use.</param>

        /// <param name="dialogStateProperty">alternate name for the dialogState property. (Default is "DialogState").</param>

        public DialogManager(Dialog rootDialog = null, string dialogStateProperty = null)

        {

            if (rootDialog != null)

            {

                RootDialog = rootDialog;

            }

            _dialogStateProperty = dialogStateProperty ?? "DialogState";

        }

Categories:
I have the same question (0)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Copilot Studio

#1
Valantis Profile Picture

Valantis 796

#2
Vish WR Profile Picture

Vish WR 335

#3
Haque Profile Picture

Haque 278

Last 30 days Overall leaderboard