dotpcap / sharppcap

Official repository - Fully managed, cross platform (Windows, Mac, Linux) .NET library for capturing packets
1.33k stars 268 forks source link

The type 'ReadOnlyCollection<>' is defined in an assembly that is not referenced #43

Closed sbrl closed 5 years ago

sbrl commented 6 years ago

Hello!

I've just updated from version 4.4.0 to 4.5.0, and I've got this build error:

<path>/Program.cs(39,39): Error CS0012: The type 'ReadOnlyCollection<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. (CS0012) (NetworkMidiConverter)
chmorgan commented 6 years ago

Is this an example with sharppcap or your own application? If your own application what .net framework are you targeting?

sbrl commented 6 years ago

This is with my own application. I'm targeting .NET v4.6.1 as far as I can tell, on Linux with mono.

chmorgan commented 6 years ago

If I had an example I could try to reproduce. Otherwise I’d recommend adding the netstandard assembly as the message is asking for.

On Apr 17, 2018, at 3:37 PM, Starbeamrainbowlabs notifications@github.com wrote:

This is with my own application. I'm targeting .NET v4.6.1 as far as I can tell, on Linux with mono.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/chmorgan/sharppcap/issues/43#issuecomment-382115366, or mute the thread https://github.com/notifications/unsubscribe-auth/ABJ-AEjKfFKMm_eRleJdQHh65BUWeDfEks5tpkRfgaJpZM4TYSDs.

sbrl commented 6 years ago

Hrm. As far as an example goes, simply create a new console app in monodevelop, target NET v4.5.1, and add SharpPcap via nuget. If I have time I'll investigate creating such a project myself and attaching it here.

chmorgan commented 6 years ago

You’ll want to target at least 4.6.1 for compatibility with sharppcap 4.5.0 as 4.6.1 is compatible with .net standard.

On Apr 17, 2018, at 4:29 PM, Starbeamrainbowlabs notifications@github.com wrote:

Hrm. As far as an example goes, simply create a new console app in monodevelop, target NET v4.5.1, and add SharpPcap via nuget. If I have time I'll investigate creating such a project myself and attaching it here.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/chmorgan/sharppcap/issues/43#issuecomment-382131408, or mute the thread https://github.com/notifications/unsubscribe-auth/ABJ-AAFzFOVKpyzj1Q6_s-oEcvtH7CBlks5tplCxgaJpZM4TYSDs.

chmorgan commented 5 years ago

closing as it sounds like you've resolved this