You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> This is a *source compatible change*, but a *binary breaking change*. Users of this library must recompile for it to work correctly. Many libraries would consider this only in *major* version changes, not *minor* version changes.
125
+
126
+
### PATCH version increments (backwards-compatible bug fixes)
127
+
128
+
These changes fix issues without adding new features or breaking existing functionality:
129
+
130
+
- Fixing a bug in an existing method's implementation:
131
+
132
+
```csharp
133
+
// Version 1.0.0 - has a bug
134
+
publicintDivide(inta, intb)
135
+
{
136
+
returna/b; // Bug: doesn't handle division by zero
137
+
}
138
+
139
+
// Version 1.0.1 - PATCH increment
140
+
publicintDivide(inta, intb)
141
+
{
142
+
if (b==0) thrownewArgumentException("Cannot divide by zero");
143
+
returna/b; // Bug fixed, behavior improved but API unchanged
144
+
}
145
+
```
146
+
147
+
- Performance improvements that don't change the API:
The key principle is: if existing code can use your new version without any changes, it's a MINOR or PATCH update. If existing code needs to be modified to work with your new version, it's a MAJOR update.
166
+
35
167
There are also ways to specify other scenarios, for example, pre-release versions, when applying version information to your .NET library.
0 commit comments