Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

How to add reference to legacy .NET assemblies?

$
0
0

Hello:
I'm using VS 2017 and I'm trying to use ASP .NET Core for building a REST API.

How would I reference a legacy .NET assembly in ASP .NET Core?

I referenced an existing assembly and when I try to create an instance in my Controller, it gives me this error below. Any help on this will be much appreciated.

An unhandled exception occurred while processing the request.

<div class="titleerror">FileNotFoundException: Could not load file or assembly 'SMTP.Net, Version=3.0.1.25, Culture=neutral, PublicKeyToken=986a9aa31056680b'. The system cannot find the file specified.</div>

WebApplication1.Controllers.TestController.Welcome(string name, int numTimes)

<div id="stackpage" class="page">
  • FileNotFoundException: Could not load file or assembly 'SMTP.Net, Version=3.0.1.25, Culture=neutral, PublicKeyToken=986a9aa31056680b'. The system cannot find the file specified.

    • WebApplication1.Controllers.TestController.Welcome

</div>

Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>