开发者

Can't xmlns reference to other project in XAML

开发者 https://www.devze.com 2023-04-05 15:35 出处:网络
I have a WPF project like this: In a xaml file in my RCISP.WPF project I want to reference a class defined in my RCISP.Common Project. When I reference this class I got a xaml error like this:

I have a WPF project like this:

Can't xmlns reference to other project in XAML

In a xaml file in my RCISP.WPF project I want to reference a class defined in my RCISP.Common Project. When I reference this class I got a xaml error like this:

Can't xmlns reference to other project in XAML

Assembly 'mayclass' was not found.Verify that you are not missing as assembly reference.Also,verify that your project and all referenced assemblies have been开发者_开发技巧 built;

But I have reference to RCISP.Common in my RCISP.WPF...


The assembly part of the tag be the assembly name of the project you are referencing and unless you have specifically changed that to FamilyDto it will be the same as the name of your project eg RCSIP.Common

so

xmlns:CommonLayer="clr-namespace:RCISP.Common.Dto.Faimily;assembly=RCSIP.Common"

If your assembly is called FamilyDto then make sure you build your project as the editor needs the project to be compiled before it can correctly determine the reference is valid


The name of your assembly probably is RCISP.Common so the xmlns should be: xmlns:CommonLayer="clr-namespace:RCISP.Common.Dto.Family;Assembly=RCISP.Common

0

精彩评论

暂无评论...
验证码 换一张
取 消