eXpandFramework / eXpand

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

ModelEditor does not open at Solution.Module level error opening 'Xpand.ExpressApp.TreeListEditors.Win.XpandTreeListEditorsWinModule' module #684

Closed laceratione closed 4 years ago

laceratione commented 4 years ago

𝗤𝘂𝗲𝘀𝘁𝗶𝗼𝗻 When I'm click on the "Open Model Editor" solution module, I get the following error occurs:"Exception occurs while initializing the 'Xpand.ExpressApp.TreeListEditors.Win.XpandTreeListEditorsWinModule' module: The type initializer for 'Xpand.XAF.Modules.ModelMapper.Services.PredefinedMapService' threw an exception." How to fix? errorEditor

laceratione commented 4 years ago

Error details: at Xpand.XAF.Modules.Reactive.ReactiveModuleBase.SetupModules(ApplicationModulesManager applicationModulesManager) at Xpand.XAF.Modules.Reactive.ReactiveModuleBase.SetupModulesPatch(ApplicationModulesManager __instance) at SetupModules_Patch1(ApplicationModulesManager ) at DevExpress.ExpressApp.ApplicationModulesManager.Load(ITypesInfo typesInfo, Boolean loadTypesInfo) at DevExpress.ExpressApp.Utils.DesignerModelFactory.CreateModulesManager(ModuleBase module, String assembliesPath, List1 additionalModules, ISecurityStrategyBase securityInstance) at DevExpress.ExpressApp.Design.ModelEditor.ModelLoader.LoadModel(ITypeDiscoveryService typeDiscoveryService, ITypeResolutionService typeResolutionService, String targetDiffFileName, IDisposable& obj) at DevExpress.ExpressApp.Design.ModelEditor.EditorPane.CreateModelEditorController() at DevExpress.ExpressApp.Design.ModelEditor.EditorPane.PrivateInit(String fileName, ProjectItem currentProjectItem, IVsHierarchy pvHier) ----------InnerException---------- The type initializer for 'Xpand.XAF.Modules.ModelMapper.Services.PredefinedMapService' threw an exception. ----------StackTrace---------- at Xpand.XAF.Modules.ModelMapper.Services.PredefinedMapService.Extend(ApplicationModulesManager modulesManager, PredefinedMap map, Action1 configure) at Xpand.ExpressApp.TreeListEditors.Win.XpandTreeListEditorsWinModule.Setup(ApplicationModulesManager moduleManager) at Xpand.XAF.Modules.Reactive.ReactiveModuleBase.SetupModules(ApplicationModulesManager applicationModulesManager) ----------InnerException---------- Could not load file or assembly 'Xpand.ExpressApp.Win, Version=19.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) ----------StackTrace---------- at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection) at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) at System.Reflection.Assembly.Load(String assemblyString) at Xpand.XAF.Modules.ModelMapper.Services.PredefinedMapService.GetAssembly(Assembly[] assemblies, String name, Boolean partialMatch) at Xpand.XAF.Modules.ModelMapper.Services.PredefinedMapService.Init() at Xpand.XAF.Modules.ModelMapper.Services.PredefinedMapService..cctor() ----------InnerException---------- The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

apobekiaris commented 4 years ago

Could not load file or assembly 'Xpand.ExpressApp.Win, Version=19.2.6.0

this is an invalid version our packages versions are 19.2.60x.x. Did you custom compile the source code?

laceratione commented 4 years ago

we use installation script from GitHub "Set-ExecutionPolicy Bypass -Scope Process -Force;iex "$(([System.Net.WebClient]::new()).DownloadString('http://install.expandframework.com'));Install-Xpand -Assets @('Assemblies','Nuget','VSIX','Source') #-Version '19.2.602.0' -SkipGac -InstallationPath 'C:\Solution'"

apobekiaris commented 4 years ago

check the version Xpand.ExpressApp.Win manually please and let me know what they say

laceratione commented 4 years ago

19.2.602.0

xpand version

apobekiaris commented 4 years ago

i will get back to u once I research it a bit

expand commented 4 years ago

We will try to answer all questions that do not require research within 24hr. To prioritize cases that require research we use the following labels in order. For all other issues the posting time is respected.

  1. ❤ Bronze Sponsor
    1. ❤ Sponsor
    2. ❤ Backer
    3. Installation
    4. ShowStopper
    5. Nuget
    6. Contribution
    7. BreakingChange
    8. ReproSample
    9. Deployment
    10. must-have

This case is prioritized.

apobekiaris commented 4 years ago

the lab contains related work can u also try if it already fixed?

http://lab.releases.expandframework.com/

laceratione commented 4 years ago

Installed 19.2.602.3 but didnt help, we get the same problem

apobekiaris commented 4 years ago

Can you repro it on a sample?

apobekiaris commented 4 years ago

