msbuild declares Microsoft.CppBuild.targets as invalid - by Martin v. Löwis

Status : 

  Not Reproducible<br /><br />
		The product team could not reproduce this item with the description and steps provided.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 522124 Comments
Status Closed Workarounds
Type Bug Repros 7
Opened 12/25/2009 4:00:13 PM
Access Restriction Public


When compiling a project converted from VS 2008, many warnings of the form

Warning	1	The element 'PropertyGroup' in namespace '' has invalid child element 'ManagedAssembly' in namespace ''. List of possible elements expected: 'Property, AllowUnsafeBlocks, AppConfigForCompiler, ApplicationIcon, ApplicationRevision, ApplicationVersion, AppDesignerFolder, AspNetConfiguration, AssemblyKeyContainerName, AssemblyKeyProviderName, AssemblyName, AssemblyOriginatorKeyFile, AssemblyOriginatorKeyFileType, AssemblyOriginatorKeyMode, AssemblyType, AutorunEnabled, BaseAddress, BootstrapperComponentsLocation, BootstrapperComponentsUrl, BootstrapperEnabled, CharacterSet, CheckForOverflowUnderflow, CLRSupport, CodePage, Configuration, ConfigurationName, ConfigurationOverrideFile, CreateDesktopShortcut, CreateWebPageOnPublish, CurrentSolutionConfigurationContents, DebugSecurityZoneURL, DebugSymbols, DebugType, DefaultClientScript, DefaultHTMLPageLayout, DefaultTargetSchema, DefineConstants, DefineDebug, DefineTrace, DelaySign, DisableLangXtns, DisallowUrlActivation, CodeAnalysisApplyLogFileXsl, CodeAnalysisConsoleXsl, CodeAnalysisCulture, CodeAnalysisFailOnMissingRules, CodeAnalysisForceOutput, CodeAnalysisGenerateSuccessFile, CodeAnalysisIgnoreB....	C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets	32	8	Miscellaneous Files

are produced.
Sign in to post a comment.
Posted by OfekShilon on 11/25/2014 at 8:09 AM
This is probably not something in the solution itself. As noted here ( and here (, the way to reproduce is probably to open *a lot* of editor windows and re-build for a while.
Posted by chrsmrtn on 7/2/2012 at 4:37 PM
I ran into this when i converted my C++ project from Visual Studio .NET up to Visual Studio 2010. I opened the Visual Studio Command prompt ran the following:

msbuild win32.sln /nologo /p:Configuration=Release /t:rebuild /val

Apparently the /val flag repaired something about my project. It did add in the _CRT_SECURE_NO_WARNINGS preprocessor definition which I decided to remove again to I be reminded to take a look at those later on. Hope this helps :)
Posted by Li Shao [MSFT] on 1/14/2011 at 10:09 AM
I have not received any additional information. If anyone has a repro, please contact me at lishao AT I will resolve the bug as "not repro" for now.

Please feel free to reactivate the case if you have a repro. Thank you for reporting the issue to us.

Li Shao, Project and Build Team
Posted by Li Shao [MSFT] on 12/28/2010 at 2:51 PM
So far, I am not able to repro the problem. Can anyone share with me a repro application so that I can investigate further on this? My email is lishao at

Li Shao, Project and Build Team
Posted by devManDev on 11/30/2010 at 5:56 AM
I have the same bug on a Windows Server 2008 machine.
I have a solution with both C# & C++ projects.
When just trying to build the first C++ project I get the MSB8013 error.
Even after removing anything related to "Win32" from the sln and project files, the error doesn't go away.
Building the same exact solution (from a common source repository) on other machines with Visual Studio works without problems.

I can upload the output.txt as instructed above if necessary.
Please advise.
Posted by Seyran Avanesyan on 9/30/2010 at 4:29 PM
The steps are something like those: I copied (manually from windows explorer window) a project from one solution folder to another. Added the project to the new solution there. Opened the new solution in Visual Studio and using GUI removed 2 out of 4 references of my project).

It was giving this error messages:
"This project doesn't contain the Configuration and Platform combination of Debug|Win32"
Apparently, when I removed references using new GUI it didn't delete those 2 redundant references completely.

Solution: Open project file manually (notepad!?), find and remove all unused references to projects that are not visible from VS GUI (Project Properties / Common Properties / Framework and References).
Posted by londey on 8/31/2010 at 2:25 PM
I was experiencing this error "This project doesn't contain the Configuration and Platform combination of Debug|Win32" on a project and solution containing only x64 targets. It had me stumped for a bit but after running with MSBuild output and log set to diagnostic I discovered that a dependent project was missing from the solution. After re-adding that and another clean and rebuild everything started working again.

