Integrating C# projects with VB

Asked

Viewed 98 times

0

I need to create a C# project that uses a DLL that was written in VB.NET.

I added the dependency, imported the library and used the method. However, at the time of execution when I will consume a method that makes access to the database (and works normally in VB.NET projects) I get the following error:

System.IO.Filenotfoundexception: 'Could not load file or Assembly 'System.Data.Sqlclient, Version=4.6.0.0, Culture=neutral, Publickeytoken=b03f5f7f11d50a3a'. System cannot find specified file

Even if project C# has the reference System.Data.SqlClient installed via Nuget.

inserir a descrição da imagem aqui

  • How many projects (csproj or vbproj) have the solution?

  • Well it is known that what you want to do works, the problem there may be the compatibility of version and even lack of some reference in the project you will use. It’s a complicated problem for us to check.

  • @LINQ has 6 projects within this Solution.

  • You referenced the library also in the main project (which runs)?

  • @LINQ In the project that is marked as "Start up"? Yes, in the case is what is in the print. Se uso a dll em um outro projeto VB.net funciona normal, mas criado este projeto do Asp.net Core, added the reference via Nuget, and added the reference to the DLL (developed in Vb) but it’s as if the references between them were different... I tried to put the same DLL reference in the C# project but does not let gives "Invalid or unsupported reference".

  • Just to try to understand: the library is made in . NET Framework and you are trying to reference in a project . NET Core?

  • Yes.... no chance? Never mind the references used?

Show 2 more comments
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.