我正在尝试使用照明弹用于xamarin应用程序。公共代码位于单独的可移植类库中。此项目配置为TargetFrameWorkProfile Profile78。当我添加照明弹出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中。
也许我漏掉了什么东西?
发布于 2016-02-07 11:41:20
将TFM更改为配置文件111。https://github.com/seesharper/LightInject/commit/8ddb35723d460c0007ac63d7fe249874fbccb960
LightInject 4.0.7刚刚发布到官方的NuGet提要中。
发布于 2016-02-06 13:34:58
查看LightInject 4.0.6 NuGet包,它有一个可移植的类库文件夹:
net45+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10Mono和Xamarin部件是可选的,因此如果我们忽略了这些部分,我们就有:
net45+win81+wpa81PCL配置文件111如下,忽略了任何Mono和Xamarin框架:
net45+win+wpa81在这里获胜意味着win8 (Windows 8)。
查看Profile 111和LightInject NuGet包,它们是不兼容的。LightInject支持win81 (Windows8.1)作为其配置文件的一部分,而profile 111支持win8。为了使LigthInject兼容,它必须针对win8,而不是win81。
似乎没有一个完全符合LightInject目标的PCL配置文件。最近的是剖面151:
net451+win81+wpa81更改便携式类库,使其目标配置文件151允许安装LightInject。这似乎是我能看到的唯一的资料,哪个是兼容的。
https://stackoverflow.com/questions/35239568
复制相似问题