Skip to content

Problem PresentationFramework in Blazor dll #32809

@gleees

Description

@gleees

Hello,

I added a new view to an existing mvvm wpf application.
The new view is realized with blazor.
After calling an request to get all view data contexts, i get following error:

System.BadImageFormatException: 'Could not load file or assembly 'PresentationFramework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. Reference assemblies should not be loaded for execution. They can only be loaded in the Reflection-only loader context. (0x80131058)'

The called methode "SetProperties" is not reached:
internal ObservableCollection SetProperties<ViewModelPropertyType, ModelPropertyType>(ObservableCollection viewModelProperties, List modelProperties)
where ViewModelPropertyType : TestViewModel.New.DataModel.BaseDataModel
where ModelPropertyType : TestModel.New.DataModel.BaseDataModel

This previous method is called through following call, when the program crashes:
base.SetProperties<TestViewModel.New.DataModel.TestValue, TestModel.New.DataModel.TestValue>(_values, category.values);

Can somebody help me, to find a solution to this problem?

best regards, gleees

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs: Attention 👋This issue needs the attention of a contributor, typically because the OP has provided an update.area-blazorIncludes: Blazor, Razor Componentsfeature-blazor-desktopThis issue is related to Blazor Desktop

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions