Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PCL project not compiling after updating all the installed NuGet portable libraries

Everything was working fine in my Portable-Class-Library project until I updated all the installed portable libraries. It has stopped compiling. Throws the following errors for the nuget libraries installed.

C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1605,5): warning MSB3268: The primary reference "System.Threading.Tasks" could not be resolved because it has an indirect dependency on the framework assembly "System.Runtime, Version=2.6.3.0, Culture=neutral, PublicKeyToken=b03f5f7fd11d50a3a" which could not be resolved in the currently targeted framework. ".NETPortable,Version=v4.0,Profile=Profile104". To resolve this problem, either remove the reference "System.Threading.Tasks" or retarget your application to a framework version which contains "System.Runtime, Version=2.6.3.0, Culture=neutral, PublicKeyToken=b03f5f7fd11d50a3a".

1>C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1605,5): warning MSB3268: The primary reference "System.Net.Http.Extensions" could not be resolved because it has an indirect dependency on the framework assembly "System.Runtime, Version=2.6.3.0, Culture=neutral, PublicKeyToken=b03f5f7fd11d50a3a" which could not be resolved in the currently targeted framework. ".NETPortable,Version=v4.0,Profile=Profile104". To resolve this problem, either remove the reference "System.Net.Http.Extensions" or retarget your application to a framework version which contains "System.Runtime, Version=2.6.3.0, Culture=neutral, PublicKeyToken=b03f5f7fd11d50a3a".

1>C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1605,5): warning MSB3268: The primary reference "Microsoft.Threading.Tasks.Extensions" could not be resolved because it has an indirect dependency on the framework assembly "System.Runtime, Version=2.6.3.0, Culture=neutral, PublicKeyToken=b03f5f7fd11d50a3a" which could not be resolved in the currently targeted framework. ".NETPortable,Version=v4.0,Profile=Profile104". To resolve this problem, either remove the reference "Microsoft.Threading.Tasks.Extensions" or retarget your application to a framework version which contains "System.Runtime, Version=2.6.3.0, Culture=neutral, PublicKeyToken=b03f5f7fd11d50a3a".

1>C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1605,5): warning MSB3268: The primary reference "PCLStorage" could not be resolved because it has an indirect dependency on the framework assembly "System.Runtime, Version=2.6.3.0, Culture=neutral, PublicKeyToken=b03f5f7fd11d50a3a" which could not be resolved in the currently targeted framework. ".NETPortable,Version=v4.0,Profile=Profile104". To resolve this problem, either remove the reference "PCLStorage" or retarget your application to a framework version which contains "System.Runtime, Version=2.6.3.0, Culture=neutral, PublicKeyToken=b03f5f7fd11d50a3a".

1>C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1605,5): warning MSB3268: The primary reference "Microsoft.Threading.Tasks" could not be resolved because it has an indirect dependency on the framework assembly "System.Runtime, Version=2.6.3.0, Culture=neutral, PublicKeyToken=b03f5f7fd11d50a3a" which could not be resolved in the currently targeted framework. ".NETPortable,Version=v4.0,Profile=Profile104". To resolve this problem, either remove the reference "Microsoft.Threading.Tasks" or retarget your application to a framework version which contains "System.Runtime, Version=2.6.3.0, Culture=neutral, PublicKeyToken=b03f5f7fd11d50a3a".

1>C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1605,5): warning MSB3268: The primary reference "System.Net.Http" could not be resolved because it has an indirect dependency on the framework assembly "System.Runtime, Version=2.6.3.0, Culture=neutral, PublicKeyToken=b03f5f7fd11d50a3a" which could not be resolved in the currently targeted framework. ".NETPortable,Version=v4.0,Profile=Profile104". To resolve this problem, either remove the reference "System.Net.Http" or retarget your application to a framework version which contains "System.Runtime, Version=2.6.3.0, Culture=neutral, PublicKeyToken=b03f5f7fd11d50a3a".

1>C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1605,5): warning MSB3268: The primary reference "PCLStorage.Abstractions" could not be resolved because it has an indirect dependency on the framework assembly "System.Runtime, Version=2.6.3.0, Culture=neutral, PublicKeyToken=b03f5f7fd11d50a3a" which could not be resolved in the currently targeted framework. ".NETPortable,Version=v4.0,Profile=Profile104". To resolve this problem, either remove the reference "PCLStorage.Abstractions" or retarget your application to a framework version which contains "System.Runtime, Version=2.6.3.0, Culture=neutral, PublicKeyToken=b03f5f7fd11d50a3a".

How to point it to System.Runtime version 2.6.3.0?

like image 984
user2432627 Avatar asked Jan 19 '26 13:01

user2432627


1 Answers

Fixed the problem.

The PCL project's app.config was pointing to 2.6.3.0 version of System.Runtime. I changed it to point to 1.5.11.0, the previous one, and it compiled fine.

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="System.Runtime" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
   //   <!--  <bindingRedirect oldVersion="0.0.0.0-2.6.3.0" newVersion="2.6.3.0" /> -->
        <bindingRedirect oldVersion="0.0.0.0-1.5.11.0" newVersion="1.5.11.0" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>
like image 58
user2432627 Avatar answered Jan 21 '26 02:01

user2432627



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!