当我尝试在 C#/XAML 中编译 Windows 应用商店应用程序时遇到问题。每次我尝试编译时都会收到此错误:
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)
我有文件,所以不是问题。当我从模板创建新的 Windows 8 商店应用程序时也会出现此问题,因此我的系统似乎存在问题。我尝试重新启动计算机并修复 VS2012 安装(两次)但没有结果。
任何想法?任何人都可以帮我解决这个问题吗?我有 Visual Studio Professional 2012。提前致谢
编辑:这是“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>