还原NuGet程序包时,我看到Xamarin.ios.CameraViewController已还原到我的程序包及其所有依赖项中。但是我从未引用过Xamarin.ios.CameriaViewController,也没有引用过我的软件包。
我的csproj nuget参考文献:
<ItemGroup>
<PackageReference Include="Acr.UserDialogs">
<Version>7.0.3</Version>
</PackageReference>
<PackageReference Include="CarouselView.FormsPlugin">
<Version>5.2.0</Version>
</PackageReference>
<PackageReference Include="DLToolkit.Forms.Controls.FlowListView">
<Version>2.0.11</Version>
</PackageReference>
<PackageReference Include="GMImagePicker.Xamarin">
<Version>2.3.2</Version>
</PackageReference>
<PackageReference Include="Microsoft.Net.Http">
<Version>2.2.29</Version>
</PackageReference>
<PackageReference Include="Newtonsoft.Json">
<Version>12.0.1</Version>
</PackageReference>
<PackageReference Include="Plugin.FacebookClient">
<Version>1.4.0</Version>
</PackageReference>
<PackageReference Include="Plugin.FileUploader">
<Version>1.4.0</Version>
</PackageReference>
<PackageReference Include="Plugin.GoogleClient">
<Version>1.1.0</Version>
</PackageReference>
<PackageReference Include="Remote.Linq.Newtonsoft.Json">
<Version>5.8.2</Version>
</PackageReference>
<PackageReference Include="Rg.Plugins.Popup">
<Version>1.1.5.188</Version>
</PackageReference>
<PackageReference Include="SQLite.Net.Async-PCL">
<Version>3.1.1</Version>
</PackageReference>
<PackageReference Include="SQLite.Net.Core-PCL">
<Version>3.1.1</Version>
</PackageReference>
<PackageReference Include="Syncfusion.Xamarin.SfAutoComplete">
<Version>16.4.0.54</Version>
</PackageReference>
<PackageReference Include="Xam.Plugin.Connectivity">
<Version>3.2.0</Version>
</PackageReference>
<PackageReference Include="Xam.Plugin.Media">
<Version>4.0.1.5</Version>
</PackageReference>
<PackageReference Include="Xam.Plugins.Forms.ImageCircle">
<Version>3.0.0.5</Version>
</PackageReference>
<PackageReference Include="Xam.Plugins.Messaging">
<Version>5.2.0</Version>
</PackageReference>
<PackageReference Include="Xamarin.Essentials">
<Version>1.0.1</Version>
</PackageReference>
<PackageReference Include="Xamarin.Forms" Version="3.4.0.1029999" />
<PackageReference Include="System.Reflection.Emit">
<Version>4.3.0</Version>
<ExcludeAssets>all</ExcludeAssets>
</PackageReference>
<PackageReference Include="Xamarin.Forms.ImagePicker">
<Version>1.0.0</Version>
</PackageReference>
<PackageReference Include="Xamarin.Google.iOS.SignIn">
<Version>4.4.0</Version>
</PackageReference>
<PackageReference Include="Xamd.Plugins.Forms.ImageCarousel">
<Version>1.0.2</Version>
</PackageReference>
<PackageReference Include="Xfx.Controls">
<Version>1.1.3</Version>
</PackageReference>
</ItemGroup>
那么为什么要引用它?如何删除它?
答案 0 :(得分:3)
它是Xamarin.Forms.ImagePicker.iOS
的依赖项,也是Xamarin.Forms.ImagePicker
的依赖项。
答案 1 :(得分:1)
不过,您可以查看所有依赖项,包括传递性依赖项-
打开项目的obj目录。您会看到projects.assetes.json
,您会看到类似的信息
"Microsoft.NETCore.UniversalWindowsPlatform/6.2.8": {
"type": "package",
"dependencies": {
"Microsoft.NETCore.Platforms": "2.1.0",
"Microsoft.Net.Native.Compiler": "2.2.3",
"Microsoft.Net.UWPCoreRuntimeSdk": "2.2.8",
"NETStandard.Library": "2.0.3"
}
在该示例中,Microsoft.NETCore.UniversalWindowsPlatform
是一个显式安装的软件包,可以在csproj引用中看到,但它也带来了很多依赖项,例如Microsoft.NETCore.Platforms
,Microsoft.Net.Native.Compiler
,等