asynkron / Wire

Binary serializer for POCO objects
Apache License 2.0
376 stars 63 forks source link

Importing package Wire and JetBrains.Annotations confuses the compiler #113

Closed icanhasjonas closed 7 years ago

icanhasjonas commented 8 years ago

I suggest one of the following:

  1. Wire import the JetBrains.Annotations in project.json
  2. Make the copied JetBrains annotations internal so they're not exposed to consumers
icanhasjonas commented 8 years ago
error CS0433: The type 'NotNullAttribute' exists in both 'JetBrains.Annotations.Dotnet, Version=10.1.5.0, Culture=neutral, PublicKeyToken=1010a0d8d6380325' 
and 'Wire, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'
rogeralsing commented 8 years ago

Thanks for reporting, I have moved the annotations to a different namespace, that should be sufficient, right? there is requirement for the Jetbrains tool to have the original namespace AFAIK.

icanhasjonas commented 8 years ago

Yes, but you can also change the visibility to internal.

Here's how:

Annotations source code: Make annotations [x] internal [ ] conditional
drewnoakes commented 8 years ago

If you use the JetBrains.Annotations NuGet package, the attributes are marked as [Conditional("JETBRAINS_ANNOTATIONS")] so aren't included in the compiled output, unless you include that symbol at compile time.

This means the annotations aren't available to consumers of the package. However you can also generate an XML version of the annotations from the ReSharper "internal" menu, if you run devenv /ReShaper.Internal, and include that XML file in the package.

corneliutusnea commented 8 years ago

Any plans to release a new package to NuGet with those annotations removed or changed to internal? They are blocking me to even compile and I don't really know a way to exclude them without going back to an older Wire.

rogeralsing commented 7 years ago

Fixed but not published, will publish asap after some more issues are done.