如何将Wpf页面应用程序转换为DLL?

时间:2015-11-26 05:52:51

标签: c# wpf visual-studio

我用WPF编写Page应用程序作为exe项目。 但是当我将项目类型更改为类库时,我会遇到很多错误: Library project file cannot specify ApplicationDefinition elementThe name InitializeComponent does not exist in the current context

如何将Page exe项目转换为dll? 谢谢!

1 个答案:

答案 0 :(得分:2)

我试过,你可以删除App.Xaml并重建将成功。