Visual Studio 2010 Prof: Solution Explorer not showing files from Import .targets
<Import Project="conf/file.targets">
Everything seems fine except one thing, in solution explorer i dont see files which are defined in .targets, but project comp开发者_StackOverflow中文版iles without any problems. Is it bug, or normal behavior? How can i see files that are imported from .targets? (ie. SomeFile and SomeFile2.)
Example test.targets:<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'TestConfig|x86'">
<OutputPath>bin\TestConfig\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<ItemGroup Condition=" '$(Configuration)'=='TestConfig' ">
<Compile Include="SomeFile.cs" />
<Compile Include="SomeFile2.cs" />
</ItemGroup>
</Project>
Everything was visible in Solution Explroer when it was defined in .csproj.
PS. i searched in google and stackoverflow, but didn't found any usefull information.
Visual Studio's use of MSBuild files is subset of what MSBuild is capable of.
In particular VS structures project files in a way it can understand, it is quite possible to have a valid MSBuild file that is not a valid VS project file. If you want to use VS to manage project content you need to stick to the subset of MSBuild that VS uses and understands.
精彩评论