在我的VS2010中,當我構建我的解決方案時,我在文件Microsoft.Common.Targets中有超過100個警告。當我嘗試構建,發佈或運行我的程序時,我得到的只是警告,但是當我雙擊它以獲取更多信息時,Microsoft.Common.Targets彈出,然後我得到所有警告。在Microsoft.Common.Targets中構建「無效的子元素」警告
此文件Microsoft.Common.Targets是.net框架的一部分,並具有MSBuild內置目標等。它具有在屬性窗口中關聯的相關模式。
一些示例警告(2滿分100分):
Warning 2 The element 'PropertyGroup' in namespace 'http://schemas.microsoft.com/developer/msbuild/2003' has invalid child element 'CustomBeforeMicrosoftCommonTargets' in namespace 'http://schemas.microsoft.com/developer/msbuild/2003'. List of possible elements expected: 'Property' in namespace 'http://schemas.microsoft.com/developer/msbuild/2003'. C:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets 22 10 Miscellaneous Files
Warning 3 The element 'PropertyGroup' in namespace 'http://schemas.microsoft.com/developer/msbuild/2003' has invalid child element '_OriginalConfiguration' in namespace 'http://schemas.microsoft.com/developer/msbuild/2003'. List of possible elements expected: 'Property' in namespace 'http://schemas.microsoft.com/developer/msbuild/2003'. C:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets 60 10 Miscellaneous Files
爲什麼是這個文件突然在我的編輯器,當它是不是我的項目的一部分,以及如何告訴Visual Studio來忽略這個框架文件同時建設。
同樣的事情發生在我和像你這樣我也擺脫了警告。謝謝 – Sheen
哈哈這是可笑的...張貼解決方案! – womp
剛剛在VS 2013發生了我。 – Palec