ACR.UserDialogs Splat - Could not be resolved as it was built against Version=v5.0

ChrisWillertonChrisWillerton USMember ✭✭

Hi

Since upgrading my version of Visual Studio 2019 to the latest build I have been unable to build my project.

Is anyone getting this same message or do you know how to resolve it?

I am using Splat 2.0.0 as I am user ACR.UserDialogs 6.5.1 as part of a shared project.

.nuget/packages/splat/2.0.0/lib/netstandard1.1/Splat.dll" could not be resolved because it was built against the ".NETPortable,Version=v5.0" framework. This is a higher version than the currently targeted framework ".NETPortable,Version=v4.5,Profile=Profile111".

Many thanks in advance

Posts

  • kuba101kuba101 Member ✭✭

    Hi, I'm having the same issue - allow visual studio to update and it completely killed my project. Did you find a solution?

  • ramayaramaya USMember
    edited June 17

    Same issue here. Everything was building perfectly before update this morning and now I'm seeing about 62 of these errors.

    Most of the errors are due to the XLabs packages, and I can see about 20 of these warnings on the build output:

    /Library/Frameworks/Mono.framework/Versions/5.18.1/lib/mono/msbuild/Current/bin/Microsoft.Common.CurrentVersion.targets(2134,5): warning MSB3274: The primary reference "ExifLib" could not be resolved because it was built against the ".NETPortable,Version=v5.0" framework. This is a higher version than the currently targeted framework ".NETPortable,Version=v4.5,Profile=Profile111".

    /Library/Frameworks/Mono.framework/Versions/5.18.1/lib/mono/msbuild/Current/bin/Microsoft.Common.CurrentVersion.targets(2134,5): warning MSB3275: The primary reference "XLabs.Platform" could not be resolved because it has an indirect dependency on the assembly "ExifLib, Version=1.0.2.0, Culture=neutral, PublicKeyToken=null" which was built against the ".NETPortable,Version=v5.0" framework. This is a higher version than the currently targeted framework ".NETPortable,Version=v4.5,Profile=Profile111".

    This leads VS to throw about 62 of these types of errors, mostly relating to XLabs, but also about 4 other different packages:

    Error CS0246: The type or namespace name 'XLabs' could not be found (are you missing a using directive or an assembly reference?) (CS0246)
    Error CS0246: The type or namespace name 'IGeolocator' could not be found (are you missing a using directive or an assembly reference?) (CS0246)
    Error CS0246: The type or namespace name 'ProgressRing' could not be found (are you missing a using directive or an assembly reference?) (CS0246)

    My project targets .Net Portable PCL 4.5 Profile 111.

    I had never had any issues until updating to:

    Xamarin.Mac
    Version: 5.10.0.153 (Visual Studio Community)
    Hash: 750a8798
    Branch: d16-1-artifacts
    Build date: 2019-04-30 15:17:54-0400

    Xamarin.iOS
    Version: 12.10.0.153 (Visual Studio Community)
    Hash: 750a8798
    Branch: d16-1-artifacts
    Build date: 2019-04-30 15:17:54-0400

    Xamarin Designer
    Version: 16.1.0.464
    Hash: 66bb7b43f
    Branch: remotes/origin/d16-1-new-document-model
    Build date: 2019-06-07 07:10:32 UTC

    Xamarin.Android
    Version: 9.3.0.22 (Visual Studio Community)
    Commit: HEAD/8e7764fdf

  • dalmargaridodalmargarido Member

    Same here. Seems to be happening solely with PCL and building against some specific packages, like splat, fingerprint, qrcode... Pretty sure it's related to the Mono Framework version that this particular version of VS is forcing.

    I'm going to try to downgrade to VS 2017 to try to make it work.

  • RonFreschiRonFreschi USUniversity ✭✭

    @kuba101 Thanks that worked!

  • SnehalJadhav.0403SnehalJadhav.0403 USMember ✭✭

    @kuba101 , I'm facing same issue after switching to different MAC and updated Visual studio for MAC(2019). When i switched to downgraded mono version from preferences of VS, It takes infinite time for cleaning the project. Am I applying your solution in correct way?
    @RonFreschi , How did you do that exactly?

  • Paul_RoyPaul_Roy FRMember ✭✭

    We're facing the same issue; how did you manage to keep Visual Studio 8.1 with Mono 5.18.0.268?

    It's always asking to update mono at start…

  • KevinCraig.3353KevinCraig.3353 USMember ✭✭

    @Paul_Roy said:
    We're facing the same issue; how did you manage to keep Visual Studio 8.1 with Mono 5.18.0.268?

    It's always asking to update mono at start…

    I installed 5.20.1.22 and it doesn't ask to update Mono and I was able to compile my project.

  • Paul_RoyPaul_Roy FRMember ✭✭

    I finally managed to install 5.20, but I'm having an error on .NET core and .NET standard projects…
    Error MSB4018: The "GenerateDepsFile" task failed unexpectedly.

    Did you experienced that?

    This is really annoying from Visual Studio to push a broken version…

    full error:

    /usr/local/share/dotnet/sdk/2.2.204/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(5,5): Error MSB4018: The "GenerateDepsFile" task failed unexpectedly. System.TypeLoadException: Could not load type of field 'Microsoft.NET.Build.Tasks.DependencyContextBuilder:_filteredPackages' (12) due to: Could not resolve type with token 01000027 from typeref (expected class 'NuGet.Packaging.Core.PackageIdentity' in assembly 'NuGet.Packaging, Version=5.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35') assembly:NuGet.Packaging, Version=5.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 type:NuGet.Packaging.Core.PackageIdentity member:(null) at Microsoft.NET.Build.Tasks.TaskBase.Execute () [0x00000] in <e6b15ca14b2940da8c106bfefd0994a9>:0 at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute () [0x00023] in /Users/builder/jenkins/workspace/build-package-osx-mono/2018-10/external/bockbuild/builds/msbuild-15/src/Build/BackEnd/TaskExecutionHost/TaskExecutionHost.cs:573 at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask (Microsoft.Build.BackEnd.ITaskExecutionHost taskExecutionHost, Microsoft.Build.BackEnd.Logging.TaskLoggingContext taskLoggingContext, Microsoft.Build.BackEnd.TaskHost taskHost, Microsoft.Build.BackEnd.ItemBucket bucket, Microsoft.Build.BackEnd.TaskExecutionMode howToExecuteTask) [0x001f6] in /Users/builder/jenkins/workspace/build-package-osx-mono/2018-10/external/bockbuild/builds/msbuild-15/src/Build/BackEnd/Components/RequestBuilder/TaskBuilder.cs:784

  • ChrisWillertonChrisWillerton USMember ✭✭

    @kuba101 said:
    Finally resolved this nightmare... Downgrading did not help so try this first, might save you hours!! I'm on a Mac though, assume people here are also.

    Basically, the update updated my version of Mono, and this is what is actually complaining so dropping the release version down resolved this for me. Check your version of mono by going into preferences and .net in visual studio. Mine said 5.18.0.268 which after some digging around online I could see was updated recently.. So that got me thinking.

    To fix this, I went to: https www.mono-project.com/download/vs/ (sorry it won't let me post a direct link) and downloaded the latest version from 5.18.0.268 folder (the update put me onto 5.18.1.28, and then yesterday onto 6. Which also doesn't work..) It's possible an earlier version of 5.18.1.28 would work, but I figured when our project was created it wouldn't have been around yet.

    Install the 5.18.0.268 package, then go to preferences in visual studio, and change the .Net runtime to the one you just installed. The install location for me was in Library/Frameworks/Mono.framework/Versions/5.18.0

    Then.. hallelujah! Compiling again.

    Hope that helps!

    This resolved it for me! Thank you so much

  • anderson_Smauganderson_Smaug Member ✭✭

    @kuba101 Thanks that worked!

  • kuba101kuba101 Member ✭✭

    Hey @Paul_Roy, (and anyone else!) I had the error you were describing.. again after an update. It seems the updates trash some versions of mono. I had re-install the 5.18.0 version again (as it disappeared) then install the 5.18.1 version, and now it's happy again.

    Extremely annoying and a waste of time.. turning off the auto-updates I think!

  • KGcodesKGcodes Member

    @kuba101 said:
    Finally resolved this nightmare... Downgrading did not help so try this first, might save you hours!! I'm on a Mac though, assume people here are also.

    Basically, the update updated my version of Mono, and this is what is actually complaining so dropping the release version down resolved this for me. Check your version of mono by going into preferences and .net in visual studio. Mine said 5.18.0.268 which after some digging around online I could see was updated recently.. So that got me thinking.

    To fix this, I went to: https www.mono-project.com/download/vs/ (sorry it won't let me post a direct link) and downloaded the latest version from 5.18.0.268 folder (the update put me onto 5.18.1.28, and then yesterday onto 6. Which also doesn't work..) It's possible an earlier version of 5.18.1.28 would work, but I figured when our project was created it wouldn't have been around yet.

    Install the 5.18.0.268 package, then go to preferences in visual studio, and change the .Net runtime to the one you just installed. The install location for me was in Library/Frameworks/Mono.framework/Versions/5.18.0

    Then.. hallelujah! Compiling again.

    Hope that helps!

    After a frustrating couple of weeks I found this and it worked perfectly! Thanks @kuba101 !
    1. Downloaded Mono 5.18.0.268 (for macOS)
    2. Double-clicked to install it to the suggested location
    3. Opened preferences in Visual Studio, then .NET Runtimes
    4. Click the Add button and open Library/Frameworks/Mono.framework/Versions/5.18.0
    5. Select Mono 5.18.0.268 from the list and click Set as Default

Sign In or Register to comment.