Closed CWolffIF closed 1 year ago
Hello, I got the same error the eXpand 22.1.501.
I have a branch with the eXpand version 22.1.500 and I don't have the error. In my branch with the error I downgrade to 22.1.500 (by change the csproj) and i don't have the error anymore.
It seems the error is on the version 22.1.501.
Please provide a sample and repro directions
Sorry I have no Demo. It is in all of my projects.
It seems to be a problem with harmony. Maybe the stacktrace helps.
bei HarmonyLib.Harmony..ctor(String id) bei Xpand.Extensions.Harmony.HarmonyExtensions.PatchWith(MethodInfo method, HarmonyMethod prefix, HarmonyMethod postFix, HarmonyMethod transpiler, HarmonyMethod finalizer) bei Xpand.Extensions.Harmony.HarmonyExtensions.PreFix(HarmonyMethod harmonyMethod, MethodInfo method) bei Xpand.Extensions.XAF.Harmony.HarmonyExtensions.Patch(MethodInfo method, Action`1 patch, Boolean onlyRuntime) bei Xpand.Extensions.XAF.Harmony.HarmonyExtensions.PreFix(HarmonyMethod harmonyMethod, MethodInfo method, Boolean onlyRuntime) bei Xpand.XAF.Modules.Reactive.ReactiveModuleBase..cctor()
Hi, now I´ve got the time to sent a Demo project.
I only added the Xpand.XAF.Modules.Reactive.ReactiveModule.
public DXApplication1Module() {
InitializeComponent();
RequiredModuleTypes.Add(typeof(Xpand.XAF.Modules.Reactive.ReactiveModule));
}
First I got the error that System.Drawing.Common is missing. After I added this as nuget I got the error mentioned above.
Hi Tolis,
could you reproduce the error in the demo?
nope, how to repro it? I can open the model with both native and Xpand ME, I can also start the app
did u tried cleaning your nuget folder?
as well your bin folders
Hm, everything is cleared (Nuget Cache, bin, etc...) and I can´t start the Demo project. I moved to a new installed PC and the same error.
Here is the log:
28.09.22 15:54:32.918 ================================================================================
28.09.22 15:54:32.920 Trace Log for DXApplication1.Win.exe is started
28.09.22 15:54:32.921 ================================================================================
28.09.22 15:54:32.923 System Environment
OS Version: Microsoft Windows NT 6.2.9200.0
.Net Framework Versions: v4.0.30319
CLR Version: 4.0.30319.42000
eXpressApp Version: 22.1.5.0
eXpressApp File Version: 22.1.5.0
Application config
Modules=
NewVersionServer=
EnableDiagnosticActions=False
"DXApplication1.Win.exe" (CLR v4.0.30319: DXApplication1.Win.exe): "C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\DevExpress.XtraEditors.v22.1\v4.0_22.1.5.0__b88d1754d700e49a\DevExpress.XtraEditors.v22.1.dll" geladen. Das Laden von Symbolen wurde übersprungen. Das Modul ist optimiert, und die Debugoption "Nur eigenen Code" ist aktiviert.
"DXApplication1.Win.exe" (CLR v4.0.30319: DXApplication1.Win.exe): "C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\DevExpress.XtraBars.v22.1\v4.0_22.1.5.0__b88d1754d700e49a\DevExpress.XtraBars.v22.1.dll" geladen. Das Laden von Symbolen wurde übersprungen. Das Modul ist optimiert, und die Debugoption "Nur eigenen Code" ist aktiviert.
"DXApplication1.Win.exe" (CLR v4.0.30319: DXApplication1.Win.exe): "C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\mscorlib.resources\v4.0_4.0.0.0_de_b77a5c561934e089\mscorlib.resources.dll" geladen. Das Modul wurde ohne Symbole erstellt.
28.09.22 15:54:32.987 Initialize application
=======================
28.09.22 15:54:32.988 Command line arguments:
C:\DevProjects\DXApplication1\DXApplication1.Win\bin\Debug\DXApplication1.Win.exe
"DXApplication1.Win.exe" (CLR v4.0.30319: DXApplication1.Win.exe): "C:\DevProjects\DXApplication1\DXApplication1.Win\bin\Debug\DXApplication1.Module.dll" geladen. Symbole wurden geladen.
"DXApplication1.Win.exe" (CLR v4.0.30319: DXApplication1.Win.exe): "C:\DevProjects\DXApplication1\DXApplication1.Win\bin\Debug\DXApplication1.Module.Win.dll" geladen. Symbole wurden geladen.
"DXApplication1.Win.exe" (CLR v4.0.30319: DXApplication1.Win.exe): "C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\DevExpress.ExpressApp.Objects.v22.1\v4.0_22.1.5.0__b88d1754d700e49a\DevExpress.ExpressApp.Objects.v22.1.dll" geladen. Das Laden von Symbolen wurde übersprungen. Das Modul ist optimiert, und die Debugoption "Nur eigenen Code" ist aktiviert.
"DXApplication1.Win.exe" (CLR v4.0.30319: DXApplication1.Win.exe): "C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\DevExpress.Printing.v22.1.Core\v4.0_22.1.5.0__b88d1754d700e49a\DevExpress.Printing.v22.1.Core.dll" geladen. Das Laden von Symbolen wurde übersprungen. Das Modul ist optimiert, und die Debugoption "Nur eigenen Code" ist aktiviert.
"DXApplication1.Win.exe" (CLR v4.0.30319: DXApplication1.Win.exe): "C:\DevProjects\DXApplication1\DXApplication1.Win\bin\Debug\Xpand.XAF.Modules.Reactive.dll" geladen. Das Laden von Symbolen wurde übersprungen. Das Modul ist optimiert, und die Debugoption "Nur eigenen Code" ist aktiviert.
"DXApplication1.Win.exe" (CLR v4.0.30319: DXApplication1.Win.exe): "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\PrivateAssemblies\Runtime\Microsoft.VisualStudio.Debugger.Runtime.Desktop.dll" geladen. Das Laden von Symbolen wurde übersprungen. Das Modul ist optimiert, und die Debugoption "Nur eigenen Code" ist aktiviert.
"DXApplication1.Win.exe" (CLR v4.0.30319: DXApplication1.Win.exe): "Anonymously Hosted DynamicMethods Assembly" geladen.
"DXApplication1.Win.exe" (CLR v4.0.30319: DXApplication1.Win.exe): "C:\DevProjects\DXApplication1\DXApplication1.Win\bin\Debug\System.Reactive.dll" geladen.
"DXApplication1.Win.exe" (CLR v4.0.30319: DXApplication1.Win.exe): "C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\netstandard\v4.0_2.0.0.0__cc7b13ffcd2ddd51\netstandard.dll" geladen. Das Laden von Symbolen wurde übersprungen. Das Modul ist optimiert, und die Debugoption "Nur eigenen Code" ist aktiviert.
"DXApplication1.Win.exe" (CLR v4.0.30319: DXApplication1.Win.exe): "C:\DevProjects\DXApplication1\DXApplication1.Win\bin\Debug\Fasterflect.dll" geladen. Das Laden von Symbolen wurde übersprungen. Das Modul ist optimiert, und die Debugoption "Nur eigenen Code" ist aktiviert.
"DXApplication1.Win.exe" (CLR v4.0.30319: DXApplication1.Win.exe): "C:\DevProjects\DXApplication1\DXApplication1.Win\bin\Debug\0Harmony.dll" geladen.
"DXApplication1.Win.exe" (CLR v4.0.30319: DXApplication1.Win.exe): "C:\DevProjects\DXApplication1\DXApplication1.Win\bin\Debug\Xpand.Extensions.XAF.dll" geladen. Das Laden von Symbolen wurde übersprungen. Das Modul ist optimiert, und die Debugoption "Nur eigenen Code" ist aktiviert.
"DXApplication1.Win.exe" (CLR v4.0.30319: DXApplication1.Win.exe): "C:\DevProjects\DXApplication1\DXApplication1.Win\bin\Debug\System.Drawing.Common.dll" geladen. Das Laden von Symbolen wurde übersprungen. Das Modul ist optimiert, und die Debugoption "Nur eigenen Code" ist aktiviert.
"DXApplication1.Win.exe" (CLR v4.0.30319: DXApplication1.Win.exe): "C:\DevProjects\DXApplication1\DXApplication1.Win\bin\Debug\Xpand.Extensions.dll" geladen. Das Laden von Symbolen wurde übersprungen. Das Modul ist optimiert, und die Debugoption "Nur eigenen Code" ist aktiviert.
Ausnahme ausgelöst: "DevExpress.ExpressApp.DC.ObjectCreatingException" in DevExpress.ExpressApp.v22.1.dll
Ein Ausnahmefehler des Typs "DevExpress.ExpressApp.DC.ObjectCreatingException" ist in DevExpress.ExpressApp.v22.1.dll aufgetreten.
Unable to create an instance of the "Xpand.XAF.Modules.Reactive.ReactiveModule" type.
Reason: "Der Typeninitialisierer für "Xpand.XAF.Modules.Reactive.ReactiveModuleBase" hat eine Ausnahme verursacht."
Unbehandelte Ausnahme: DevExpress.ExpressApp.DC.ObjectCreatingException: Unable to create an instance of the "Xpand.XAF.Modules.Reactive.ReactiveModule" type.
Reason: "Der Typeninitialisierer für "Xpand.XAF.Modules.Reactive.ReactiveModuleBase" hat eine Ausnahme verursacht." ---> System.TypeInitializationException: Der Typeninitialisierer für "Xpand.XAF.Modules.Reactive.ReactiveModuleBase" hat eine Ausnahme verursacht. ---> System.IO.FileLoadException: Die Datei oder Assembly "MonoMod.Common, Version=22.6.3.1, Culture=neutral, PublicKeyToken=null" oder eine Abhängigkeit davon wurde nicht gefunden. Eine Assembly mit starkem Namen ist erforderlich. (Ausnahme von HRESULT: 0x80131044)
bei HarmonyLib.Harmony..ctor(String id)
bei Xpand.Extensions.Harmony.HarmonyExtensions.PatchWith(MethodInfo method, HarmonyMethod prefix, HarmonyMethod postFix, HarmonyMethod transpiler, HarmonyMethod finalizer) in D:\a\1\s\src\Extensions\Xpand.Extensions\Harmony\PatchWith.cs:Zeile 11.
bei Xpand.Extensions.Harmony.HarmonyExtensions.PreFix(HarmonyMethod harmonyMethod, MethodInfo method) in D:\a\1\s\src\Extensions\Xpand.Extensions\Harmony\Prefix.cs:Zeile 7.
bei Xpand.Extensions.XAF.Harmony.HarmonyExtensions.Patch(MethodInfo method, Action`1 patch, Boolean onlyRuntime) in D:\a\1\s\src\Extensions\Xpand.Extensions.XAF\Harmony\PreFix.cs:Zeile 11.
bei Xpand.Extensions.XAF.Harmony.HarmonyExtensions.PreFix(HarmonyMethod harmonyMethod, MethodInfo method, Boolean onlyRuntime) in D:\a\1\s\src\Extensions\Xpand.Extensions.XAF\Harmony\PreFix.cs:Zeile 15.
bei Xpand.XAF.Modules.Reactive.ReactiveModuleBase..cctor() in D:\a\1\s\src\Modules\Reactive\ReactiveModuleBase.cs:Zeile 26.
--- Ende der internen Ausnahmestapelüberwachung ---
bei Xpand.XAF.Modules.Reactive.ReactiveModuleBase..ctor()
bei Xpand.XAF.Modules.Reactive.ReactiveModule..ctor() in D:\a\1\s\src\Modules\Reactive\Module.cs:Zeile 20.
bei Create_ReactiveModule()
bei DevExpress.ExpressApp.Utils.Reflection.TypeData.CreateInstance(Object[] args)
--- Ende der internen Ausnahmestapelüberwachung ---
bei DevExpress.ExpressApp.Utils.Reflection.TypeData.CreateInstance(Object[] args)
bei DevExpress.ExpressApp.ModuleBase.CreateModule(Type moduleType, ModelStoreBase diffsStore)
bei DevExpress.ExpressApp.Core.ModuleFactory.ModuleFactoryWithResourcesDiffsStore.CreateModule(Type moduleType)
bei DevExpress.ExpressApp.ModuleList.EnsureModuleInList(Type moduleType, IList`1 moduleList, List`1 requiredModules)
bei DevExpress.ExpressApp.ModuleList.AddModuleIntoList(ModuleBase module, IList`1 moduleList, List`1 requiredModules)
bei DevExpress.ExpressApp.ModuleList.RefreshRequiredModules()
bei DevExpress.ExpressApp.ModuleList.OnInitializeComplete()
bei DevExpress.ExpressApp.Utils.BindingListBase`1.EndInit()
bei DevExpress.ExpressApp.XafApplication.EndInit()
bei DXApplication1.Win.DXApplication1WindowsFormsApplication.InitializeComponent() in C:\DevProjects\DXApplication1\DXApplication1.Win\WinApplication.Designer.cs:Zeile 46.
bei DXApplication1.Win.DXApplication1WindowsFormsApplication..ctor() in C:\DevProjects\DXApplication1\DXApplication1.Win\WinApplication.cs:Zeile 14.
bei DXApplication1.Win.Program.Main() in C:\DevProjects\DXApplication1\DXApplication1.Win\Program.cs:Zeile 32.
Das Programm "[12088] DXApplication1.Win.exe" wurde mit Code 0 (0x0) beendet.
i am not at all sure what is happening. Define new machine? is this one you previously work or new clean installtion.
C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\DevExpress.XtraEditors.v22.1
the assembly comes from the GAC given we are on nuget this looks strange. Can you uninstall DX and run again maybe Harmony does not work well when GAC?
do u by any chance have MonoMod in the GAC?
hmmm wrong this is not even possible latest MonoMod is not even sing, cannot go to GAC
No, MonoMod is not in GAC.
I try this evening to run without GAC.
It is a new System but Devexpress is installed. In the project I use the nugets, but in debug mode the assemblys taken out of GAC.
you mean this is standard .net behaviour? did u tried without DX installed, although in my machine I have DX installed
something is wrong here .net core does not have the concept of GAC
apologies I was looking a wrong sample, I can repro the case , thnks.
I will update u once I have a solution.
and yes u use the GAc cause u are in .net 4.8 while the wrong sample i was looking is on .net6. Which makes me wonder why don't u upgrade and put your self into troubles. The world is using .net6
We are on the way to go to .net6. But we have many customers using snap and so we have to transfer. This takes a while.......
The pre-release 4.221.6.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).
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.
note that the tests are failing so this build has other issues, u should probably wait for the official
The pre-release 4.221.6.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).
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.
eXpand.lab release 22.1.501.1 includes commit that relate to this task:
Please test if it addresses the problem. If you use nuget add our LAB NugetServer as a nuget package source in VS.
To minimize version conflicts we recommend that you switch to PackageReference format and use only the eXpandAgnostic, eXpandWin, eXpandWeb 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).
Thanks a lot for your contribution.
Hi Tolis,
I installed the 22.1.500.1 and also the 22.1.503, my application start but I can't open the Model in the Module.Win. I got this error :
I also update the CWolffIF's project from 4.221.6 to 4.221.8, the application start but I can't open the Model. Here the error :
you tried installing this package for v5 or for latest?
v5 or latest of what ?
System.Interactive as per the exception msg
I add the package NuGet for System.Interactive v5 but it doesn't work. This is for the test project but in my project the error is on ChooseDatabaseAtLogonController.
Hi,
I tested it with my Testproject and 4.221.8. The error did not appear but the app didn´t start. It seems to be in an endless loop. The splash screen appears and the prog is in initalization.
08.10.22 18:09:33.072 ================================================================================
08.10.22 18:09:33.076 Trace Log for DXApplication1.Win.exe is started
08.10.22 18:09:33.076 ================================================================================
08.10.22 18:09:33.076 System Environment
OS Version: Microsoft Windows NT 6.2.9200.0
.Net Framework Versions: v4.0.30319
CLR Version: 4.0.30319.42000
eXpressApp Version: 22.1.5.0
eXpressApp File Version: 22.1.5.0
Application config
Modules=
NewVersionServer=
EnableDiagnosticActions=True
08.10.22 18:09:33.127 Initialize application
=======================
08.10.22 18:09:33.127 Command line arguments:
C:\DevProjects\DXApplication1\DXApplication1.Win\bin\Debug\DXApplication1.Win.exe
08.10.22 18:09:33.799 --------------------------------------------------------------------------------
Initialize Modules Manager
08.10.22 18:09:33.799 ApplicationModulesManager.UseStaticCache = False
08.10.22 18:09:33.799 ApplicationModulesManager.Init
08.10.22 18:09:33.799 --------------------------------------------------------------------------------
After 1h I break up. The whole time the app has workingload between 11% and 15%.
You can test it with my new project (on .net Framework 4.8)
thnks I can repro it
Hi Tolis, do you have a fix please ?
the fix is in the source if you can compile it manually, the public builds are delayed due to issues with the CI.
Thank you for your return.
Hi Tolis,
I tried the new Version 22.1.504 / 4.221.9.0 but the is still an error. DXApplication1.zip
Unable to create an instance of the "Xpand.XAF.Modules.Reactive.ReactiveModule" type.
Reason: "Der Typeninitialisierer für "Xpand.XAF.Modules.Reactive.ReactiveModuleBase" hat eine Ausnahme verursacht."
Inner Exception:
Die Datei oder Assembly "0Harmony, Version=2.2.2.1, Culture=neutral, PublicKeyToken=c52ffed5d5ff0958" oder eine Abhängigkeit davon wurde nicht gefunden. Die gefundene Manifestdefinition der Assembly stimmt nicht mit dem Assemblyverweis überein. (Ausnahme von HRESULT: 0x80131040)
Hi, the error says that "0Harmony, Version=2.2.2.1, Culture=neutral, PublicKeyToken=c52ffed5d5ff0958" is expected. But in the .net Framework 4.8 project the Harmony version build is
yes I can repro it as well, is about Harmony failing to run under this specific configuration and still do not have a working solutiuon
The pre-release 4.221.9.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).
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.
Hi Tolis,
I installed the 22.1.6 and the 4.221.10, I can't open the Model in the Module on my application and also on the CWolffIF's project. I got this error :
Here the project : DXApplication1.zip
I testsed the XpandModelEditor for .NET6 projects and works fine in both VS and in Rider. Once you swicth to .NET6 you should go for it and avoid the native Xaf ME.
VS designers are unpredictable, I already spent 4 days for this case and I am back to zero. The way they work is they copy everything to a temp dir and load stuff from there using the same AppDomain.
The way XpandModelEditor works is copy the Xaf Standalone editor in the bin where all files exist and eqach time starts a new process. The first time it runs it adds the CopyLocalLockFileAssemblies
attribute to your csproj so to bring all nuget assemblies locally when u build. Therefore fails almost never but the IDE integration is not done for the full framework. Unti you swicvth to .NET6 Instead of having the convenience of XpandModelEditor you have to use the XafStandAlone editor manually, it can edit your models fine.
eXpand.lab release 22.2.400.0 includes commit that relate to this task:
Please test if it addresses the problem. If you use nuget add our LAB NugetServer as a nuget package source in VS.
To minimize version conflicts we recommend that you switch to PackageReference format and use only the eXpandAgnostic, eXpandWin, eXpandWeb 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).
Thanks a lot for your contribution.
Hi,
after I migrated from (project for .net Framework 4.8)
to
I got the follwing Error and the program did not start.
I installed the nuget for MonoMod 22.6.3.1 manually, but the same error.