-
-
Notifications
You must be signed in to change notification settings - Fork 50
Migration
This document describes necessary adjustments to the code when upgrading to a higher major version. See also Changelog (or for pre-release 8.0 see Changelog).
All projects are now only compiled for AnyCPU
and require VS2019+ or Mono 5+ to build. Almost all assemblies are now strong-named.
- Optional - Delete old references in your project dependencies to SIL.* and other relevant dependencies (e.g. NDesk.DBus if using SIL.Core.Desktop, NAudio if using SIL.Media, etc.)
- In Visual Studio, right-click on your project and select Manage NuGet Packages. In Browse, search for the relevant dependency names, e.g. SIL.Core. If you wish or need to use one of the beta builds, check the "Include Prerelease" checkbox. Click Install. Continue for all the SIL dependencies you need to update.
- If your project still references taglib-sharp (with that specific formatting), remove that dependency. (The new one is named "TagLibSharp").
- Optional - Double-check your .csproj files (perhaps in a diff) and make sure any references to the old assemblies/locations are gone.
- Build and test your program. Fix any breaking changes from prior versions to version 8 (see below).
- Optional - Cleanup any scripts you have that automatically download the old dependencies.
-
Breaking API changes in the
SIL.Media
assembly:-
IAudioRecorder.SelectedDevice
now returns aIRecordingDevice
instead ofRecordingDevice
. This is implemented in both NAudio and AlsaAudioRecordingDevice
classes. This allows to use the same assembly on both Windows and Linux (although the limitations what works and what doesn't work remain the same) - rename
AudioIrrKlangSession
toWindowsAudioSession
.AudioAlsaSession
andWindowsAudioSession
are now internal (they were never intended to be used directly) - move some interfaces around so that they live in
SIL.Media
instead ofSIL.Media.Naudio
:IAudioRecorder
,RecordingState
,IAudioPlayer
,PeakLevelEventArgs
- some functions now return IRecordingDevice instead of RecordingDevice (e.g. SIL.Media.Naudio.RecordingDevice.Devices)
-
-
Several classes moved from
SIL.Core.Desktop
back toSIL.Core
to make them available to .NET Standard clients:- IO/PathUtilities
- IO/TempFileForSafeWriting
- Reporting/AnalyticsEventSender
- Reporting/ConfigurationException
- Reporting/ConsoleErrorReporter
- Reporting/ConsoleExceptionHandler
- Reporting/ErrorReport
- Reporting/ExceptionHandler
- Reporting/ExceptionHelper
- Reporting/Logger
- Reporting/ReportingSettings
- Reporting/UsageReporter
-
[SIL.Core]
HandleUnhandledException()
method moved from derived classes to base class -
SIL.Windows.Forms
depends on Markdig instead of MarkdownDeep.NET
-
[SIL.Core] Deprecate
ExceptionHandler.Init()
method in favor of more explicit versionExceptionHandler.Init(ExceptionHandler)
, e.g.ExceptionHandler.Init(new WinFormsExceptionHandler())
-
[SIL.Core] Deprecate
HttpUtilityFromMono
class. UseSystem.Web.HttpUtility
instead. -
[SIL.DblBundle] Deprecate
TextBundle.CopyVersificationFile
,CopyFontFiles
andCopyLdmlFile
in favor ofGetVersificationFile
,GetFontFiles
, andGetLdmlFile
.
- [SIL.Core]
XmlSerializationHelper.Serialize<T>
to allow serialization to aTextWriter
. - [SIL.Core]
XmlSerializationHelper.Deserialize<T>
to allow deserialization from aTextReader
. - [SIL.Core]
XmlSerializationHelper.SerializeToString<T>
overload to allow caller to specify encoding. - [SIL.Core]
Platform.IsGnomeShell
to detect if executing in a Gnome Shell - [SIL.Core] new properties for processor architecture:
Platform.ProcessArchitecture
andPlatform.IsRunning64Bit
- [SIL.DblBundle]
DblMetadata.Load
overload to allow deserialization from aTextReader
. - [SIL.DblBundle]
TextBundle<TM, TL>.GetVersification
(to replace deprecatedCopyVersificationFile
) - [SIL.DblBundle]
TextBundle<TM, TL>.GetFonts
(to replace deprecatedCopyFontFiles
) - [SIL.DblBundle]
TextBundle<TM, TL>.GetLdml
(to replace deprecatedCopyLdmlFile
) - [SIL.Scripture]
Versification.Table.Load
overload to allow deserialization from aTextReader
. - [SIL.Scripture]
ScrVers.Save
overload to allow serialization to aTextWriter
.
- All projects switched to the new sdk-style project files
- Projects now require Visual Studio 2019. Using VS Code or Rider will also work. On Linux we require Mono 5.
- To be able to open files in Designer on Windows you'll need at least Visual Studio 2019 version 16.8
- Check platform at runtime instead of compile-time - no more
#if MONO
statements in the code; same binary will work cross-platform. - All projects are only compiled for
AnyCPU
- Refactored SIL.Media:
-
IAudioRecorder.SelectedDevice
now returns a newly definedIRecordingDevice
interface. This interface is implemented in theRecordingDevice
class of both NAudio and AlsaAudio. - Load the correct 32- or 64-bit version of irrKlang.NET4 at runtime.
-
- Added a
CHANGELOG.md
file. Relevant changes and bugfixes should be documented in here. What gets added will show up as release notes on the nuget packages on nuget.org. What should go in this document is:- Any changes to the API
- Bugfixes since the last released version
- Other relevant changes that affect the consumers of the library
- Added GitVersion to calculate the version number
See the Google doc for a more detailed discussion of some of the changes and the reasons why things were done a certain way.
(In case you're wondering: There's also a version 7. That was released a bit prematurely; trying to use the nuget packages of that version revealed some problems. To fix them required more breaking changes which increased the version to 8)