如何在解决方案中找到所有项目的.NET版本 [英] How to find .NET version of all projects in solution

查看:145
本文介绍了如何在解决方案中找到所有项目的.NET版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我已经拥有一个包含50多个不同项目的.net应用程序。我想知道这些项目使用哪个.net版本。实际上所有项目都是在.net 3.5版中开发的。现在我将它们转换为.net 4.5版。因此,我不是一个一个地检查所有项目版本,而是想立刻检查所有项目。有什么办法检查一下吗?

提前致谢。



我尝试过:



我正在逐个检查每个项目版本,但这是一个非常耗时的过程。谷歌寻找解决方案,但找不到合适的方法。

Hi All,
I already have one .net application which contains more than 50 different projects. I want to know which .net version is used by these projects. Actually all projects are developed in .net version 3.5. Now I am converting them to .net version 4.5. So instead of checking all projects version one by one, I want to check all at once. Is there any way check this?
Thanks in advance.

What I have tried:

I am checking each projects versions one by one but this is very time consuming process. Googled for the solution but can't find proper way.

推荐答案

你没有足够的谷歌。



这就是您所需要的: Target Framework Migrator - Visual Studio Marketplace [ ^ ]
You didn't google hard enough.

This is what you need: Target Framework Migrator - Visual Studio Marketplace[^]


在csProj中或者每个项目的vbProj文件将是一行看起来像

In the csProj or vbProj file for each project will be a line that looks like
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>

您可以在文件工具中使用文本搜索(例如用免费编辑<啊ref =https://notepad-plus-plus.org/> NotePad ++ [ ^ ]搜索短语 TargetFrameworkVersion 以获取项目中的版本列表

You could use a text search in files tools (such as the one that comes with the free editor NotePad++[^] to search for the phrase TargetFrameworkVersion to get a list of the versions in the project


One方法是编写一个快速的应用程序。

解决方案中的每个项目都在主解决方案文件夹下面的自己的文件夹中,每个项目文件夹包含一个.CSPROJ或.VBPROJ文件。 br />
该项目文件是项目的XML描述符,包含节点 PropertyGroup / TargetFrameworkVersion

如果扫描每个文件夹,读取每个项目文件,您可以获取(或更改)解决方案中所有项目的框架版本。请注意,更改框架版本可能会导致您需要修复的编译器错误,但您可能已经知道了!
One way is to write a quick app.
Each project within a solution is inside it's own folder below the main solution folder, and each project folder contains a ".CSPROJ" or ".VBPROJ" file.
That project file is an XML descriptor of the project, and contains a node PropertyGroup/TargetFrameworkVersion.
If you scan each folder, read each project file, you can pick up (or change) the framework version for all projects in the solution. Note that changing the framework version may cause compiler errors you'll need to fix, but you probably know that already!


这篇关于如何在解决方案中找到所有项目的.NET版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