Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[dotnet] Use only the first three parts of our product version as the…
… assembly version. (#14679) Problem: * Assembly A is compiled referencing Microsoft.*.dll v1.0.0.123 * Assembly B is compiled referencing assembly A, and Microsoft.*.dll v1.0.0.0 The C# compiler doesn't like this, and says something like: > error CS1705: Assembly 'A' with identity 'A, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' uses 'Microsoft.iOS, Version=1.0.0.123, Culture=neutral, PublicKeyToken=84e04ff9cfb79065' which has a higher version than referenced assembly 'Microsoft.iOS' with identity 'Microsoft.iOS, Version=1.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065' The C# compiler is right: you need all your local references to be at least the version of any indirect references, otherwise you're compiling using outdated API. On the other hand, we know that [1] we don't have any API differences (neither additions nor removals) between stable versions of assemblies where only the fourth digit is different. In that case, the C# compiler error is just making things more complicated for users, because if a upstream dependency is compiled with a newer (but API-identical) version of Microsoft.*.dll, it forces all their users to update as well. The fix is to always use '0' as the fourth digit. That way the C# compiler will accept different versions of any API-identical assemblies, and everybody is happy [2]. [1]: We know that we _shouldn't_ have API changes when the fourth digit changes. Hopefully we won't make any mistakes here... [2]: However, for people using preview versions, there may very well be API differences when the fourth digit changes. In that case, you're own your own, and if the build breaks, you get to guess the actual problem and then figure out the fix (which would usually be to use the latest version of the preview).
- Loading branch information
92ee92e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ Tests on macOS Mac Catalina (10.15) passed ✅
Tests passed
All tests on macOS Mac Catalina (10.15) passed.
Pipeline on Agent
[dotnet] Use only the first three parts of our product version as the assembly version. (#14679)
92ee92e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❌ Tests on macOS M1 - Mac Big Sur (11.5) failed ❌
Failed tests are:
Pipeline on Agent
[dotnet] Use only the first three parts of our product version as the assembly version. (#14679)
92ee92e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ [CI Build] Tests passed on VSTS: simulator tests iOS. ✅
Tests passed on VSTS: simulator tests iOS.
🎉 All 234 tests passed 🎉
Pipeline on Agent XAMBOT-1043.Monterey'
[dotnet] Use only the first three parts of our product version as the assembly version. (#14679)