SDKs
.NET/C# SDK
78min
- SDK: .NET versions 3.5; 4.0; 4.5; 4.5.1; 4.5.2; 4.6; 4.6.1; 4.6.2; 4.7; 4.7.1; 4.7.2; 4.8; .NET Standard 2.0, Xamarin.Forms, .Net6
- Code Samples for Console app, WinForm, VB.Net and VBA, Xamarin.Forms Android and iOS
- Documentation
- Release notes
Note:
You may download the .NET SDK via NuGet from here: https://www.nuget.org/packages/LicenseSpring.NetSDK/
- Added parameter AirgapSkipLocalTimeCheck to ExtendedOptions. If set to true local licence check will ignore local time desynchronization. Works only with airgaped licences. Default is false.
- Implemented negative consumption on license and license features.
- Fixed UserLicense.Customer not being populated.
- Fixed null reference exception in floating client methods caused by ServerId property.
- Fixed web application not starting.
- Added overload method ILicense ILicenseManager.ActivateLicense(LicenseID, DeviceVariable[]) which enables setting device variables on license activation.
- Added UserLicensesData[] ILicenseManager.GetUserLicenses(string, string) that retrieves all licenses for the provided username and password, and for the product this LicenseManager is initialized for.
- Added long? ServerId property to ILicenseID, used for activating user licenses if a single user has multiple licenses for the same product.
- Discontinued support for .NET frameworks 3.5 and 4.0.
- Added Code property to LicenseActivationException to differentiate between license_transferred_max_times and license_activated_max_times api error codes.
- Added string OrderStoreId() method to ILicense. Run check license to populate data.
- Fixed missing metadata values
- Cleaned up public documentation
- Added BundleCode property to ExtendedOptions for cases when a single user has a bundle and a single license for the same product
- Added IncludeExpiredFeatures property to LicenseWatchdogSettings to enable watchdog to work with expired feature
- Added .net8.0 suppor
- Implemented support for custom web headers by adding property CustomHeaders to ExtendedOptions.cs
- Fixed an issue with metadata being deserialized to null.
- Added optional parameter includeExpiredFeatures to License.Check() for retrieving expired license features.
- Added optional parameters includeCustomFields and includeLatestVersion to ILicenseManager.GetProductDetails() method.
- Added AutoRelease property to ILicense (if set to true calls Release() in License destructor).
- Fixed object reference exception when WebRequest.DefaultWebProxy is set to null.
- Fixed several documentation typos.
- Fixed guid duplicate error for `LicenseWatchdogSettings` class
- Fixed assembly registration issue
- Implemented grace period feature.
- Added IsGracePeriodStarted, GracePeriodEndDateTime, GracePeriodEndDateTimeUTC methods to License class.
- Added GracePeriod option to ExtendedOptions class.
- Renamed methods related to subscription grace period to IsSubscriptionGracePeriodStarted, SubscriptionGracePeriod.
- Fixed bug of incorrect MaxActivations value when unlimited license activation is enabled.
- Fixed false positive VMware detection.
- Improved detection of Hyper-V.
- Improved logging of VM detection.
- Added RequestDateInvalidException.
- Added method TransferLimit to License class, it shows limit of license transfers between devices.
- Added helper methods IsDeviceTransferAllowed and IsDeviceTransferLimited`to License class.
- Updated console samples to print license device transfer limit.
- Improved air-gap activation security
- Added License.IsAirGapped
- Added License.PolicyId
- Implemented air-gap license deactivation, added License.DeactivateAirGap and License.GetAirGapDeactivationCode methods
- Updated AirGapSample to handle air-gap deactivation
- Improved Microsoft Hyper-V VM detection, fixed issues with false-positive detection.
- Improved exception handling for internal server errors.
- Moved verification of air gap confirmation code to LicenseManager.ActivateAirGapLicense, added AirGapActivationException.
- Added searching through policy files in case path to a directory is passed to LicenseManager.ActivateAirGapLicense.
- Fixed trial license detection issue for air-gap activation.
- Fixed signature check for offline floating licenses.
- Fixed last usage date time in trial mode.
- Fixed getting device id for Linux under WSL. You can download SDK zip from Google drive.
- Security patch, that address vulnerability of bypassing license signature verification.
- Added detection of Azure VM.
- Updated WinFormSample.
- Updated documentation.
- Added metadata field for ProductDetails, Customer, License and LicenseFeature classes.
- Fixed ArgumentOutOfRangeException on License.ValidityWithGracePeriod and License.IsValid for subscription licenses with grace period.
- Fixed issue of freezing calling thread when stopping watchdog or releasing borrowed license.
- Updated documentation.
- Updated LicenseWatchdog, added LicenseWatchdogSettings class. Added options: running the callback on every license check, handling NetworkException and LicenseServerException.
- Added handling borrowed license: if the license is borrowed, watchdog will be paused until borrowing end date time.
- Added License.SetupLicenseWatchdog method that takes LicenseWatchdogSettings as an argument. Updated WinForm sample to demonstrate usage of LicenseWatchdogSettings.
- Added License.SetWatchdogTimeout method.
- Fixed license borrowing using offline update files.
- Added License.CanBorrow helper method.
- Added License.Register method, see SDK documentation.
- Implemented unlimited consumption for consumption license and consumption features.
- Added License.IsUnlimitedConsumptionAllowed method and LicenseFeature.AllowUnlimitedConsumptions property.
- Updated SDK demo samples. Improved handling of floating licenses.
- Updated documentation.
- Improved security check for offline license activation and refresh, implemented offline signature verification.
- Improved error handling for offline license activation and refresh, the SDK will throw more specific exceptions in case of errors.
- Added exception for not supported target builds for air-gap activation.
- Added ExtendedOptions.AlternateKey, ExtendedOptions.AlternateServiceURL properties
- Improved security for License.UpdateOffline method.
- Fixed security issue when activating license offline on a different device.
- Fixed issue of JSON serialization.
- Fixed several issues related to offline activation when license contains features and custom fields.
- Improved VBA sample.
- Added SDK version to log file.
- Fixed issue getting WinAlternative device id for .Net Framework target builds.
- Added CustomerNotFoundException
- Fixed license features synchronization issues.
- Added License.MaxBorrowTime.
- Added License.Borrow overloaded method that accepts DateTime argument.
- Implemented License.IsGracePeriodStarted.
- Fixed issue of incorrect return value for FloatingEndDateTime method when license is borrowed.
- Updated ConsoleSample.
- Added InvalidApiKeyException, ReadOnlyApiKeyException, RevokedApiKeyException, and ApiKeyProductNotAllowedException.
- Implemented grace period feature for Subscription licenses. See License.GracePeriod and License.ValidityWithGracePeriod.
- Added FloatingTimeoutExpiredException.
- Fixed several issues with local license check and license expiry check.
- Fixed issue with CryptoProvider creation for Configuration when changing credentials.
- Adjusted obfuscation level to prevent false positive detection the SDK as malware.
- Added .NET 7 target build.
- Fixed issue of false positive malware detection in the SDK.
- Updated obfuscation.
- Implemented new API set for managing device variables. See DeviceVariable, License.GetDeviceVariables, License.AddDeviceVariable etc. Now device variables a being stored along with local license, managing device variables available both locally and on the backend. See SDK documentation for more details.
- Implemented license borrowing feature. See License.Borrow.
- Implemented DeviceIDAlgorithm.WinAlternative algorithm, fixed device id issue for UWP and self-contained apps.
- Added License.FloatingEndDateTime, now floating license expires when floating period ends.
- Added BorrowLicenseException.
- Added DateHeaderInvalidException.
- Fixed LicenseManager.RelinkLicense method.
- Fixed param encoding issue for get queries.
- Improved obfuscation.
- Fixed license signature verification error.
- Enlarged default network timeout, now default is 10 seconds.
- Improved security, implemented license signature v2 verification.
- Implemented SSO activation using auth code instead of token.
- Added SSOSample project.
- Removed License.Signature.
- Fixed issue of long delay on desktop platforms when getting device id and when DeviceIdAlgorithm.AutoId is set.
- Added ExtendedOptions.CloudIdRequestTimeout option. It allows control request timeout when querying cloud platforms for instance id.
- Improved obfuscation.
- Added Source: sdk header.
- Added License.StopLicenseWatchdog method.
- Implemented sending optional param sdk_lang.
- Fixed several issues and improved SDK <-> FloatingServer integration.
- Implemented getting instance id for GCP. Added DeviceIDAlgorithm.CloudPlatformsId and DeviceIDAlgorithm.AutoId. Removed ExtendedOptions.WebServiceMode.
- Fixed date conversion issue related to air gap activation.
- Implemented methods LicenseManager.GetSSOUrl and LicenseManager.ActivateLicense for activation of user based licenses using Single Sign On.
- Implemented methods LicenseManager.GetAirGapActivationCode, LicenseManager.VerifyConfirmationCode and LicenseManager.ActivateAirGapLicense for activation of air gap licenses. Air gap licensing is available only in .NET Framework 4.7 or greater, .NET Standard, .NET 5.0 and .NET 6.0 libraries.
- Added AirGapSample project.
- Added DeviceIDAlgorithm.Gen3 device ID calculation algorithm to generate shorter HardwareID. This option can be useful for air gap licenses.
- Added .Net6 support and ConsoleSampleNet6.
- Added DeviceIDAlgorithm enumeration and ExtendedOptions.DeviceIdAlgorithm property.
- Implemented method for updating license to new device id algorithm, see documentation for LicenseManager.RelinkLicense.
- Setter for LicenseID.Password made public.
- Added License.StartDate method and CannotBeActivatedNowException, see SDK docs for more details.
- Added address info data to the Customer class (address, city, state, country, postcode).
- Implemented ability to set desired license policy when requesting trial license. See LicenseManager.GetTrialLicense.
- Added new properties for consumption features: LicenseFeature.AllowOverages, LicenseFeature.MaxOverages, LicenseFeature.ResetConsumption and LicenseFeature.ConsumptionPeriod.
- Updated SDK samples.
- Fixed compatibility issue with licenses created by previous SDK versions.
- Added LicenseUser.IsInitialPassword property.
- Added data check when sending device variables.
- Improved support of handling multiple licenses, added BaseManager.ReloadLicense method.
- Fixed ArgumentException error when removing SDK data in case data location is current directory.
- Fixed incorrect license path if it was set as an empty string through the ExtendedOptions.
- Fixed UUID duplicate error.
- Fixed minor issues in VM Detection module.
- Updated VBA sample.
- Implemented VM detection, see ExtendedOptions.EnableVMDetection and Configuration.IsVM, Configuration.DetectedVMName.
- Added VMIsNotAllowedException.
- Added License.LicenseUser method. Added LicenseUser.Id property.
- Improved getting device id on Windows, improved error handling and logging.
- Fixed URL for offline activation page in WinForm sample.
- Fixed getting device ID in Xamarin sample.
- Added new license data fields, see License.TransferCount and License.FloatingSlotsInUse.
- Updated samples and configuration.
- Implemented new classes for interaction with on-premise floating server. See FloatingClient, FloatingServerInfo.
- Implemented feature of adding local consumption info (both for license and features) when deactivating license offline.
- Implemented IEquatable interface and operator == for LicenseID.
- Fixed issue losing local consumption data when updating license offline.
- Added cloud platforms support: Implemented getting Azure VM instance ID, adapted the SDK for working in Azure. Implemented getting AWS VM instance ID.
- Added ASP.Net sample application.
- Added ICryptoProvider iterface and CryptoProvider class. Now it is possible to set crypto key and/or salt, or implement custom CryptoProvider.
- Implemented new license storage model. See ILicenseStorage interface and LicenseMemoryStorage, LicenseFileStorage classes. Now it possible to store local license in custom locations like your DB, Windows registry, etc, by implementing ILicenseStorage interface.
- Implemented interprocess synchronization for local license, see LicenseFileStorageEx class.
- Added new properties LicenseManager.DataLocation, LicenseManager.LicenseFileName. LicenseManager.Initialize now accepts ILicenseStorage as optional argument.
- Added new properties to InstallationFile class, see EulaLink, ReleaseNotesLink, Channel, Size and Environment.
- Implemented filtering of installation files by environment and channel, added new class InstallationFileOptions.
- Improved License.UpdateOffline, added support for files created by the LicenseSpring platform.
- Improved error handling, general refactoring and improvements.
- Implemented getting information on license users, see LicenseUser and LicenseManager.GetCustomerLicenseUsers.
- LicenseManager.GetTrialLicense now returns LicenseID, that includes initial password for user-based licenses.
- Added new members to InstallationFile class, that allow implementation of intermediate updates. See InstallationFile.ReleaseDate and InstallationFile.RequiredVersion.
- Public keys was encrypted and moved to the code.
- Improved obfuscation.
- Added new method License.UpdateOffline.
- Added diff file to make SDK update easier.
- Allowed overwriting OS version info in Configuration.
- Fixed unknown exception in case of expired license, now SDK throws suitable exception type LicenseExpiredException.
- Fixed issues running on mobile platforms.
- Improved error handling, added new exception types LicenseDisabledException and LicenseInactiveException.
- Improved samples, updated VBA sample.
- Added new class LicenseID, generalized API calls for user-based and key-based products.
- Implemented LicenseStatus and added LicenseDeletedException, SDK throws it in case license was deleted by product admin.
- Allowed overwriting of network information (IP, MAC and hostname).
- Implemented caching of ProductDetails.
- Fixed connection issue when using SDK with Xamarin on iOS.
- Fixed unhandled exception issue when SDK runs in Unity for Android or iOS.
- Removed API and data types for creating licenses and orders, this API is transferred to separate Management SDK.
- General improvements and refactoring, simplified class names for LicenseSpringConfiguration and LicenseSpringExtendedOptions.
- Implemented expiry date for LicenseFeature, see LicenseFeature.ExpiryDate and LicenseFeature.IsExpired.
- Allowed decreasing consumption, see new methods License.UpdateConsumption and License.UpdateFeatureConsumption.
- Added optional parameter OverageRequest to License.SyncConsumption.
- Fixed connection check when SDK runs in Mono runtime.
- Implemented support for Xamarin.Forms, added SDK sample for Xamarin.Forms Android and iOS.
- Improved samples.
- Added .Net5.0 target build.
- Added new cross-platform sample.
- Removed reflection protection that was causing Unity editor and SmartAssembly to crash.
- Fixed port number in check connection method.
- Added LicenseSpringExtendedOptions.ProtectOfflineActivation option.
- Fixed problem with offline activation.
- Fixed typo in config file for VB.Net sample.
- Implemented SDK obfuscation.
- The assemblies have been signed with digital signature.
- Fixed check for connection when default proxy is being used.
- Fixed a few error messages.
- Minor fixes in WinForm sample.
- Implemented change password feature for user-based products. See LicenseManager.ChangePassword and License.ChangePassword.
- Added new exception types TrialLicenseExpiredException, PasswordChangeNotAllowedException and MissingParametersException.
- Added helper method License.MaintenanceDaysRemaining.
- Fixed License.DaysRemaining counter.
- Fixed connection check in conjunction with proxy.
- Improved WinForm sample.
- Security improvements for offline activation.
- Added new target Net Standard 2.1, it uses different API for device ID calculation compared to Net Standard 2.0 target. Please note device ID remains the same, just API changed.
- Added a few data members to LicenseDetails. See LicenseDetails.MaintenanceEndDate, LicenseDetails.IsFloating and others.
- Refactoring and performance improvements.
- Minor UI fixes in WinForm sample.
- Added new classes BaseManager and ManagementService. Functionality divided into management and end-user license handling.
- Updated LicenseDetails and OrderDetails classes, added new data members.
- Implemented LicenseWatchdog (background thread) for auto license checks, see License.SetupLicenseWatchdog.
- Threadsafety and reliability improvements.
- Added new exception types MaxFloatingReachedException and DeviceBlacklistedException.
- Created package for NuGet, so LicenseSpring is now avalible on NuGet, see https://www.nuget.org/packages/LicenseSpring.NetSDK/
- Fixed hardware ID issue due to localization of some WMI fields. See LicenseSpringExtendedOptions.UseNewHardwareID.
- Minor fixes and improvements in Configuration.
- Implemented increasing feature consumption in offline mode.
- Implemented Overages feature for Consumption license type. See License.IsConsumptionOverageAllowed and License.MaxConsumptionOverage.
- Implemented Floating licensing. See License.IsFloating, License.FloatingTimeout, License.FloatingUsers and License.Release
- Improved consumption handling. Added new methods License.UpdateFeatureConsumption, LicenseFeature.LocalConsumption.
- Added helper method License.Feature, it returns the feature code.
- Improved error handling and added new exception class InvalidLicenseFeatureException.
- Fixed License.TimesActivated count issue for offline activation.
- Fixed assembly registration issue (Guid duplicate error).
- Fixed encoding issue (invalid BOM marker in requests) on macOS Mono runtime.
- Improved error handling.
- .Net Standard build adapted for Linux and MacOS, now it's cross-platform, supported platforms are Windows, Linux and MacOS.
- Fixed and improved ProxySettings class and proxy related logic, for more details please see documentation.
- Updated documentation and other minor improvements.
- Added LicenseFeature.Name, now it's possible to get License feature name not only code.
- Added XML documentation, so now SDK documentation can be accessed and viewed from the IDE.
- Fixed deactivation bug, TimesActivated value wasn't updated properly. Improved License.Deactivate, see documentation.
- Improved License.IncreaseFeatureConsumption, removed redundant check and increased performance.
- Added sample app for .Net Core target.
- For .Net standard build System.Management package updated to the latest stable version 4.7.0.
- Fixed hardware ID issue for Unity Engine.
- Added helper method License.IsMaintenancePeriodExpired.
- Improved hardware ID algorithm. Does not throw exception if could not determine system disk ID.
- Improved error handling in case of network errors (like secure channel failure and others).
- Added new helper method LicenseManager.IsOnline, for more details see documentation.
- ProductDetails information now also available for offline activated licenses, see License.GetProductDetails.
- Default license file path changed to %localappdata%\LicenseSpring%ProductCode%\License.key If you use default license path in your app license will be transferred to new location by the SDK automatically.
- Fixed issue of empty offline activation file and corrupted license file.
- Improved error handling, LicenseFileException accompanied by internal exception, added NetworkException wrapper, see documentation.
- Added new LicenseManager.GetTrialLicense method. It accepts Customer object, when issuing trial license also new customer will be created or license will be assigned to existing customer.
- Added License.LastCheckDateUTC and fixed License.DaysRemaining method. See documentation for more details.
- Improved logging.
- Improved error handling, fixed exceptions messages.
- Added APINotFoundException, ActivationFileException, UnknownLicenseSpringException exceptions.
- Fixed issue of consumption features. Consumption changes were not stored to local license file properly.
- Fixed assembly registration warnings. Generic collections types was replaced with plain arrays for COM interop.
- Added interfaces for public classes, it's required for better COM interop.
- License.SendCustomData renamed to License.SendDeviceData.
- Fixed issue with company data member in Customer object.
- OrderDetails.OrderID property now public.
- Fixed ClassInterfaceAttribute for some of the public classes and assigned Guids.
- Added license owner information License.Owner, for more details see documentation.
- Added License.IsValid helper method, see documentation for more details.
- Fixed binary files (assembly dependencies and incorrect target framework versions).
- Fixed HardwareID issue in case of foreign (not english) locale.
- Added "WebService" mode for situations in which there is no possibility to save license file locally. Can be enabled by LicenseSpringExtendedOptions.WebServiceMode property.
- Added new API request LicenseManager.GetProductDetails, new class ProductDetails.
- Added LicenseSpringConfiguration.LicenseSpringAPIVersion property. It returns API version that SDK uses.
- API version field added to offline activation/deactivation files.
- LicenseManager.GetTrialKey replaced with LicenseManager.GetTrialLicense.
- Improved LicenseManager.CreateOrder, new class LicenseDetails.
- Improved console sample, now demonstrates both user-based and key-based licensing approaches.
- Added VB.Net sample.
- Added build for .Net 4.8 target.
- Added documentation for the SDK. See documentation/Documentation.html.
- User-based licensing. See new API details in the documentation.
- Added new exception type LicenseFileException. Could be thrown in case license file was damaged.
- Constructor of the LicenseManager now public. See details in the documentation.
- Added new methods License.MaxActivations and License.TimesActivated. Added ability to track MAC address. CollectHostNameAndLocalIP property renamed to CollectNetworkInfo.
- Stability and performance improvements.
- Added requests for creating licenses and orders. See LicenseManager.CreateLicense and LicenseManager.CreateOrder.
- Consumption license features. See License.Features, License.IncreaseFeatureConsumption and LicenseFeature class.
- Improved samples
- New API request License.SendCustomData, it allows sending custom data to the platform. Data will be linked to a device, so on the platform see device variables.
- Changed license status logic, now it's possible to check whether license is active even if it was disabled. See License.isActive, License.isEnabled and License.Status.
- Added Windows Forms sample.
- Added .Net Standard 2.0 build.
- Fixed online license check and updating license status
- Minor stability improvements
- Added new feature - Custom product (license) data fields, see License::CustomFields.
- Fixed sending of optional parameters app name and version.
- Added License::MaxDaysRemainingValue constant.
- Fixed determining of OS name.
- Added new API method License::IsOfflineActivated, returns true if license was activated in offline mode.
- Fixed a few minor bugs, License::IsExpired now returns correct value for inactive or disabled license.
- Added ability to control network timeout interval.
- Added SDK builds for new .Net target framework versions (4.6.2, 4.7, 4.7.1 and 4.7.2).
- Fixed expiry policy for subscription license type.
- Fixed license re-enabling issue.
- Added ability to use alternate proxy and credentials, new class ProxySettings.
- Fixed issue with default proxy credentials.
- LicenseSpringConfiguration.HardwareID now available for reading.
- Detecting system clock cheating during local check, new exception type DateTimeCheatingException.
- New helper methods DaysPassedSinceLastCheck, IsInitialized.
- Offline licensing. New methods - GetOfflineActivationFile, ActivateLicenseOffline and DeactivateOffline.
- Stability and performance improvements
- Fixed serialization bug of maximum DateTime values.
- Consumption licensing, new methods for ILicense - IncreaseConsumptionCounter, TotalConsumptions, MaxConsumptions and new exception type NotEnoughConsumptionException. See sample app for details.
- Online check of the license now returns InstallationFile of the last available product version.
- New license type - Consumption.
- Improved Hardware ID generation algorithm, now faster and less error prone.
- Added SDK usage sample from VBA scripts
- Fixed Factory classes that in use in COM interop (for VBA etc.)
- Ability to set custom hardware ID.
- LicenseSpringExtendedOptions, all optional SDK configuration properties now brought together in ExtendedOptions class, see sample app for details.
- IsActive was brought back for backward compatibility. Equivalent to Status() == LicenseStatus.Active.
- Stability and performance improvements, faster SDK initialization and license loading.
- Improved build script and sample app.
Updated 19 Nov 2024
Did this page help you?