Quantcast
Channel: Active questions tagged nuget-package - Stack Overflow
Viewing all articles
Browse latest Browse all 3067

ASP.NET Core and interactions with older framework version classes

$
0
0

I have to build an ASP.NET Core Razor pages website (Project A), and the website needs to interact in any way with an older C# library (.NET 4.5).

So I created a .NET 4.5 project (Project B), in which installed the library package to, in order to interact with it.

So, in the same solution in VS I have both Project A and Project B.

When I call project B from project A, I get this error:

"FileNotFoundException: Could not load file or assembly 'System.Data.SqlClient, Version=0.0.0.0"

The error seems to happen inside that class that Project B interacts with. I noticed in other testes I made that if I set Project B as startup project, things go ok, and there's obviously no version problems.

But if I start with Project A, I get the error. I somewhat expected that Project B would be "independent" in its interactions with the package class. Any way to do this?

Anyone knows what I'm doing wrong? Maybe my approach is obviously flawed, but I'm really a noob in this kind of stuff. What would you suggest? How to have a "middle man" here?

I basically really want to build the website using net core and razor pages and use another class as an API of sorts, only to interact with the older class to retrieve data, etc.

Any suggestion or thought would e greatly appreciated. I need to know which direction to go. Cheers!


Viewing all articles
Browse latest Browse all 3067

Trending Articles



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