Skip to content

WPF源码包引用出错 #114

@Zhuangkh

Description

@Zhuangkh

如果一个WPF控件类库打包成源码包, 被另一个项目引用时, 如果项目中没有任何xaml文件, 则引用的源码包的控件会爆The name 'InitializeComponent' does not exist in the current context. (项目已启用UseWPF ,obj中不生成.g.i.cs)

此时如果添加任意xaml窗体或控件进入项目, 则可以正常编译.(obj中有源码包的.g.i.cs文件生成)

再将添加的xaml文件删除, 哪怕obj中还是有源码包相关文件, 仍然会报错.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions