xbikuna / nettopologysuite

Automatically exported from code.google.com/p/nettopologysuite
0 stars 0 forks source link

Invalid assembly references via Nuget. #160

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago

Using Nuget install nts.io.GeoJson.

Suppose, we have following code:

public static string ConvertToGeoJson(IGeometry geo)
{
  if (geo == null) throw new ArgumentNullException("geo");
  var sWriter = new GeoJsonWriter();
  return sWriter.Write(geo);
}

The project doesn't buidl:

The type 'NetTopologySuite.Features.FeatureCollection' is defined in an 
assembly that is not referenced. You must add a reference to assembly 
'NetTopologySuite, Version=1.13.0.0, Culture=neutral, 
PublicKeyToken=f580a05016ebada1'.   

The type 'GeoAPI.Geometries.IGeometry' is defined in an assembly that is not 
referenced. You must add a reference to assembly 'GeoAPI, Version=1.7.0.0, 
Culture=neutral, PublicKeyToken=a1a0da7def465678'.  

Nuget isntalled following versions:
GeoApi -- 1.7.1.0;
NetTopologySuite -- 1.13.1.0;
NetTopologySuite.IO.GeoJSON -- 1.12.1.0.

Original issue reported on code.google.com by sharov.a...@gmail.com on 9 Oct 2013 at 10:15

GoogleCodeExporter commented 8 years ago
>Using Nuget install nts.io.GeoJson.
do you mean this package? 
https://www.nuget.org/packages/HashFoo.Nts.GeoJson
you have problems building the project, without json package?
of course, you should comment the code that use classes in that assembly

Original comment by diegogu...@gmail.com on 9 Oct 2013 at 10:22

GoogleCodeExporter commented 8 years ago
Yes, exactly. I provided errors above, it is not json package issues. Also 
missing installed Newtonsoft.Json package is error on it's own. But it doesn't 
relate to this issue.

Original comment by sharov.a...@gmail.com on 9 Oct 2013 at 10:57

GoogleCodeExporter commented 8 years ago
1. created a console project
2. added nettopologysuite lib via nuget
3. compilation ok
packages.config looks like this:
<package id="GeoAPI" version="1.7.1.1" targetFramework="net40" />
<package id="NetTopologySuite" version="1.13.1" targetFramework="net40" />

Original comment by diegogu...@gmail.com on 9 Oct 2013 at 11:03

GoogleCodeExporter commented 8 years ago
then added also json package, all ok to me
<package id="GeoAPI" version="1.7.1.1" targetFramework="net40" />
<package id="HashFoo.Nts.GeoJson" version="1.0.2" targetFramework="net40" />
<package id="NetTopologySuite" version="1.13.1" targetFramework="net40" />

I suggest you to retry adding dependencies

Original comment by diegogu...@gmail.com on 9 Oct 2013 at 11:05

GoogleCodeExporter commented 8 years ago
I still have no luck. Please, can you check my attachment?

Original comment by sharov.a...@gmail.com on 9 Oct 2013 at 11:21

Attachments:

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
looks related to unofficial GeoJson package, that is build with old NTS 
versions.

Original comment by diegogu...@gmail.com on 9 Oct 2013 at 1:10

GoogleCodeExporter commented 8 years ago
I'm summitting the problem to nuget package creator

Original comment by diegogu...@gmail.com on 9 Oct 2013 at 1:12

GoogleCodeExporter commented 8 years ago
anyway... use the trunk :) My2Cents

Original comment by diegogu...@gmail.com on 9 Oct 2013 at 1:20

GoogleCodeExporter commented 8 years ago
Thank you very much! I've already solved my problem within a trunk. I just 
wanted to point on this annoying and stupid situation.
Another question: how can I check whether the problem is solved? Via manual 
checking of Nuget packages or this issue is tracked somewhere?

Original comment by sharov.a...@gmail.com on 9 Oct 2013 at 2:21

GoogleCodeExporter commented 8 years ago
this is an unofficial package, so actually I don't know how to help you.
Anyway, if the author fixes the problem and let me know, I can update this 
issue.

Original comment by diegogu...@gmail.com on 9 Oct 2013 at 2:35

GoogleCodeExporter commented 8 years ago
Thanks for the heads up (I created the unofficial and unmaintained NuGet).  Is 
there any interest in creating an "official" one?  I've never submitted a patch 
before in Google Code, so I may need some guidance.

Original comment by fai...@gmail.com on 9 Oct 2013 at 7:07

GoogleCodeExporter commented 8 years ago
@faivre:
just send us your nuspec file :)

Original comment by felix.ob...@netcologne.de on 9 Oct 2013 at 7:20