Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Humanizer.Core 2.1.0 breaks compatibility with PCL Profile 259 #573

Closed
IlSocio opened this issue Jul 15, 2016 · 12 comments
Closed

Humanizer.Core 2.1.0 breaks compatibility with PCL Profile 259 #573

IlSocio opened this issue Jul 15, 2016 · 12 comments
Labels

Comments

@IlSocio
Copy link

IlSocio commented Jul 15, 2016

Hi,
I was using Humanizer.Core v2.0.1 within a PCL Profile 259
After upgrading to v2.1.0 the project doesn't compile anymore due to the errors below.
It seems you've upgraded Humanizer to the new NetStandard target, but it can't be referenced anymore from a PCL Profile 259

warning MSB3274: The primary reference "Humanizer, Version=2.1.0.0, Culture=neutral, PublicKeyToken=979442b78dfc278e, processorArchitecture=MSIL" 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=Profile259".

error CS0246: The type or namespace name 'Humanizer' could not be found (are you missing a using directive or an assembly reference?)
@clairernovotny
Copy link
Member

Hi,

What version of Visual Studio and what version of NuGet do you have?

The Humanizer 2.1 packages require at least NuGet 2.12 when using VS 2013 and at least 3.4 on VS 2015 Update 3.

Humanizer, and any netstandard1.0 library, will install into a PCL 259 project.

@IlSocio
Copy link
Author

IlSocio commented Jul 15, 2016

I'm using Visual Studio 2015 - Update 3 and NuGet 3.4

According to this link:
https://xamarinhelp.com/dot-net-standard-pcl-xamarin-forms/
".NET Standard Libraries can reference Profile Based PCL’s but a Profile Based PCL can’t reference a .NET Standard Library PCL (not that I know of anyway)."

@IlSocio
Copy link
Author

IlSocio commented Jul 15, 2016

I just created the a test-solution for this issue:
https://github.com/IlSocio/HumanizerTest

The PCL_NetStandard compiles successfully, while the PCL_259 doesn't

It seems that the statement
".NET Standard Libraries can reference Profile Based PCL’s but a Profile Based PCL can’t reference a .NET Standard Library PCL"
is correct.

@clairernovotny
Copy link
Member

clairernovotny commented Jul 15, 2016

Okay, found the root cause. First, that link is wrong. Netstandard does work with PCL 259, you can try installing System.Reactive to prove that.

Second, the real issue is that the wrong TargetFrameworkAttribute is on Humanizer for some reason. The value is .NETPortable,Version=v5.0 when it should be .NETStandard,Version=v1.0. That's why it's failing.

@clairernovotny clairernovotny added this to the Next Bugfix milestone Jul 15, 2016
@IlSocio
Copy link
Author

IlSocio commented Jul 15, 2016

Thank you Oren, understood 👍

@MobileRez
Copy link

MobileRez commented Oct 12, 2016

I am getting this as well when Using Humanizer with VSTS build host. Its the only package that fails. with error:

"C:\a\1\s\Droid\Fuze.Droid.csproj" (PackageForAndroid target) (1) ->
2016-10-12T20:49:52.6316961Z "C:\a\1\s\Fuze\Fuze.csproj" (default target) (3) ->
2016-10-12T20:49:52.6316961Z (CoreCompile target) ->
2016-10-12T20:49:52.6316961Z Converters\DateConverters.cs(9,7): error CS0246: The type or namespace name 'Humanizer' could not be found (are you missing a using directive or an assembly reference?) [C:\a\1\s\Fuze\Fuze.csproj]

Its working fine when debugging locally so it may be another issue, but this is currently breaking my CI and Auto Deploy builds for beta testing.

@clairernovotny
Copy link
Member

This was a bug that they fixed in the latest VS 2015 Update 3 KB. Can you please verify that you have Update 3 and the latest hotfixes for it?

https://msdn.microsoft.com/en-us/library/mt752379.aspx

You can see it listed under "Issue 12" of the 9/14/2016 update.

@IlSocio
Copy link
Author

IlSocio commented Oct 17, 2016

I just checked using the latest Update 3 and the issue is gone! Thank you Oren :)

@aloisdg aloisdg closed this as completed Oct 17, 2016
@hazzik
Copy link
Member

hazzik commented Oct 26, 2016

@onovotny but, it still needs to be .NETStandard,Version=v1.0, doesn't it?

I think the issue with the .targets file inclusion.

@ChaseFlorell
Copy link

@onovotny I see this is closed, and tagged with "Next Bug Fix", but I'm not seeing a new release. What would we need to do to get this ball rolling?

@clairernovotny
Copy link
Member

The issue was in VS 2015's build. Update 3 + the latest KB's fixed this.

@julesx
Copy link

julesx commented Feb 7, 2017

I am running VS2015 Update 3 with the latest hotfix linked above and am still experiencing this issue. What other information can I provide?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants