How do convert WPF Application to Class Library
Let's see how can we convert exist WPF Application project to Class Library project.
- Right click on WPF application project and select project properties.
- Then select application and change the Out put type to Class Library, save it.
- Open App.xaml and remove StartupUri from it.
- Then build project, you can see some error with the project. so here is the trick to remove error,
- Exclude App.xaml file from project and build project again , it will build project without any errors.
- 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