我有大量复杂的解决方案,依赖于许多nuget包。我想找出所有我的nuget依赖项的当前版本。
目前我有一个控制台应用程序,它可以查看源代码树,查找所有packages.config文件,提取相关信息并将其转储到文件中。 nuget有内置的方法吗?
答案 0 :(得分:0)
NuGet提供了一个Get-Package command,您可以从Package Manager控制台运行。它将列出当前解决方案中的软件包和版本。示例输出如下所示:
PM> Get-Package
Id Version Description/Release Notes
-- ------- -------------------------
CommonServiceLocator 1.3 The Common Service Locator library contains a shared interface for service l...
MvvmLight 5.2.0.0 The MVVM Light Toolkit is a set of components helping people to get started ...
MvvmLightLibs 5.2.0.0 The MVVM Light Toolkit is a set of components helping people to get started ...
Newtonsoft.Json 7.0.1 Json.NET is a popular high-performance JSON framework for .NET
Xamarin.Forms 1.3.3.6323 Build native UIs for iOS, Android, and Windows Phone from a single, shared C...
Xamarin.Forms 1.4.4.6392 Build native UIs for iOS, Android, and Windows Phone from a single, shared C...
Xamarin.Insights 1.10.6 Insights for your Apps
请注意,这需要恢复NuGet包。 Get-Package命令基本上查看packages目录以查找使用过的NuGet包。它不使用packages.config文件。