eXpandFramework / eXpand

DevExpress XAF (eXpressApp) extension framework. 𝗹𝗶𝗻𝗸𝗲𝗱𝗶𝗻.𝗲𝘅𝗽𝗮𝗻𝗱𝗳𝗿𝗮𝗺𝗲𝘄𝗼𝗿𝗸.𝗰𝗼𝗺, 𝘆𝗼𝘂𝘁𝘂𝗯𝗲.𝗲𝘅𝗽𝗮𝗻𝗱𝗳𝗿𝗮𝗺𝗲𝘄𝗼𝗿𝗸.𝗰𝗼𝗺 and 𝘁𝘄𝗶𝘁𝘁𝗲𝗿 @𝗲𝘅𝗽𝗮𝗻𝗱𝗳𝗿𝗮𝗺𝗲𝘄𝗼𝗿𝗸 and or simply 𝗦𝘁𝗮𝗿/𝘄𝗮𝘁𝗰𝗵 this repository and get notified from 𝗚𝗶𝘁𝗛𝘂𝗯
http://expand.expandframework.com
Microsoft Public License
222 stars 115 forks source link

Devexpress XAF Blazor - Hangfire Module Implement Hangfire Startup Problem #928

Closed OgurSeren closed 10 months ago

OgurSeren commented 2 years ago

Hi,

Problem -1 :

We want to use JobScheduler.Hangfire module in Devexpress XAF Blazor project. We need to add the following lines in the Startup.cs file for it to work.

[assembly: HostingStartup(typeof(HangfireStartup))]
[assembly: HostingStartup(typeof(HostingStartup))]
[assembly: HostingStartup(typeof(Xpand.XAF.Modules.Blazor.BlazorStartup))]

However, when I add them and open the Model.xafml file, I get the following error:

Model Editor failed to load.

Analyze the ModelEditorServerNETCore and ModelEditorClientNETCore log files in the %USERPROFILE%\AppData\Roaming\eXpressAppFramework\ folder OR send the archived folder to DevExpress Support.

For more information on how to collect this diagnostic information, refer to https://www.devexpress.com/go/XAF_ModelEditor_Troubleshooting.aspx

Could not load file or assembly 'Hangfire.Core, Version=1.7.24.0, Culture=neutral, PublicKeyToken=c52ffed5d5ff0958'. A strongly-named assembly is required. (0x80131044)

When I delete the "[assembly: HostingStartup(typeof(HangfireStartup))]"line in the Startup.cs file, the Model opens, but this time the project does not work and gets an error.

Problem -2

Although the model is not opened, Hangfire-related menus appear when I run my project. When I say new Job, unfortunately the Job definitions that I define as JobProvider do not appear in the lookups.

Expected Behavior -1 When I add the Hangfire module, model.xafml files open without problems Expected Behavior -2 The methods that I defined as Job Provider can be displayed on the Job definition screen.

𝗦𝗰𝗿𝗲𝗲𝗻𝘀𝗵𝗼𝘁𝘀-1.1 image

𝗦𝗰𝗿𝗲𝗲𝗻𝘀𝗵𝗼𝘁𝘀-2.1 image

𝗦𝗰𝗿𝗲𝗲𝗻𝘀𝗵𝗼𝘁𝘀-2.2 image

apobekiaris commented 2 years ago

until addressed u either need to use the standalone ModelEditor or the XpandModelEditor in VS2019 or XpandModelEditor in Rider

apobekiaris commented 2 years ago

or if this really urgent to u consider prioritization of the case and a fix that fore sure will work at least in your solution by sponosring the project https://github.com/sponsors/apobekiaris

apobekiaris commented 2 years ago

this is a known issue that some times the script fail to sing hangfire, these scripts are distributed with nuget and for some reason failed to run.

You can either sing the Hangfire assemblies manually in the nuget folder or try to run the scripts manully

https://github.com/eXpandFramework/Reactive.XAF/blob/master/Build/targets/Xpand.XAF.Modules.JobScheduler.Hangfire.ps1

again if you can correct the issue your self a PR is accepted.

Finally this is a problem raise from VS designers and the native Model Editor which I recommend to avoid. You can use either the XpandModelEditor integration or the standalond Xaf model editor and this problem will not appear

expand commented 10 months ago

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

.Thank you for your contribution.