sta / sta/websocket-sharp

websocket-sharp\Net\CookieException.cs(10,10): Error CS0540: 'WebSocketSharp.Net.CookieException.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo, System.Runtime.Serialization.StreamingContext)': containing type does not implement interface 'System.Runtime.Serialization.ISerializable' (CS0540) (websocket-sharp)

Open
#544 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
6.1k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

Build error in r3427. Occurs when building for Release in VS2017 and MonoDevelop.

Inheritance from ISerializable seems to have been removed in r3410 (r3409 builds properly).

Commit log does not reveal what the intent was but I suspect the implemented functions should have been removed.

Removing the explicitly implemented functions allows the build to complete successfully in r3427 (but I am not sure if this is the correct fix).

Index: websocket-sharp/Net/CookieException.cs
===================================================================
--- websocket-sharp/Net/CookieException.cs      (revision 3409)
+++ websocket-sharp/Net/CookieException.cs      (revision 3410)
@@ -46,7 +46,7 @@
   /// The exception that is thrown when a <see cref="Cookie"/> gets an error.
   /// </summary>
   [Serializable]
-  public class CookieException : FormatException, ISerializable
+  public class CookieException : FormatException
   {
     #region Internal Constructors


Property changes on: websocket-sharp/Net/CookieException.cs
___________________________________________________________________

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with websocket-sharp/Net/CookieException.cs and compare revisions r3409, r3410, and r3427, focusing on the ISerializable declaration and explicitly implemented methods. Reproduce the Release build in VS2017 or MonoDevelop, then verify that the chosen correction removes CS0540 without breaking exception serialization.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
build-system
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.