VS2010 でソリューションをビルドすると、ファイルMicrosoft.Common.Targetsに 100 を超える警告が表示されます。プログラムをビルド、公開、または実行しようとすると、警告だけが表示されますが、ダブルクリックして詳細情報を取得しようとすると、Microsoft.Common.Targets がポップアップ表示され、すべての警告が表示されます。
このファイル Microsoft.Common.Targets は .net フレームワークの一部であり、MSBuild 組み込みのターゲットなどがあります。また、プロパティ ウィンドウに適切なスキーマが関連付けられています。
警告の例 (100 件中 2 件) :
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 に指示する方法を教えてください。