Check for missing projects in your solution.
Posted by Roman.St on 7/20/2010 at 12:35 PM
To anyone experiencing "error MSB8013: This project doesn't contain the Configuration and Platform combination of Debug|Win32" or similar: I got this error after renaming my configurations and hitting Rebuild.

I closed VS, deleted all the intermediate files (not easy because annoyingly Visual Studio barfs them all over the source tree...) and reopened. The problem disappeared.
Posted by Nikita Jorniak on 5/27/2010 at 6:24 PM
I had the same problem: C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(283,5): error MSB8013: This project doesn't contain the Configuration and Platform combination of Debug|Win32.
The solution is all native C++.
The strange thing was that in another solution this project compiled just fine. So I carefully compared the two. The difference was that the bad one was missing a dependent project. The missing project was listed in references, but was not part of the solution. As soon as I added it and marked the appropriate check boxes in the Dependencies dialog it all compiled without errors.
Posted by Microsoft on 5/20/2010 at 1:47 PM
Could someone send me the solution with which this issue reproduces? My email is richap @
Posted by codebreaker on 5/18/2010 at 2:22 PM

does any one have a solution for this error?
C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(283,5): error MSB8013: This project doesn't contain the Configuration and Platform combination of Debug|Win32.

I keep getting the above error when I try to build the Debug version of my app.
Basically I converted my solution from VS2008 to VS 2010. This particualr solution is dependent on a couple of static libraries. Soon after the conversion, when i build the Release | Win32 , it builds fine. But once i do the Debug build, the build fails with the above errors and now even the Release version which built fine keeps failing with the same error. I am not sure what I am missing. Any inputs are greatly appreciated. Or if this is a bug, please let me know of any workarounds.
Posted by George Menhorn on 5/4/2010 at 10:39 PM
My apologies. Please disregard my previous comment. The error caused by a project reference to a project without a particular configuration name and the 100 warnings are completely unrelated. I still see the warnings in the Error List (but not the Output Window). The /v:diag msbuild option does not show these warnings at all.
Posted by George Menhorn on 5/4/2010 at 10:21 PM
I am also able to reproduce this problem with 100 warnings pointing to ...\msbuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets.

The problem only occurs with a single project in a solution containing a total of 103 projects. Converted from VS2005 -> VS2010, C++.

The output window does not contain any of these warnings, only a single error:

3>------ Build started: Project: FvConfigFileServer, Configuration: Govt Debug Win32 ------
3>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(283,5): error MSB8013: This project doesn't contain the Configuration and Platform combination of Govt Debug|Win32.

Which is strange since the project certainly contains this configuration (along with three others):

<ItemGroup Label="ProjectConfigurations">
    <ProjectConfiguration Include="Debug|Win32">
    <ProjectConfiguration Include="Govt Debug|Win32">
     <Configuration>Govt Debug</Configuration>
    <ProjectConfiguration Include="Govt Release|Win32">
     <Configuration>Govt Release</Configuration>
    <ProjectConfiguration Include="Release|Win32">

The problem, however, only happens with the 'Govt Debug' and 'Govt Release' configurations (in this one project only). All other projects contain these configurations as well and do not exhibit this behavior.

Running msbuild with /v:diag as suggested did help me solve this.

The problem was that there was a (unnecessary) ProjectReference to a project outside that solution that did not indeed have the Govt Debug configuration. Removing the reference fixed the problem.

Maybe changing the wording of the error from 'This project' to the actual project name would help developers solve this a bit faster.
Posted by Eugene Kosmin on 5/4/2010 at 8:51 PM
Hi All,

After system restart without closing vs2010 I had the same issue. After changing some projects settings related to output filename all warnings about PropertyGroup completely disappeared.

Before restart there was no PropertyGroup warning and my project was converted from vs2005.

I’ve tried to reproduce the issue with clean vs2005 => vs2010 C++ projects but no success.

Hope it helps in your investigation…

Best regards,
Eugene Kosmin
Posted by Microsoft on 1/14/2010 at 7:47 AM
Thank you for your feedback. Since we have not heard from you, we are resolving this bug as Not Repro. Please reactivate this bug as appropriate.

Richa Prasad
Program Manager
Visual Studio Platform Team
Posted by Microsoft on 1/4/2010 at 2:05 PM
Thank you for reporting this issue. Could you follow the steps that reproduced the bug and when building, use the following command from the VS2010 command prompt:
msbuild /v:diag <solution file> >> output.txt

And then please attach the output.txt file to this bug.

Richa Prasad
Program Manager
Visual Studio Platform Team
Posted by Microsoft on 12/28/2009 at 1:23 AM
Thank you for your feedback, We are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(