首页 > 解决方案 > VS2019 Comm 中的 microsoft.vsa.dll 错误,但在 VS2013 Pro 中没有

问题描述

我有当前正在使用 .NET Framework 4 在 Visual Studio 2013 Pro 中构建和运行的旧代码,如预期的那样。此 C# 代码位于单个文件中,并引用来自第三方的单个 .dll (VmfgInventory.dll)。dll 被添加为项目中的引用。

我在 Visual Studio 2019 Community Ed 中创建了一个新项目。然后将 VS2013 Pro 项目中的 C# 文件复制到 VS2019 Comm 项目中。接下来,我从 VS2013 的 bin\Debug 目录中复制了 VmfgInventory.dll 添加到 VS2019 的 bin\Debug 目录中,作为参考添加。

然后我在 VS2019 中执行了完全相同的代码,它崩溃了。我收到以下 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."

没看懂,就是一模一样的开发机器。我查看了整个机器,唯一能找到匹配Microsoft.Vsa的是 .NET Framework 2 下的这个 dll 的版本 8。

我可能会忽略什么?什么允许相同的代码和引用的 dll 在 VS2013 中工作但在 VS2019 中不能工作?

标签: c#dllvisual-studio-2013visual-studio-2019

解决方案


推荐阅读