core icon indicating copy to clipboard operation
core copied to clipboard

How to call a .NET 4.6.2 DLL from a .NET Core MVC Web App

Open birdus01 opened this issue 9 years ago • 7 comments

I'd like to write a web app in .NET Core, but I need to call a DLL that was compiled for .NET 4.6.2. Is this possible? I'm using Visual Studio 2017.

birdus01 avatar Apr 28 '17 14:04 birdus01

This is something we're looking to make possible in the upcoming update to VS. The plan is to let you reference the dll but depending on the dll, it may or may not work depending on what it depends on.

Petermarcu avatar May 04 '17 05:05 Petermarcu

I think if you chose ASP.Net Core Web Application (.Net Framework), it will support all Libs and Dlls for .Net.

I was looking for TransactionScope in .Net Core which is not yet implemented in .Net Core v1 so I chose the target framework as .Net for now, until the feature arrives for .Net Core.

Hope it helps.

Zeshan-Munir avatar May 21 '17 22:05 Zeshan-Munir

See: https://github.com/dotnet/core/pull/727

richlander avatar Jul 04 '17 03:07 richlander

This is now possible from a .NET Core 2.0 project. I am going to close this. It's expected to work so if you hit any issues, please open a new issue with the specific details.

Petermarcu avatar Oct 06 '17 17:10 Petermarcu

Is this possible in .NET Core 2.0..? I have some issues in doing this...

nilanthasj avatar Aug 20 '18 20:08 nilanthasj

If you have the latest SDK's and Visual Studio, please open a new issue with the details of the issues you are encountering.

Petermarcu avatar Aug 20 '18 20:08 Petermarcu

@Petermarcu Where are the instructions for setting this up? I wasn't able to figure it out by just blindly poking around.

aaronfranke avatar Jun 17 '21 19:06 aaronfranke