Ian Vink
Ian Vink

Reputation: 68750

.NET 6 referencing .Net 4.8 with old WCF Dependencies

I have a .Net 6.0 application that references an old .Net 4.8 project which uses WCF.

The .Net 4.8 project needs a number of DLLS not in .NET 6.0 like System.Web.Services.

When I run the .Net 6.0 application and call the .NET 4.8 project, I get an error that System.Web.Services can't be found.

How can I tell the .Net 4.8 project where System.Web.Services is?

Upvotes: 2

Views: 2727

Answers (1)

Lan Huang
Lan Huang

Reputation: 806

Using .NET Framework compatibility mode does not guarantee what will happen.

If you want your library to have solid cross-framework compatibility between .NET Framework and .NET Core/6, you can try targeting your library in .NET Standard.

For an alternative to WCF, you can look at:https://learn.microsoft.com/en-us/dotnet/core/whats-new/dotnet-5#windows-communication-foundation

Upvotes: 2

Related Questions