2013-04-30 59 views
8

Tôi gặp sự cố khi cố gắng biên dịch một Ứng dụng Cửa hàng Windows trong C#/XAML. Mỗi khi tôi cố gắng biên soạn tôi nhận được lỗi này:Microsoft.Windows.UI.Xaml.Common.Targets không tìm thấy

Error 1 The system cannot find the file specified. (Exception from HRESULT: 0x80070002) App1 

C:\Program Files (x86)\MSBuild\Microsoft\WindowsXaml\v11.0\Microsoft.Windows.UI.Xaml.Common.targets(190,9): Xaml Internal Error error WMC9999: The system cannot find the file specified. (Exception from HRESULT: 0x80070002) 

Tôi có tập tin, vì vậy nó không phải là vấn đề. Sự cố này cũng xuất hiện khi tôi tạo ứng dụng cửa hàng Windows 8 mới từ mẫu, do đó, có vẻ như đã xảy ra sự cố với hệ thống của tôi. Tôi đã cố gắng khởi động lại máy tính và sửa chữa cài đặt VS2012 (hai lần) mà không có kết quả.

Bất kỳ ý tưởng nào? Bất cứ ai cũng có thể giúp tôi giải quyết vấn đề này? Tôi có Visual Studio Professional 2012. Cảm ơn trước

EDIT: Đây là mã trong "C: \ Program Files (x86) \ MSBuild \ Microsoft \ WindowsXaml \ v11.0 \ Microsoft.Windows.UI.Xaml .Common.targets (190,9) "

<CompileXaml 
       LanguageSourceExtension="$(DefaultLanguageSourceExtension)" 
       Language="$(Language)" 
       RootNamespace="$(RootNamespace)" 
       XamlPages="@(Page)" 
       XamlApplications="@(ApplicationDefinition)" 
       PriIndexName="$(PriIndexName)" 
       ProjectName="$(MsBuildProjectName)" 
       IsPass1="True" 
       CodeGenerationControlFlags="$(XamlCodeGenerationControlFlags)" 
       ProjectPath="$(MSBuildProjectFullPath)" 
       OutputPath="$(XamlGeneratedOutputPath)" 
       OutputType="$(OutputType)" 
       TargetPlatformWinMDLocation="$(TargetPlatformWinMDLocation)" 
       ReferenceAssemblyPaths="@(ReferenceAssemblyPaths)" 
       ReferenceAssemblies ="@(ReferencePath)" 
       ShareAppDomains="$(XamlShareAppDomains)" 
       ForceSharedAppDomainShutdown="False" 
       CompileMode="RealBuildPass1" 
       XAMLFingerprint="$(XAMLFingerprint)" 
       FingerprintIgnorePaths="$(XAMLFingerprintIgnorePaths)" 
       VCInstallDir="$(VCInstallDir_110)" 
      > 

      <Output Condition=" '$(ManagedAssembly)'!='false' " ItemName="Compile" TaskParameter="GeneratedCodeFiles" /> 

      <!-- Add to the list list of files written. It is used in Microsoft.Common.Targets to clean up 
       for a next clean build 
       --> 
      <Output ItemName="FileWrites" TaskParameter="GeneratedCodeFiles" /> 
      <Output ItemName="FileWrites" TaskParameter="GeneratedXamlFiles" /> 
      <Output ItemName="_GeneratedCodeFiles" TaskParameter="GeneratedCodeFiles" /> 
     </CompileXaml> 
+0

Có thể bạn có thể thử chạy một bản dựng với Trình theo dõi quy trình được bật để xem liệu bạn có thể tìm thấy tệp bị thiếu mà nó đang tìm kiếm hay không. –

+0

Không có gợi ý từ quá trình thám hiểm: ( – cjgaliana

+1

Lỗi này không đủ cụ thể. Tác vụ CompileXaml thực hiện một số lượng công việc không liên quan đến nhiều tệp. Nếu SysInternals 'ProcMon không trợ giúp thì bạn sẽ cần phải đầu tư thời gian để nhận –

Trả lời

2

Vấn đề của tôi là tôi đang sử dụng một số tham chiếu đến những thứ chưa được đưa vào giải pháp. Khi tôi đã xóa tất cả các tham chiếu, mọi thứ đã hoạt động. Nhưng thông báo lỗi hoàn toàn vô dụng.

0

Vấn đề đối với tôi là một trong các tài liệu tham khảo của tôi đã bị chặn. Nó có lỗi quyền đọc. Khi tôi đã bỏ chặn nó thì Solution được xây dựng mà không có vấn đề gì.

0

Tôi gặp lỗi này khi tạo bản sao dự án, thêm nó vào một giải pháp mới, nhưng quên cập nhật các tham chiếu, vì vậy họ vẫn đang xem đường dẫn tham chiếu cũ.