本文介绍了.Net Core 1.1中的传递引用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在.NET Core 1.1和Visual Studio 2017 RC中开发示例Web应用程序时,我实现了以下目标:




While developing a sample web app in .NET Core 1.1 and Visual Studio 2017 RC, I realized the following:

As you can see:

  • ClassLibrary3 has a reference to ClassLibrary2,
  • and ClassLibrary2 has a reference to ClassLibrary1

I wrote a simple method in class Class3 of ClassLibrary3 project, and the Intellisense allowed me to use Class1 just writing the name of the class, I mean, without doing an explicit reference to ClassLibrary1 project.

Am I missing some point here? I don't want somebody simply comes and overlooks ClassLibrary2.

Thanks.

解决方案

Transitive project-to-project references are a new feature of Visual Studio 2017 and Microsoft.NET.Sdk. This is intentional behavior.

See https://github.com/dotnet/sdk/issues/200.

这篇关于.Net Core 1.1中的传递引用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-06 05:34