NuGet拉包失败
错误:
Install failed (project: opcuaconnect, package: OpcUaHelper v2.2.1) Could not install package ‘OpcUaHelper 2.2.1’. You are trying to install this package into a project that targets ‘.NETFramework,Version=v3.5’, but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.
解决方法:
修改项目csproj文件中的TargetFrameworkVersion标签
例如我需要支持高版本的.netframework:
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
我原来的是:
<TargetFrameworkVersion>v3.6</TargetFrameworkVersion>