/// <summary>Ensures that up-to-date version for custom project system is installed</summary> /// <param name="cpsName">Name of custom project system</param> /// <returns>In case exception occurs during initialization returns the exception, otherwise null</returns> /// <exception cref="ArgumentNullException"><paramref name="cpsName"/> is null</exception> /// <exception cref="ArgumentException"><paramref name="cpsName"/> is an empty string</exception> protected virtual Exception EnsureCustomProjectSystem(string cpsName) { if (cpsName == null) { throw new ArgumentException(nameof(cpsName)); } if (cpsName == string.Empty) { throw new ArgumentException("Value cannot be an empty string", nameof(cpsName)); } var installer = new CustomProjectSystemInstaller(GetType(), cpsName); try { if (installer.NeedsDeployment()) { installer.Deploy(); } } catch (Exception ex) { return(ex); } return(null); }
/// <summary>Ensures that up-to-date version for custom project system is installed</summary> /// <param name="cpsName">Name of custom project system</param> /// <returns>In case exception occurs during initialization returns the exception, otherwise null</returns> /// <exception cref="ArgumentNullException"><paramref name="cpsName"/> is null</exception> /// <exception cref="ArgumentException"><paramref name="cpsName"/> is an empty string</exception> protected virtual Exception EnsureCustomProjectSystem(string cpsName) { if (cpsName == null) throw new ArgumentException(nameof(cpsName)); if (cpsName == string.Empty) throw new ArgumentException("Value cannot be an empty string", nameof(cpsName)); var installer = new CustomProjectSystemInstaller(GetType(), cpsName); try { if (installer.NeedsDeployment()) installer.Deploy(); } catch (Exception ex) { return ex; } return null; }