我正在尝试将 lightinject 用于 xamarin 应用程序。公共代码位于单独的可移植类库中。此项目配置为 TargetFrameWorkProfile Profile78。当我添加 lightinject 4.0.6 时出现以下错误:
Attempting to gather dependencies information for package 'LightInject.4.0.6' with respect to project 'ProjectName', targeting '.NETPortable,Version=v4.5,Profile=Profile78'
Attempting to resolve dependencies for package 'LightInject.4.0.6' with DependencyBehavior 'Lowest'
Resolving actions to install package 'LightInject.4.0.6'
Resolved actions to install package 'LightInject.4.0.6'
Install failed. Rolling back...
Package 'LightInject.4.0.6 : ' does not exist in project 'ProjectName'
Package 'LightInject.4.0.6 : ' does not exist in folder '<path_to_packages_folder>'
Could not install package 'LightInject 4.0.6'. You are trying to install this package into a project that targets '.NETPortable,Version=v4.5,Profile=Profile78', 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.
我发现了这个问题,所以我尝试切换到 Profile111,但即使使用此配置文件,也无法将这个库添加到 PCL。
也许我错过了其他东西?