Labels

Thursday, August 18, 2016

How to convert WPF Application project to Class Library

How do convert WPF Application to Class Library


Let's see how can we convert exist WPF Application project to Class Library project.


  1. Right click on WPF application project and select project properties.
  2. Then select application and change the Out put type to Class Library, save it.
  3. Open App.xaml and remove StartupUri from it.
  4. Then build project, you can see  some error with  the project. so here is the trick to remove error,
  5. Exclude  App.xaml file from project and build project again , it will build project without any errors.
  6. So if you want add App.xaml file to project ,now you can include App.xaml file again.
Note:-
If you going create new project to your solution, you can chose WPF User Control Library or WPF Custom Control Library.





No comments:

Post a Comment