itinero / routing

The routing core of itinero.
Apache License 2.0
221 stars 69 forks source link

NETSTANDARD20 Constant is not defined in netstandard2.0 build #210

Closed jonwagner closed 6 years ago

jonwagner commented 6 years ago

I noticed that the NETSTANDARD20 constant isn't defined for netstandard2.0 builds. This results in FastHierarchyBuilder.InitializeWitnessGraph to not use multi-threaded operations.

I suggest adding the following to Itinero.csproj:

  <PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
    <DefineConstants>$(DefineConstants);NETSTANDARD20;NETFX_CORE;DOTNET_CORE</DefineConstants>
  </PropertyGroup> 
airbreather commented 6 years ago

Alternative suggestion: pretty sure the SDK defines NETSTANDARD2_0 (notice the underscore) for .NET Standard builds.

xivk commented 6 years ago

Ok, thanks for the suggestions :+1:

xivk commented 6 years ago

@airbreather Are you sure about this, I can't find any docs on this.

xivk commented 6 years ago

Nevermind, it's here: https://docs.microsoft.com/en-us/dotnet/core/tutorials/libraries

jonwagner commented 6 years ago

There's another one at line 470 in FastHierarchyBuilder.

https://github.com/itinero/routing/blob/e7f1d8719d29fdb6bf31e11f1537242e76e25141/src/Itinero/Algorithms/Contracted/FastHierarchyBuilder.cs#L470

xivk commented 6 years ago

Hmmm, thanks, missed that one!