eXpand icon indicating copy to clipboard operation
eXpand copied to clipboard

Issue with use the packagereference format instead of the packages.config

Open AxNut1 opened this issue 4 years ago โ€ข 10 comments

Iโ€™m needing to upgrade a project from XAF 19.2 to the latest v21.1.4 framework along with the latest eXpand. Following the โ€˜NuGetโ€™ approach for upgrading, Iโ€™ve noted from other articles that we should be using โ€œthe packagereference format instead of the packages.configโ€. This requires each set of the Project โ€˜Moduleโ€™ references to be converted to the โ€˜packagerefrenceโ€™ format. This works great as does the subsequent โ€˜NuGetโ€™ upgrade process. However this is not the case when trying to convert references held under the โ€˜Web Applicationโ€™ package. There error returned indicates that converting โ€˜ASP.Netโ€™ web applications to the packagereference format is not supported. What is the recommended approach for overcoming this constraint? Thanks in advance for any help in this regard.

Regards Andrew

Originally posted by @apobekiaris in https://github.com/eXpandFramework/eXpand/issues/873#issuecomment-857383718

AxNut1 avatar Jul 26 '21 21:07 AxNut1

we all need to keep followiong the trend of our community (.net) which dictates the SDK format for csproj and PackageReferences. It will make your dev life much easier doing. Note SDK format for WebForm projects is possible but a bit tricky so u can go only for packagereference.

about the problem u mentioned I do not recall an exact fix as it may depends on your project but u may consult our Test Web project for directions

https://github.com/eXpandFramework/Reactive.XAF/blob/b96addf82b8aadc9b3020f24022724ade8fa568a/src/Tests/EasyTests/TestApplication/TestApplication.Web/TestApplication.Web.csproj#L136-L146

i guess u try to convert from within VS with the context menu, which it may fail, but going manual and simply remove the all References and replace them with packagereference should work fine as in the Test project above

apobekiaris avatar Jul 27 '21 04:07 apobekiaris

Thanks for the advice. In the end followed the approach and for now added the references manually to the application project. All seems good and building without errors. However only issue now is the XAF Model Designer reboots Visual Studio and does not open. No errors.

AxNut1 avatar Jul 29 '21 04:07 AxNut1

I suggest u try VS as admin and use the Xpand.ModelEditor from Xpand.VSIX plugin

apobekiaris avatar Jul 29 '21 05:07 apobekiaris

Thanks for the advice. In the end followed the approach and for now added the references manually to the application project. All seems good and building without errors. However only issue now is the XAF Model Designer reboots Visual Studio and does not open. No errors.

Just as an update to the issue mentioned above in terms of the XAF Model Designer rebooting VS and not working at all even after a reboot, I've discovered that this is related to/being caused by the Email Module. Removing this from the project (even under the current release) resolves to problem.

AxNut1 avatar Dec 08 '21 22:12 AxNut1

Which Email module cause there are two, the Xpand.ExpressApp.Email and the Xpand.XAF.Modules.Email. The first one is .net461 only and is out of support as the related external dependecies e.g. RazorEngine are out of support as well.

rebooting VS and not working

Probably VS needs to be run elevated as Admin, note also part of that the patching call is removed in the next minor version as XAF now supports it natively. In any case please use eXpandFramework GitHub issues in the future if you can.

Also to save your self of designer related problems I suggest the Xpand Model Editor that comes with XVSIX. Note that there is an older version distributed from VSIX but is only for the full .NetFramework, For .NET5 and newer see https://github.com/eXpandFramework/Reactive.XAF/tree/master/tools/Xpand.XAF.ModelEditor

apobekiaris avatar Dec 09 '21 02:12 apobekiaris

Hi Thanks for the update. The project is using the older Xpand.ExpressApp.Email. I'll look at sorting this out. In terms of other updates:

  • I'm running VS as Admin
  • As per my previous post above, I updated an original post on the DevExpress side of things because originally I thought the VS rebooting issue and Model Designer problem was related to the then latest release of XAF which I was attempting to upgrade to. As it turns out several threads came together so thought it best to provide updates to both forums.

Thanks for the help. I'll let you know how it goes given the customer and XAF solution concerned is significant and has been successfully operational with ongoing functional updates for around 9 years now.

AxNut1 avatar Dec 09 '21 02:12 AxNut1

check with the next rx repo minor packages release, the patch code is now removed so it won't throw there. But this kind of exception probably means version conflict, possibly .net version

apobekiaris avatar Dec 09 '21 02:12 apobekiaris

Thanks for that. I'll investigate further. A key challenge at the moment is given the longevity and success of this solution - 9 years and still going strong it may be time to pivot and do a complete overhaul. One dilemma is whether that should be to a XAF-based Blazor solution yet. Thanks for the help. Much appreciated.

AxNut1 avatar Dec 09 '21 02:12 AxNut1

