最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

c# - My .NET 8 app and a plugin reference the same project, but only the plugin receives error - Stack Overflow

programmeradmin2浏览0评论

I have a Windows .NET 8 Application and a .NET 8 plugin for AutoCAD.

Both solutions and their shared project were upgraded from .NET Framework with the migration assistant.

Both reference the same DataAccess project we use to connect with Azure databases and do CRUD operations. The migration assistant added the Microsoft.SqlServer.SqlManagementObjects package to the DataAccess project, which contains Microsoft.Data.SqlClient (v5.1.6)

The Windows desktop application runs fine.

The first problem I encountered with the plugin was the reference to Microsoft.Data.SqlClient could not be found. I also noticed that the plugin's debug output did not include the package DLLs, while the Windows application's output did. I did not find any settings that would cause this difference.

Windows App Output (partially shown):

Plugin output (partially shown), which only has the solution files and not supporting files:

To temporarily solve this issue, I copied all package files from the Windows desktop app output to the plugin output folder.

Afterward, when running the plugin, I received a different error.

Microsoft.Data.SqlClient is not supported on this platform

The platforms for the Windows app and the plugin are the same, as far as I can tell.

The configuration manager has all projects set to Any CPU for both the app and plugin.

Solutions to one or both of the above problems would be appreciated.

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论