Completed
Last Updated: 17 Nov 2022 12:53 by ADMIN
n/a
Created on: 14 Sep 2022 12:09
Category: Installer and VS Extensions
Type: Bug Report
0
Upgrade Project Wizard crashes

The Upgrade (Project) Wizard crashes on the screen where it askes whether to use a backup.

The "Show me more" link gives this:

The wizard encountered an error while trying to handle user event.

System.NullReferenceException: Object reference not set to an instance of an object.
   at Telerik.Blazor.VSX.Wizards.ViewModels.UpgradeProjectWizardOptionsViewModel.GetInitialSelectedDirectory()
   at Telerik.VSX.Wizards.UpgradeProjectWizardOptions`2.GetPropertyValue(String propertyName)
   at Telerik.VSX.WizardEngine.Controls.WizardControlBase.PopulateCollectedValues(IPropertyDataDictionary gatheredData)
   at Telerik.VSX.WizardFramework.Pages.DynamicPageController.GetData()
   at Telerik.WizardFramework.Wizard.GetCurrentPageData()
   at Telerik.WizardFramework.Wizard.OnMoveNext()
   at Telerik.WizardEngine.Helpers.EventHelper.CatchExceptionAndSendReport(Action action)

 

I cannot continue to the next page. I want to upgrade the existing 3.5 to 3.6

7 comments
ADMIN
Nikola
Posted on: 27 Sep 2022 05:40

Hi Noel,

Thank you for the additional information.

I'll add that to the backlog item we already have so we explore different scenarios which may produce the same outcome. Please follow the extension page mentioned previously for updates on the release of this fix.

In case you have any other questions, please get back to us.

Regards,
Nikola
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

n/a
Posted on: 21 Sep 2022 08:58
It's a .Net 6 Blazor project, using the new, minimal project style. So (almost) no files are referenced in the csproj file (the one file referenced is a "link" to another location, to a "stylecop.json"). No Pages folder is referenced there or on disk.
ADMIN
Nikola
Posted on: 21 Sep 2022 05:40

Hi Noel,

Thank you for the details you have provided.

I was able to reproduce the exact same error however this involves having the _Layout file described as an item in the project file(csproj) and not having it physically on the hard drive. Could you please confirm whether this is the scenario at your end or if it is something different?

In general, this is not a common scenario, nevertheless, I would log an item in our backlog to improve the behaviour with one of the future releases of the Visual Studio extensions. You may follow the respective release notes on the Telerik UI for Blazor extension page.

Regards,
Nikola
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

n/a
Posted on: 20 Sep 2022 13:50

Upgrading a single (component) project (upgrading all gives the same error for the first project processed), I get an error screen (attached). Clicking that "Show me more" link gives the following stack trace:

 

An error occurred while running the wizard.

Error executing custom action Telerik.Blazor.VSX.Actions.MultiProjectUpdateMasterPageAction: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\w\new\Horizon30\Horizon30.Core.Configuration\Pages\_Layout.cshtml'.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize, Boolean checkHost)
   at System.IO.File.InternalReadAllText(String path, Encoding encoding, Boolean checkHost)
   at Telerik.Blazor.VSX.MasterPageProcessing.Updater.ProjectSettingsReader.EnsureMasterPageSettingsInitialized()
   at Telerik.Blazor.VSX.Actions.AdvancedUpdateMasterPageAction.RetrieveMasterPageSettingsUpgradeInfo(IPropertyDataDictionary arguments, IProjectWrap project)
   at Telerik.Blazor.VSX.Actions.UpdateMasterPageAction.Execute(WizardContext wizardContext, IPropertyDataDictionary arguments, IProjectWrap projectWrap)
   at Telerik.VSX.Actions.MultiProjectActionBase`1.Execute(WizardContext wizardContext, IPropertyDataDictionary arguments)
   at Telerik.VSX.WizardEngine.ActionManager.ExecActions()

 

The wizard is correct, that file doesn't exist. But I would expect either a nice error message (if it is required) or silently ignoring that part of the upgrade (if it isn't).

ADMIN
Nikola
Posted on: 20 Sep 2022 13:08

Hi Noel,

The Upgrade Wizard updates the Telerik UI for Blazor references and the script/styles references located in the _Layout.cshtml file if needed. As such it should work even if there is no such page. In this case, only the Telerik UI for Blazor NuGet package will be updated. That said could you please provide a bit more details about the error you received for the missing page? A stack trace as the one for the backup location would be very helpful.

Visual Studio restarts after the upgrade because we update the package sources in the solution-based NuGet.config and the new config has to be loaded for the updated package to be successfully restored. 

If you have any other questions, please get back to us.

Regards,
Nikola
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

n/a
Posted on: 20 Sep 2022 11:47

I (now) have version 2022.3.912.1

Running the upgrade wizard didn't report that NullReferenceException anymore. Instead it crashed on missing ~/Pages/_Layout.cshtml files in my *component* projects. Adding those seemed to help. An unexpected restart of Visual Studio did happen, is that expected?

 

However, building the solution gave a lot of errors (like "The type or namespace name 'Razor' does not exist in the namespace 'Microsoft.AspNetCore'"). In the end I removed these _Layout files and just edited the project files by hand to update the version of the Telerik package reference - as that was basically what the Upgrade Wizard seemed to do in my case

ADMIN
Nikola
Posted on: 20 Sep 2022 08:34

Hello Noel,

I am sorry to hear about the difficulties you faced using our products.

This exact issue was reported previously and we have released a fix for it with the 2022.3.912 version of the Progress Telerik UI for Blazor extension. Could you please launch the Extension Manager through Extensions > Manage Extensions and double-check that this is the version you are using? 

If this is true and you are still getting the error, could you please provide a bit more details regarding the project you are trying to convert for example:

 - Where it is located (a network/shared drive, system drive, where the OS is located)

 - Where you are launching the wizard from (Extensions > Telerik main menu or context menu when you right-click on a project)?

 - What type of project it is.

Thank you in advance and I am looking forward to your reply.

Regards,
Nikola
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.