MS plans are clear, we already overstay with WebForms, the web does not have much resources on this old technology anymore. Blazor is super fast however still missing some UI components you may have previosly but eventually they will be there

apobekiaris avatar Dec 09 '21 02:12 apobekiaris

The pre-release 4.212.2.0 in the Reactive.XAF lab branch includes commits that relate to this task:

To minimize version conflicts we recommend that you use the Xpand.XAF.Core.All, Xpand.XAF.Win.All, Xpand.XAF.Web.All packages. Doing so, all packages will be at your disposal and .NET will add a dependecy only to those packages that you actually use and not to all (see the Modules installation-registrations youtube video).

Released packages: Xpand.Extensions v.4.212.2 Xpand.Extensions.Blazor v.4.212.2 Xpand.Extensions.Mono.Cecil v.4.212.2 Xpand.Extensions.Office.Cloud v.4.212.2 Xpand.Extensions.Office.Cloud.Google.Blazor v.4.212.2 Xpand.Extensions.Reactive v.4.212.2 Xpand.Extensions.XAF v.4.212.2 Xpand.Extensions.XAF.Xpo v.4.212.2 Xpand.TestsLib v.4.212.2 Xpand.TestsLib.Blazor v.4.212.2 Xpand.TestsLib.Common v.4.212.2 Xpand.TestsLib.EasyTest v.4.212.2 Xpand.TestsLib.Net461 v.4.212.2 Xpand.VersionConverter v.4.212.2 Xpand.XAF.Core.All v.4.212.2 Xpand.XAF.Modules.AutoCommit v.4.212.2 Xpand.XAF.Modules.Blazor v.4.212.2 Xpand.XAF.Modules.BulkObjectUpdate v.4.212.2 Xpand.XAF.Modules.CloneMemberValue v.4.212.2 Xpand.XAF.Modules.CloneModelView v.4.212.2 Xpand.XAF.Modules.Email v.4.212.2 Xpand.XAF.Modules.GridListEditor v.4.212.2 Xpand.XAF.Modules.HideToolBar v.4.212.2 Xpand.XAF.Modules.JobScheduler.Hangfire v.4.212.2 Xpand.XAF.Modules.JobScheduler.Notification v.4.212.2 Xpand.XAF.Modules.LookupCascade v.4.212.2 Xpand.XAF.Modules.MasterDetail v.4.212.2 Xpand.XAF.Modules.ModelMapper v.4.212.2 Xpand.XAF.Modules.ModelViewInheritance v.4.212.2 Xpand.XAF.Modules.Office.Cloud.Google v.4.212.2 Xpand.XAF.Modules.Office.Cloud.Google.Calendar v.4.212.2 Xpand.XAF.Modules.Office.Cloud.Google.Tasks v.4.212.2 Xpand.XAF.Modules.Office.Cloud.Microsoft v.4.212.2 Xpand.XAF.Modules.Office.Cloud.Microsoft.Calendar v.4.212.2 Xpand.XAF.Modules.Office.Cloud.Microsoft.Todo v.4.212.2 Xpand.XAF.Modules.Office.DocumentStyleManager v.4.212.2 Xpand.XAF.Modules.OneView v.4.212.2 Xpand.XAF.Modules.PositionInListView v.4.212.2 Xpand.XAF.Modules.ProgressBarViewItem v.4.212.2 Xpand.XAF.Modules.RazorView v.4.212.2 Xpand.XAF.Modules.Reactive v.4.212.2 Xpand.XAF.Modules.Reactive.Logger v.4.212.2 Xpand.XAF.Modules.Reactive.Logger.Client.Win v.4.212.2 Xpand.XAF.Modules.Reactive.Logger.Hub v.4.212.2 Xpand.XAF.Modules.Reactive.Rest v.4.212.2 Xpand.XAF.Modules.RefreshView v.4.212.2 Xpand.XAF.Modules.SequenceGenerator v.4.212.2 Xpand.XAF.Modules.SuppressConfirmation v.4.212.2 Xpand.XAF.Modules.ViewEditMode v.4.212.2 Xpand.XAF.Modules.ViewItemValue v.4.212.2 Xpand.XAF.Modules.ViewWizard v.4.212.2 Xpand.XAF.Modules.Windows v.4.212.2 Xpand.XAF.Web.All v.4.212.2 Xpand.XAF.Win.All v.4.212.2

Please update the related Nuget packages and test if issues is addressed. These are nightly nuget packages available only from our NugetServer.

If you do not use these packages directly but through a module of the main eXpandFramework project, please wait for the bot to notify you again when integration is finished or update the related packages manually.

Thanks a lot for your contribution.

apobekiaris avatar Dec 13 '21 20:12 apobekiaris

Closing issue for age. Feel free to reopen it at any time.

.Thank you for your contribution.

expand avatar Dec 02 '23 21:12 expand