Visual Studio 2017参考与依存关系 [英] Visual Studio 2017 References vs Dependencies

查看:114
本文介绍了Visual Studio 2017参考与依存关系的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Visual Studio 2017中有一个.NET Core解决方案,它是根据.NET 4.7框架构建的.

I have a .NET Core solution in visual studio 2017 that is building against the .NET 4.7 framework.

在主Web应用程序中,有一个依赖项菜单,可将引用分为逻辑类别(分析器,装配体,NuGet,项目).

In the main web application there is a dependencies menu that breaks down references into logical categories (Analyzers, Assemblies, NuGet, Projects).

在帮助程序项目中,它只有一个引用菜单,里面杂乱无章.有没有办法在此获得与Web应用程序相同的待遇?

In the helper project it only has a references menu with everything jumbled inside. Is there a way to get the same treatment here as the web application got?

推荐答案

它基于项目文件类型.较旧的Full Framework项目文件为您提供了References区域,而较新的项目文件为您提供了Dependencies区域.换句话说,只要它是.NET Framework 4.7项目,您就无能为力了.

It's based on the project file type. The older Full Framework project file gives you the References area, whereas the newer project files give you the Dependencies area. In other words, as long as it's a .NET Framework 4.7 project, there's nothing you can do about it.

也就是说,您可以简单地使其成为.NET Standard 2.0项目,该项目的确受益于新式项目文件.确实,无论如何,您所有的类库都应该针对.NET Standard,以实现更大的互操作性.

That said, you can simply make it a .NET Standard 2.0 project, which does benefit from the new-style project file. Really, all your class libraries should be targeting .NET Standard, anyways, for greater interoperability.

这篇关于Visual Studio 2017参考与依存关系的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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