Visual studio 快速确定VS解决方案中哪些项目针对特定版本的方法?

Visual studio 快速确定VS解决方案中哪些项目针对特定版本的方法?,visual-studio,Visual Studio,我有一个包含大量项目的VisualStudio解决方案,其中一些是针对.NETV2.0的,一些是针对v3.5的 我知道我可以依次右键单击每个项目,查看它的目标版本,但这将永远持续下去 有没有人知道一种更快的方法可以确定哪些项目的目标是v2.0,哪些项目的目标是v3.5 编辑: 我希望能够使用TargetFrameworkVersion节点来确定版本,但有些项目文件没有此节点,例如 <Project DefaultTargets="Build" xmlns="http://schemas.m

我有一个包含大量项目的VisualStudio解决方案,其中一些是针对.NETV2.0的,一些是针对v3.5的

我知道我可以依次右键单击每个项目,查看它的目标版本,但这将永远持续下去

有没有人知道一种更快的方法可以确定哪些项目的目标是v2.0,哪些项目的目标是v3.5

编辑:

我希望能够使用TargetFrameworkVersion节点来确定版本,但有些项目文件没有此节点,例如

<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProductVersion>8.0.50727</ProductVersion>
    <SchemaVersion>2.0</SchemaVersion>
    <ProjectGuid>{E11A268C-9F62-4970-9338-129C35AD2354}</ProjectGuid>
    <OutputType>Library</OutputType>
    <AppDesignerFolder>Properties</AppDesignerFolder>
    <RootNamespace>BusinessEntities</RootNamespace>
    <AssemblyName>Business Entities</AssemblyName>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>bin\Debug\</OutputPath>
    <DefineConstants>DEBUG;TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <DebugType>pdbonly</DebugType>
    <Optimize>true</Optimize>
    <OutputPath>bin\Release\</OutputPath>
    <DefineConstants>TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="System" />
    <Reference Include="System.Data" />
    <Reference Include="System.Drawing" />
    <Reference Include="System.Xml" />
  </ItemGroup>
  <ItemGroup>
    <Compile Include="SomeClass.cs" />
    <Compile Include="SomeOtherClass.cs" />
  </ItemGroup>
  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
       Other similar extension points exist, see Microsoft.Common.targets.
  <Target Name="BeforeBuild">
  </Target>
  <Target Name="AfterBuild">
  </Target>
  -->
</Project>

调试
任意CPU
8.0.50727
2
{E11A268C-9F62-4970-9338-129C35AD2354}
图书馆
性质
商业实体
商业实体
真的
满的
假的
bin\Debug\
调试;痕迹
促使
4.
pdbonly
真的
bin\Release\
痕迹
促使
4.
…但是如果我右键单击VS中的项目,它会显示目标版本是.NET v2.0。另外,为了清楚起见,我需要对许多解决方案重复这个过程,因此手动操作是一个非常不可取的选择

谢谢

这里有一个可能有用的方法。 您必须编写自己的代码来解析项目文件以获得框架版本

<TargetFrameworkVersion>v3.5</TargetFrameworkVersion> 
v3.5
另一个选项是对解决方案文件夹使用命令行。 使用MS DOS命令:

findstr "<TargetFrameworkVersion>" *.csproj
findstr”“*.csproj
结果将显示在屏幕上

更新:

因为较旧的项目不包含此行。我们可以使用另一个命令,搜索文件不包含该行

findstr /v "<TargetFrameworkVersion>" *.csproj
findstr/v”“*.csproj

你好,亲爱的。我确实认为我可以这样做,但是许多项目文件没有TargetFrameworkVersion节点-我不知道这是否是因为它们是在早期版本的Visual Studio中创建的?您可以在此发布一个示例吗?