Microsoft.Windows.UI.Xaml.Common.Targets not found
Asked Answered
E

3

8

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>
Euphemie answered 30/4, 2013 at 15:42 Comment(6)
Maybe you could try running a build with Process Monitor turned on to see if you could find which missing file it is looking for.Kyrstin
No hint from process explorer :(Euphemie
The error isn't specific enough. The CompileXaml task does a nontrivial amount of work that involves many files. If SysInternals' ProcMon doesn't help then you'll need to invest time in getting your machine stable again. A good idea anyway since these kind of problems are rarely isolated.Arctic
Finally, I back to a previous backup image, so I don't know the reason why this error appeared :(Euphemie
To what previous image did you go back to? A system backup?Melodist
Hi! @Melodist Yes, a system backupEuphemie
M
2

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.

Melodist answered 9/12, 2014 at 3:32 Comment(0)
C
0

The issue for me was that one of my references was blocked. It had a read permission error. Once I unblocked it then the Solution built without a problem.

Chockfull answered 10/6, 2015 at 21:49 Comment(0)
M
0

I got this error when I made a copy of a project, added it to a new Solution, but forgot to update the references, so they were still looking at the old reference path.

Mystique answered 29/9, 2015 at 7:50 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.