do you have installed the VSIX? it is a requirement if u try to use the ME from within VS. In any case it won't allow u to open the model if VSIX not found with a prompt to install VSIX

laceratione commented 4 years ago

Can you repro it on a sample?

I created a new clean Xpand project and ModelEditor works ok there. But still doesnt work in a big project

do you have installed the VSIX? it is a requirement if u try to use the ME from within VS. In any case it won't allow u to open the model if VSIX not found with a prompt to install VSIX

This one? vsix expand

apobekiaris commented 4 years ago

does the Xpand.ModelEditor works?

laceratione commented 4 years ago

Are you asking about this one? Works in a new project but error in a big one newproject model

apobekiaris commented 4 years ago

nope about the

https://github.com/eXpandFramework/DevExpress.XAF/tree/master/tools/Xpand.XAF.ModelEditor#vsix-integration

laceratione commented 4 years ago

So i tried to install Xpand.XAF.ModelEditor on a clean project. After building it says: Paket

Isnt that a mistake somewhere because it says "Paket" instead of "Packet" in commands?

Also i tried to open XAF Soultion Model List and its not loading also xaf soultion model list

apobekiaris commented 4 years ago

add this function to your Get-DevExpressVersion.ps1 and try again it should compile now

function Get-PaketReferences {
    [CmdletBinding()]
    param (
        [System.IO.FileInfo]$projectFile = "."
    )

    begin {

    }

    process {
        $paketDirectoryInfo = $projectFile.Directory
        $paketReferencesFile = "$($paketDirectoryInfo.FullName)\paket.references"
        if (Test-Path $paketReferencesFile) {
            Push-Location $projectFile.DirectoryName
            $dependencies = dotnet paket show-installed-packages --project $projectFile.FullName --all --silent | ForEach-Object {
                $parts = $_.split(" ")
                [PSCustomObject]@{
                    Include = $parts[1]
                    Version = $parts[3]
                }
            }
            Pop-Location
            $c = Get-Content $paketReferencesFile | ForEach-Object {
                $ref = $_
                $d = $dependencies | Where-Object {
                    $ref -eq $_.Include
                }
                $d
            }
            Write-Output $c
        }
    }

    end {

    }
}
laceratione commented 4 years ago

Ok this editor works in Solution.Win but still cant open in Solution.Module with the same problem editor error

update: everything is working in a new test solution but for some reason fails in a big project

apobekiaris commented 4 years ago

the problem is about conflicting versions evenmore u just mentioned that in Solution.Module u use the TreeListEditor.Win which is not valid to use a win module inside an agnostic.

expand commented 4 years ago

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

Released packages:

  1. Xpand.Extensions v.2.201.9.2
    1. Xpand.Extensions.Mono.Cecil v.2.201.9.1
    2. Xpand.Extensions.Reactive v.2.201.9.3
    3. Xpand.Extensions.XAF v.2.201.9.4
    4. Xpand.Extensions.XAF.Xpo v.2.201.9.1
    5. Xpand.XAF.Core.All v.2.201.25.4
    6. Xpand.XAF.ModelEditor v.1.201.2.1
    7. Xpand.XAF.Modules.AutoCommit v.2.201.9.3
    8. Xpand.XAF.Modules.CloneMemberValue v.2.201.9.4
    9. Xpand.XAF.Modules.CloneModelView v.2.201.9.3
    10. Xpand.XAF.Modules.GridListEditor v.2.201.9.3
    11. Xpand.XAF.Modules.HideToolBar v.2.201.9.3
    12. Xpand.XAF.Modules.MasterDetail v.2.201.9.3
    13. Xpand.XAF.Modules.ModelMapper v.2.201.9.6
    14. Xpand.XAF.Modules.ModelViewInheritance v.2.201.9.3
    15. Xpand.XAF.Modules.OneView v.2.201.9.3
    16. Xpand.XAF.Modules.ProgressBarViewItem v.2.201.9.3
    17. Xpand.XAF.Modules.Reactive v.2.201.9.4
    18. Xpand.XAF.Modules.Reactive.Logger v.2.201.9.4
    19. Xpand.XAF.Modules.Reactive.Logger.Client.Win v.2.201.9.3
    20. Xpand.XAF.Modules.Reactive.Logger.Hub v.2.201.9.3
    21. Xpand.XAF.Modules.Reactive.Win v.2.201.9.3
    22. Xpand.XAF.Modules.RefreshView v.2.201.9.3
    23. Xpand.XAF.Modules.SuppressConfirmation v.2.201.9.3
    24. Xpand.XAF.Modules.ViewEditMode v.2.201.9.3
    25. Xpand.XAF.Web.All v.2.201.25.4
    26. Xpand.XAF.Win.All v.2.201.25.4

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 commented 4 years ago

Issue is deprioritized as no Assignee found and scheduled for auto-close if no activity in the next 60 days. Thanks a lot for your contribution.

expand commented 4 years ago

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

.Thank you for your contribution.