0

I have legacy code that is currently building and running in Visual Studio 2013 Pro with .NET Framework 4 as expected. This C# code is in a single file and references a single .dll (VmfgInventory.dll) from a third party. The dll is added as a reference in the project.

I created a new project in Visual Studio 2019 Community Ed. Then copied the C# file from the VS2013 Pro project into the VS2019 Comm project. Next, I added copied the VmfgInventory.dll from the bin\Debug directory of VS2013 and added it to the bin\Debug directory of VS2019 and added it as a reference.

I then executed the exact same code in VS2019 and it crashes. I receive the following System.IO.FileNotFoundException

Message "Could not load file or assembly 'Microsoft.Vsa, Version=7.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified."

I don't understand it, it's the exact same development machine. I've looked all over my machine and the only thing that I can find that matches Microsoft.Vsa is a version 8 of this dll that is under .NET Framework 2.

What could I possibly be overlooking? What allows the same code and referenced dll to work in VS2013 but not in VS2019?

Jeff Nichols
  • 167
  • 1
  • 1
  • 12
  • look at this doc:https://learn.microsoft.com/en-us/visualstudio/porting/port-migrate-and-upgrade-visual-studio-projects?view=vs-2019 – Rebwar Apr 02 '20 at 06:31
  • That's a good point. In trying to test things out I created a simple forms app that is also running targeted .NET 2.0. I then loaded the dll and things worked right. I seems to me that I don't have something turned on in VS2019 that can allow it to run a .dll that was targeted for .NET 2.0. https://stackoverflow.com/questions/13462647/how-to-use-app-config-on-the-dll-instead-of-exe – Jeff Nichols Apr 02 '20 at 23:37

0 Answers0