혹시 아래와 같은 창이 뜨면서 에러가 발생하시나요?
![[wpf] System.IO.IOException: ''mainwindow.xaml' 리소스가 없습니다.’ 에러 해결방법 에러창](http://t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png)
해당 에러는 일반적으로 MainWindow.xaml파일을 다른 폴더로 옮겼는데, App.xaml에 파일에서 설정을 바꿔주지 않아 발생하는 에러입니다.
가령 MainWindow.xaml파일을 Views폴더 아래로 이동시켰다고 해보겠습니다.
![[wpf] System.IO.IOException: ''mainwindow.xaml' 리소스가 없습니다.’ 에러 해결방법 MainWindow.xaml 파일이동](http://t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png)
그리고 app.xaml파일에 들어가보겠습니다.
//app.xaml
![[wpf] System.IO.IOException: ''mainwindow.xaml' 리소스가 없습니다.’ 에러 해결방법 App.xaml](http://t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png)
StartupUri에 적힌 MainWindow.xaml의 위치가 업데이트 되지 않았습니다.
그래서 에러가 발생한것입니다.
즉, 아래와같이 수정된 파일 주소를 넣어주셔야 합니다.
![[wpf] System.IO.IOException: ''mainwindow.xaml' 리소스가 없습니다.’ 에러 해결방법 주소 수정](http://t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png)
'c# > wpf' 카테고리의 다른 글
[c# wpf] command(3) (with CanExecute 사용) (0) | 2022.07.06 |
---|---|
[c# wpf] command 개념/사용법(2) (0) | 2022.07.05 |
[c# wpf] command 개념/사용법 (2) | 2022.06.30 |
[c# wpf] DataTemplate 사용 방법 (1) | 2022.06.27 |
[c#] 델리게이트를 왜 쓸까? (1) | 2022.06.24 |
댓글