I have a custom library with source code that successfully compiles and produces the .dll file.
Question: what's the best approach to include this dll in a HoloLens project considering the following errors?
My approach
The project.json file of the standalone library is the following:
{
"dependencies": {
"Microsoft.NETCore.UniversalWindowsPlatform": "5.1.0",
"Newtonsoft.Json": "9.0.1"
},
"frameworks": {
"uap10.0": {}
},
"runtimes": {
"win10-arm": {},
"win10-arm-aot": {},
"win10-x86": {},
"win10-x86-aot": {},
"win10-x64": {},
"win10-x64-aot": {}
}
}
Or I have also the opportunity to add it as a NuGet package depending on:
- Microsoft.NETCore.UniversalWindowsPlatform (>= 5.2.2)
- Newtonsoft.Json (>= 9.0.1)
- Microsoft.EntityFrameworkCore.Tools (>= 1.0.0-preview2-final)
- Microsoft.EntityFrameworkCore.Sqlite (>= 1.0.1)
Then I need to include this library in another VS2015 solution produced by Unity for Hololens. The solution automatically built by Unity consists of 3 projects: 1) Assembly-CSharp containing a HoloToolkit folder, 2) Assembly-CSharp firstpass and 3) Origami
I took a script from HoloToolkit for Unity folder and I applied it on a GameObject. When an event is triggered - and it happens successfully - I want to call some functions provided by this custom library to process it from the same script, say GazeManager.cs. The project.json of the project 1) is the following
{
"dependencies": {
"Microsoft.NETCore.UniversalWindowsPlatform": "5.0.0"
},
"frameworks": {
"uap10.0": {}
},
"runtimes": {
"win10-arm": {},
"win10-arm-aot": {},
"win10-x86": {},
"win10-x86-aot": {},
"win10-x64": {},
"win10-x64-aot": {}
}
}
I tried in 2 ways:
In GazeManager.cs I added using MyLibrary in the code and add it as a reference in ReferenceManager. The library gets correctly recognized but then just declaring a variable like public MyLibrary objectInMyLibrary makes the switch from a program correctly compiling to a program with the following error:
The command ""C:\Users\Antonino\Documents\UnityToVS2015Projects\HoloAcademy101 - Origami\Origami\App\Unity\Tools\AssemblyConverter.exe" -platform=uap -lock="C:\Users\lakeb\Documents\UnityToVS2015Projects\HoloAcademy101 - Origami\Origami\App\Origami\project.lock.json" -bits=32 -configuration=Debug -removeDebuggableAttribute=False -path="." -path="..\Players\UAP\x86\Debug" "C:\Users\lakeb\Documents\UnityToVS2015Projects\HoloAcademy101 - Origami\Origami\App\Origami\Assembly-CSharp.dll" "C:\Users\lakeb\Documents\UnityToVS2015Projects\HoloAcademy101 - Origami\Origami\App\Origami\Assembly-CSharp-firstpass.dll" "C:\Users\lakeb\Documents\UnityToVS2015Projects\HoloAcademy101 - Origami\Origami\App\Origami\UnityEngine.dll" "C:\Users\lakeb\Documents\UnityToVS2015Projects\HoloAcademy101 - Origami\Origami\App\Origami\UnityEngine.UI.dll" "C:\Users\lakeb\Documents\UnityToVS2015Projects\HoloAcademy101 - Origami\Origami\App\Origami\UnityEngine.HoloLens.dll" "C:\Users\lakeb\Documents\UnityToVS2015Projects\HoloAcademy101 - Origami\Origami\App\Origami\UnityEngine.Networking.dll" "C:\Users\lakeb\Documents\UnityToVS2015Projects\HoloAcademy101 - Origami\Origami\App\Origami\UnityEngine.VR.dll"" exited with code 1.
[cancelling the previous steps to have a compiling Origami again] the second way I thought is adding it through the insertion of the line in the project.json file
"my.hololens.library": "version"
and in this case I got the following errors
Payload contains two or more files with the same destination path 'System.Net.Sockets.dll'. Source files: C:\Users\Antonino.nuget\packages\runtime.win.System.Net.Sockets\4.1.0\runtimes\win\lib\netcore50\System.Net.Sockets.dllC:\Users\Antonino.nuget\packages\System.Net.Sockets\4.0.0\lib\netcore50\System.Net.Sockets.dll
Payload contains two or more files with the same destination path 'System.Diagnostics.Tools.dll'. Source files: C:\Users\Antonino.nuget\packages\runtime.any.System.Diagnostics.Tools\4.0.1\lib\netcore50\System.Diagnostics.Tools.dllC:\Users\Antonino.nuget\packages\System.Diagnostics.Tools\4.0.0\lib\netcore50\System.Diagnostics.Tools.dll
Payload contains two or more files with the same destination path 'System.Threading.Timer.dll'. Source files: C:\Users\Antonino.nuget\packages\runtime.any.System.Threading.Timer\4.0.1\lib\netcore50\System.Threading.Timer.dllC:\Users\Antonino.nuget\packages\System.Threading.Timer\4.0.0\lib\netcore50\System.Threading.Timer.dll
Version conflict detected for System.Collections. Origami (>= 1.0.0) -> Assembly-CSharp (>= 1.0.0) -> my.hololens.library (>= version) -> Microsoft.EntityFrameworkCore.Tools (>= 1.0.0-preview2-final) -> Microsoft.EntityFrameworkCore.Design (>= 1.0.0-preview2-final) -> Microsoft.EntityFrameworkCore.Design.Core (>= 1.0.0-preview2-final) -> Microsoft.AspNetCore.Hosting.Abstractions (>= 1.0.0) -> Microsoft.AspNetCore.Http.Abstractions (>= 1.0.0) -> System.Reflection.TypeExtensions (>= 4.1.0) -> System.Linq (>= 4.1.0) -> System.Collections (>= 4.0.11) Origami (>= 1.0.0) -> Microsoft.NETCore.UniversalWindowsPlatform (>= 5.0.0) -> Microsoft.NETCore.Runtime (>= 1.0.0) -> Microsoft.NETCore.Runtime.CoreCLR-arm (>= 1.0.0) -> System.Collections (= 4.0.10).
One or more packages are incompatible with UAP,Version=v10.0 (win10-x86-aot).
One or more packages are incompatible with UAP,Version=v10.0 (win10-arm-aot).
System.Reflection.Emit.ILGeneration 4.0.1 provides a compile-time reference assembly for System.Reflection.Emit.ILGeneration on UAP,Version=v10.0, but there is no run-time assembly compatible with win10-x86-aot.
System.Reflection.Emit.ILGeneration 4.0.1 provides a compile-time reference assembly for System.Reflection.Emit.ILGeneration on UAP,Version=v10.0, but there is no run-time assembly compatible with win10-x64-aot.
System.Reflection.Emit.ILGeneration 4.0.1 provides a compile-time reference assembly for System.Reflection.Emit.ILGeneration on UAP,Version=v10.0, but there is no run-time assembly compatible with win10-x86-aot.
System.Reflection.Emit.ILGeneration 4.0.1 provides a compile-time reference assembly for System.Reflection.Emit.ILGeneration on UAP,Version=v10.0, but there is no run-time assembly compatible with win10-x64-aot.
One or more packages are incompatible with UAP,Version=v10.0 (win10-x64-aot).
Version conflict detected for System.Collections. Assembly-CSharp (>= 1.0.0) -> my.hololens.library (>= version) -> Microsoft.EntityFrameworkCore.Tools (>= 1.0.0-preview2-final) -> Microsoft.EntityFrameworkCore.Design (>= 1.0.0-preview2-final) -> Microsoft.EntityFrameworkCore.Design.Core (>= 1.0.0-preview2-final) -> Microsoft.AspNetCore.Hosting.Abstractions (>= 1.0.0) -> Microsoft.AspNetCore.Http.Abstractions (>= 1.0.0) -> System.Reflection.TypeExtensions (>= 4.1.0) -> System.Linq (>= 4.1.0) -> System.Collections (>= 4.0.11) Assembly-CSharp (>= 1.0.0) -> Microsoft.NETCore.UniversalWindowsPlatform (>= 5.0.0) -> Microsoft.NETCore.Runtime (>= 1.0.0) -> Microsoft.NETCore.Runtime.CoreCLR-arm (>= 1.0.0) -> System.Collections (= 4.0.10).
One or more packages are incompatible with UAP,Version=v10.0 (win10-x64-aot).
One or more packages are incompatible with UAP,Version=v10.0 (win10-x86-aot).
System.Reflection.Emit.ILGeneration 4.0.1 provides a compile-time reference assembly for System.Reflection.Emit.ILGeneration on UAP,Version=v10.0, but there is no run-time assembly compatible with win10-arm-aot.
One or more packages are incompatible with UAP,Version=v10.0 (win10-arm-aot).
System.Reflection.Emit.ILGeneration 4.0.1 provides a compile-time reference assembly for System.Reflection.Emit.ILGeneration on UAP,Version=v10.0, but there is no run-time assembly compatible with win10-arm-aot.
I'm puzzled on what to go on. Somebody said to produce a portable library, and I also tried to study here the relationship among NETFramework, NETCore and NETStandard but it seems more complex than expected.
Unity 3d does not support integration of libraries that use the .Net Core framework. Try creating your library as a .Net Framework 3.5 Library and drop it in the Assets/Plugins folder of your Unity project.
You need to create a UWP Library project and port your code to this project and compile , remove errors
Place compiled dll in assets folder
Update Inspector properties as shown below
Now you can access this dll in your unity scripts under #if !UNITY_EDITOR block
Related
I'm trying to Publish my project because I will live the project. But when I try to publish my project I get NU1605 Detected package downgrade: Microsoft.EntityFrameworkCore from 2.1.14 to 2.1.1. Reference the package directly from the project to select a different version. MyTravelBlogs -> Microsoft.AspNetCore.App 2.1.25 -> Microsoft.EntityFrameworkCore (>= 2.1.14 && < 2.2.0) MyTravelBlogs -> Microsoft.EntityFrameworkCore (>= 2.1.1)
and the same error for
NU1605 Detected package downgrade: Microsoft.EntityFrameworkCore.Tools from 2.1.14 to 2.1.1. Reference the package directly from the project to select a different version. MyTravelBlogs -> Microsoft.AspNetCore.App 2.1.25 -> Microsoft.EntityFrameworkCore.Tools (>= 2.1.14 && < 2.2.0) MyTravelBlogs -> Microsoft.EntityFrameworkCore.Tools (>= 2.1.1)
Here is my csproj file
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<WebStackScaffolding_IsLayoutPageSelected>True</WebStackScaffolding_IsLayoutPageSelected>
<WebStackScaffolding_IsPartialViewSelected>False</WebStackScaffolding_IsPartialViewSelected>
<WebStackScaffolding_IsReferencingScriptLibrariesSelected>False</WebStackScaffolding_IsReferencingScriptLibrariesSelected>
<WebStackScaffolding_ViewDialogWidth>600</WebStackScaffolding_ViewDialogWidth>
<Controller_SelectedScaffolderID>MvcControllerEmptyScaffolder</Controller_SelectedScaffolderID>
<Controller_SelectedScaffolderCategoryPath>root/Controller</Controller_SelectedScaffolderCategoryPath>
<WebStackScaffolding_ControllerDialogWidth>600</WebStackScaffolding_ControllerDialogWidth>
<WebStackScaffolding_IsAsyncSelected>False</WebStackScaffolding_IsAsyncSelected>
<WebStackScaffolding_LayoutPageFile>~/Views/Shared/_myLayout.cshtml</WebStackScaffolding_LayoutPageFile>
<NameOfLastUsedPublishProfile>FolderProfile</NameOfLastUsedPublishProfile>
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
</PropertyGroup>
</Project>
I tried to add <TargetLatestRuntimePatch>true</TargetLatestRuntimePatch> to csproj file which people did in other questions but it doesn't work. I did not try to change versions of Nugets because I think it will create other problems about launching my project. How can I fix that and publish my project successfully? Thanks
I encountered with same issue but I recovered using this magic line. You may try in your project. Hope you get well.
<ItemGroup>
...
<PackageReference Include="Microsoft.NETCore.App" Version="2.2.0" ExcludeAssets="all" PrivateAssets="all" />
</ItemGroup>
I've switched my Visual Studio extension from old csproj format to the new SDK-style format and hoped to get everything I need with the following package references (previously I had to reference like 100 different packages in my packages.config)
<PackageReference Include="Microsoft.VisualStudio.LanguageServices" Version="3.8.0" />
<PackageReference Include="Microsoft.VisualStudio.SDK" Version="16.0.206" />
<PackageReference Include="NuGet.VisualStudio" Version="5.8.0" />
However, while the extension builds within Visual Studio, I run into problems when building the extension with MSBuild (when restoring NuGet packages):
"C:\Path\MyExt\MyExtension.sln" (Build target) (1) ->
"C:\Path\MyExt\MyExt.Tests\MyExt.Tests.csproj" (default target) (9) ->
C:\Path\MyExt\MyExt.Tests\MyExt.Tests.csproj : error NU1603: Microsoft.CodeAnalysis.EditorFeatures.Text 3.8.0 depends on Microsoft.VisualStudio.CoreUtility (>= 16.8.39) but Microsoft.VisualStudio.CoreUtility 16.8.39 was not found. An approximate best match of Microsoft.VisualStudio.CoreUtility 16.8.239 was resolved.
C:\Path\MyExt\MyExt.Tests\MyExt.Tests.csproj : error NU1603: Microsoft.CodeAnalysis.EditorFeatures.Text 3.8.0 depends on Microsoft.VisualStudio.CoreUtility (>= 16.8.39) but Microsoft.VisualStudio.CoreUtility 16.8.39 was not found. An approximate best match of Microsoft.VisualStudio.CoreUtility 16.8.239 was resolved.
C:\Path\MyExt\MyExt.Tests\MyExt.Tests.csproj : error NU1603: Microsoft.CodeAnalysis.EditorFeatures.Text 3.8.0 depends on Microsoft.VisualStudio.Text.Data (>= 16.8.39) but Microsoft.VisualStudio.Text.Data 16.8.39 was not found. An approximate best match of Microsoft.VisualStudio.Text.Data 16.8.239 was resolved.
C:\Path\MyExt\MyExt.Tests\MyExt.Tests.csproj : error NU1603: Microsoft.CodeAnalysis.EditorFeatures.Text 3.8.0 depends on Microsoft.VisualStudio.Text.Data (>= 16.8.39) but Microsoft.VisualStudio.Text.Data 16.8.39 was not found. An approximate best match of Microsoft.VisualStudio.Text.Data 16.8.239 was resolved.
C:\Path\MyExt\MyExt.Tests\MyExt.Tests.csproj : error NU1603: Microsoft.CodeAnalysis.EditorFeatures.Text 3.8.0 depends on Microsoft.VisualStudio.Text.Logic (>= 16.8.39) but Microsoft.VisualStudio.Text.Logic 16.8.39 was not found. An approximate best match of Microsoft.VisualStudio.Text.Logic 16.8.239 was resolved.
C:\Path\MyExt\MyExt.Tests\MyExt.Tests.csproj : error NU1603: Microsoft.CodeAnalysis.EditorFeatures.Text 3.8.0 depends on Microsoft.VisualStudio.Text.Logic (>= 16.8.39) but Microsoft.VisualStudio.Text.Logic 16.8.39 was not found. An approximate best match of Microsoft.VisualStudio.Text.Logic 16.8.239 was resolved.
Indeed, the packages are not on NuGet. Is this a problem with the Microsoft.VisualStudio.SDK package? Am I doing something wrong?
I think the issue is related the Microsoft.CodeAnalysis.EditorFeatures package itself. And you should contact with the author.
It's just that the problem is magnified by the new-sdk project and the true you set.
Actually, I faced the same issue in my side with even net core console project.
You can see this:
The nuget package has dependencies are >=16.8.39.
However, Microsoft.VisualStudio.CoreUtility does not have version 16.8.39 version but has 16.8.239. This is designed by the author. And according to the mechanism of nuget, it will install the minimum version of dependencies, but the new-sdk style project cannot automatically identify the invalid version, and this warning appears. But non-sdk style projects with packages.config will automatically install the valid version of the nuget dependencies.
So this issue is the dual influence of the design issue of the nuget package and the particularity of the new-sdk style project. It's just magnified in this case.
============================================
Workaround
To solve the issue, try these:
1) First, disable TreatWarningsAsErrors node under Project Properties-->Build
2) manually install
Microsoft.VisualStudio.CoreUtility 16.8.239
Microsoft.VisualStudio.Text.Data 16.8.239
Microsoft.VisualStudio.Text.Logic 16.8.239
nuget packages additionally to update the dependencies.
3) then enable TreatWarningsAsErrors to check.
Im trying to follow a Entity Framework Core video in a .NET Core 2.1 DAL class library. In the DbContext.OnCofiguring the following code is placed :
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
base.OnConfiguring(optionsBuilder);
optionsBuilder.UseSqlServer("Server*.");
}
The problem is that the UseSQLServer is missing? From this its suggested to add Microsoft.EntityFrameworkCore.SqlServer nuget. When doing this I get some version conflicts that I dont know how to solve :
Severity Code Description Project File Line Suppression State
Error CS1061 'DbContextOptionsBuilder' does not contain a definition
for 'UseSqlServer' and no accessible extension method 'UseSqlServer'
accepting a first argument of type 'DbContextOptionsBuilder' could be
found (are you missing a using directive or an assembly
reference?) DataAccessLayer
--
Severity Code Description Project File Line Suppression State
Error Package restore failed. Rolling back package changes for
'DataAccessLayer'.
--
Severity Code Description Project File Line Suppression State
Error NU1605 Detected package downgrade:
Microsoft.Extensions.Configuration from 2.2.0 to 2.1.1. Reference the
package directly from the project to select a different version.
DataAccessLayer -> Microsoft.EntityFrameworkCore.SqlServer 2.2.3 ->
Microsoft.EntityFrameworkCore.Relational 2.2.3 ->
Microsoft.EntityFrameworkCore 2.2.3 -> Microsoft.Extensions.Logging
2.2.0 -> Microsoft.Extensions.Configuration.Binder 2.2.0 -> Microsoft.Extensions.Configuration (>= 2.2.0) DataAccessLayer ->
Microsoft.Extensions.Configuration (>= 2.1.1) DataAccessLayer
--
Severity Code Description Project File Line Suppression State
Error NU1605 Detected package downgrade:
Microsoft.Extensions.DependencyInjection from 2.2.0 to 2.1.1.
Reference the package directly from the project to select a different
version. DataAccessLayer -> Microsoft.EntityFrameworkCore.SqlServer
2.2.3 -> Microsoft.EntityFrameworkCore.Relational 2.2.3 -> Microsoft.EntityFrameworkCore 2.2.3 ->
Microsoft.Extensions.DependencyInjection (>= 2.2.0) DataAccessLayer
-> Microsoft.Extensions.DependencyInjection (>= 2.1.1) DataAccessLayer
--
I suspect that the project is using a couple of nuget packages and some of them is referencing a diffrent version of another nuget or dll.
It suggest to reference a package direcly? Does this mean that I should reference a dll manually? Where do I get the dll from?
The default severity for NU1605 is warning and since you're seeing it as an error, it means that your project has opt-in'ed into treating errors as warnings.
The reason for the package downgrade is probably due to NuGet's nearest-wins rule. The only way to avoid a downgrade is to add a PackageReference to the downgraded package to your project, that way the version you select is always nearest and transient dependencies can never downgrade it.
Otherwise you stop shooting yourself in the foot by either turning off "treat all warnings as errors" and list only the specific warnings you want treated as errors. Or, add NU1605 to the list of warnings to suppress (<NoWarn> in the csproj).
I am using Visual Studio 2017 and getting this error:
The type or namespace name 'Mvc' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)
on this line of code:
using System.Web.Mvc;
that using is needed for resolving SelectListItem on this line of code:
public static List<SelectListItem> VerificationMethod
I would expect adding an assembly reference would easily solve the problem.
Here is what I tried....
I tried adding an assembly reference by right clicking on the project and selecting Add -> Reference. System.Web.Mvc was not in the list of references to add.
Some other SO posts referenced package Microsoft.Aspnet.Mvc as resolving this. That package was not available either.
I tried this on the nuget console:
PM> Install-Package System.Web.mvc
Install-Package : Unable to find package 'System.Web.mvc'
At line:1 char:1
+ Install-Package System.Web.mvc
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], Exception
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
I also tried this:
PM> Install-Package Microsoft.aspnet.mvc
Package 'Microsoft.aspnet.mvc.5.2.6' already exists in project 'MySite'
Time Elapsed: 00:00:00.0549251
PM>
I also tried this:
update-package -reinstall Microsoft.AspNet.Mvc
And got this error:
Install failed. Rolling back...
Package 'EntityFramework 6.1.0' does not exist in project 'DataAccess'
Here is what we did that worked....
deleted all files and folders in the packages folder in the solution.
Ran:
Update-Package -safe -reinstall -IgnoreDependencies
Install-Package Microsoft.AspNet.Mvc -Version 5.2.3.0
Will you please try the following:
In DataAccess Project> References > Right click on system.web.mvc and remove.
Change the project to DataAccess from package manager console, See the image
Then type in package manager console:
Install-Package Microsoft.AspNet.Mvc -Version 5.2.3.0
[EDIT by OP]
This is what I got when I tried this:
PM> Install-Package Microsoft.AspNet.Mvc -Version 5.2.3.0
Attempting to gather dependency information for package 'Microsoft.AspNet.Mvc.5.2.3' with respect to project 'DataAccess', targeting '.NETFramework,Version=v4.5'
Gathering dependency information took 2.37 sec
Attempting to resolve dependencies for package 'Microsoft.AspNet.Mvc.5.2.3' with DependencyBehavior 'Lowest'
One or more unresolved package dependency constraints detected in the existing packages.config file. All dependency constraints must be resolved to add or update packages. If these packages are being updated this message may be ignored, if not the following error(s) may be blocking the current package operation: 'Microsoft.AspNet.Identity.EntityFramework 2.2.1 constraint: Microsoft.AspNet.Identity.Core (>= 2.2.1)', 'Microsoft.AspNet.Identity.EntityFramework 2.2.1 constraint: EntityFramework (>= 6.1.0)'
Resolving dependency information took 0 ms
Resolving actions to install package 'Microsoft.AspNet.Mvc.5.2.3'
Resolved actions to install package 'Microsoft.AspNet.Mvc.5.2.3'
Found package 'Microsoft.AspNet.Mvc 5.2.3' in 'C:\ThePath\packages'.
Found package 'Microsoft.AspNet.Razor 3.2.3' in 'C:\ThePath\packages'.
Found package 'Microsoft.AspNet.WebPages 3.2.3' in 'C:\ThePath\packages'.
Found package 'Microsoft.Web.Infrastructure 1.0.0' in 'C:\ThePath\packages'.
Package 'Microsoft.AspNet.Razor.3.2.3' already exists in folder 'C:\THePath\packages'
Added package 'Microsoft.AspNet.Razor.3.2.3' to 'packages.config'
Successfully installed 'Microsoft.AspNet.Razor 3.2.3' to DataAccess
Package 'Microsoft.Web.Infrastructure.1.0.0' already exists in folder 'C:ThePath\packages'
Install failed. Rolling back...
Package 'Microsoft.Web.Infrastructure.1.0.0' does not exist in project 'DataAccess'
Removed package 'Microsoft.AspNet.Razor.3.2.3' from 'packages.config'
Executing nuget actions took 389.27 ms
Install-Package : Failed to add reference to 'Microsoft.Web.Infrastructure'.
Reference unavailable.
At line:1 char:1
+ Install-Package Microsoft.AspNet.Mvc -Version 5.2.3.0
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], Exception
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
I'm using Xamarin Forms with Visual Studio 2015. I get this error while I'm trying to add a messaging plugin.
Severity Code Description Project File Line Suppression State
Error Unable to resolve dependencies. 'Xamarin.Android.Support.v4 23.0.1.3' is not compatible with 'Xamarin.Android.Support.Design 23.0.1.3 constraint: Xamarin.Android.Support.v4 (>= 23.0.1.3)', 'Xamarin.Forms 2.2.0.45 constraint: Xamarin.Android.Support.v4 (= 23.3.0)'. 0
I have already updated Visual Studio and Xamarin, but still get this error.
What else should I do to fix this error?
This is a dependency issue. For Xamarin.Forms 2.2.0.45, the dependencies are
Xamarin.Android.Support.v4 (= 23.3.0)
Xamarin.Android.Support.Design (= 23.3.0)
Xamarin.Android.Support.v7.AppCompat (= 23.3.0)
Xamarin.Android.Support.v7.CardView (= 23.3.0)
Xamarin.Android.Support.v7.MediaRouter (= 23.3.0)
Note version conflict between the above and the error: 'Xamarin.Android.Support.v4 23.0.1.3' is not compatible with 'Xamarin.Android.Support.Design 23.0.1.3 constraint: Xamarin.Android.Support.v4 (>= 23.0.1.3)'
You will need to install the compatible version of the messaging plugin you’d like to use. Here is a related troubleshooting guide: https://developer.xamarin.com/guides/xamarin-forms/troubleshooting/.