2014-07-09 4 views
0

저는 오랫동안이 문제를 긁어 왔습니다. 내 WPF 프로젝트에서 나는 "그 이름은 .... 네임 스페이스에 존재하지 않는다."라는 오류 메시지가 계속 나타납니다. 이 문제는 XAML 파일에서 발생하며이 때문에 응용 프로그램을 빌드 할 수 없습니다. ""이름이 네임 스페이스 WPF XAML 파일에 존재하지 않습니다.

<Window 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    **xmlns:local="clr-namespace:MyProject.ViewModel"** 
    Height="576" Width="1024" Closed="Window_Closed"> 

그런 다음 Window.Resources에 내 리소스를 만들 :

<local:CurrentTimeViewModel x:Key="CurrentTimeViewModel"/> 

오류가 오는 곳입니다. CurrentTimeViewModel 파일을 확인하고 네임 스페이스가 정확하며 모든 것이 올바른 것으로 보입니다.

CurrentViewModel는 :

public class CurrentTimeViewModel : INotifyPropertyChanged 

난 아무것도없는 건가요?

UPDATE :. 프로젝트 파일이 루트 레벨에서 데이터를로드 할 수 없습니다 내가 볼 수있는 유일한 C 번호 오류가 "

가 무효 1 호선 위치 1

+1

동일한 프로젝트에 있나요? –

+0

예이 모든 것은 같은 프로젝트에 있습니다. –

+0

@johndoe 컴파일 할 때 다른 빌드 오류가 발생합니까? – dkozl

답변

0

입니다 내가 제안

아래 줄에

<local:CurrentTimeViewModel x:Key="CurrentTimeViewModel"/> 

에 localresource의 키를 변경
<local:CurrentTimeViewModel x:Key="CurrentTimeViewModelChanged"/> 

및 시도하십시오. 로컬 리소스를로드하는 동안 어떻게 든 영향을 미칠 수 있습니다.

관련 문제