We have a 15 year old project that we want to move from Visual Studio 2010 to Visual Studio 2017. The project compiles fine in VS 2010, but when we tried moving it to VS 2017 we got a bunch of errors.
Basically, we have a Businesslayer with a class called Security:
<Serializable()> Public MustInherit Class Security
Public Function GetPermission() As Boolean
End Function
End Class
Then we have a Domainlayer with a bunch of classes that uses Security:
<Serializable()> Public NotInheritable Class DomainClass
Inherits BLL.Security
Shadows Function GetPermission() As Boolean
End Function
End Class
And finally we have an Asp.Net project using the DomainClass function:
Public Class PresentationLayerClass
Private m_Domain As Domains.DomainClass
m_Domain = new Domain.DomainClass()
m_Domain.GetPermission()
End Class
Obviously the Asp.net project have a reference to the Domain and the Domain have a reference to the Businesslayer. When we compile this in VS 2017 we get thousands of BC30653 errors in the presentation layer:
BC30652 Reference required to assembly 'Business Logic Layer, Version=1.4.0.2, Culture=neutral, PublicKeyToken=null' containing the type 'Security'. Add one to your project.
How do we solve this? We want to avoid adding a reference to Businesslayer in the Asp.net layer. And why is this different in VS 2017?
[Edit:] Things that I have tried:
I think I found the answer to my question in this thread :
Why does VS 2015 need a reference to System.Data.Entity but VS 2013 does not?
It seems like it has to do with how the new compiler in VS 2015 handles transitive references. So I will just have to add the reference it asks for.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.