Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Microsoft.Windows.UI.Xaml.Common.Targets not found

I have a problem when I try to compile a Windows Store App in C#/XAML. Every time that I try to compile I receive this error:

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

and

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)

I have the file, so it is not the problem. This problem also appears when I create a new Windows 8 store app from a template, so it seems a problem with my system. I tried to reboot the computer and repair the VS2012 installation (twice) without results.

Any idea? Anyone could help me to solve this problem? I have Visual Studio Professional 2012. Thanks in advance

EDIT: This is the code in "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>
like image 228
cjgaliana Avatar asked Apr 30 '13 15:04

cjgaliana


1 Answers

My problem was I was using some references to things that were not yet included in the solution. Once I removed all references, everything worked. But the error message is totally useless.

like image 102
Hame Avatar answered Nov 15 '22 07:11

Hame