我有一个 .NET 2.0 项目,当我尝试编译一些使用 SMO 的项目时出现以下错误:
The primary reference "Microsoft.SqlServer.Smo, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL" could not be resolved because it has an indirect dependency on the framework assembly "System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" which could not be resolved in the currently targeted framework. ".NETFramework,Version=v2.0".
To resolve this problem, either remove the reference "Microsoft.SqlServer.Smo, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL" or retarget your application to a framework version which contains "System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089".
谁能帮忙。因此,我不想将项目移动到 .NET 3.5。
谢谢
最佳答案
如异常所述,当前引用程序集需要 .NET 3.5。您必须降级支持 .NET 2.0 的 Microsoft.SqlServer.Smo。
关于c# - Microsoft.SqlServer.Smo 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10217422/