コード例 #1
0
        /// <summary>
        /// Sets the platform target.
        /// </summary>
        /// <param name="settings">The settings.</param>
        /// <param name="target">The target.</param>
        /// <returns>The same <see cref="MSBuildSettings"/> instance so that multiple calls can be chained.</returns>
        public static MSBuildSettings SetPlatformTarget(this MSBuildSettings settings, string target)
        {
            if (settings == null)
            {
                throw new ArgumentNullException(nameof(settings));
            }

            settings.WithProperty("Platform", target);
            return(settings);
        }
コード例 #2
0
 /// <summary>
 /// Sets the package version.
 /// </summary>
 /// <param name="settings">The settings.</param>
 /// <param name="packageVersion">The package version.</param>
 /// <returns>The same <see cref="MSBuildSettings"/> instance so that multiple calls can be chained.</returns>
 public static MSBuildSettings SetPackageVersion(this MSBuildSettings settings, string packageVersion)
 => settings.WithProperty("PackageVersion", packageVersion);
コード例 #3
0
 /// <summary>
 /// Sets the package release notes.
 /// </summary>
 /// <param name="settings">The settings.</param>
 /// <param name="packageReleaseNotes">The package release notes.</param>
 /// <returns>The same <see cref="MSBuildSettings"/> instance so that multiple calls can be chained.</returns>
 public static MSBuildSettings SetPackageReleaseNotes(this MSBuildSettings settings, string packageReleaseNotes)
 => settings.WithProperty("PackageReleaseNotes", packageReleaseNotes);
コード例 #4
0
 /// <summary>
 /// Sets the informational version.
 /// </summary>
 /// <param name="settings">The settings.</param>
 /// <param name="informationalVersion">The informational version.</param>
 /// <returns>The same <see cref="MSBuildSettings"/> instance so that multiple calls can be chained.</returns>
 public static MSBuildSettings SetInformationalVersion(this MSBuildSettings settings, string informationalVersion)
 => settings.WithProperty("InformationalVersion", informationalVersion);
コード例 #5
0
 /// <summary>
 /// Sets the assembly version.
 /// </summary>
 /// <param name="settings">The settings.</param>
 /// <param name="assemblyVersion">The assembly version.</param>
 /// <returns>The same <see cref="MSBuildSettings"/> instance so that multiple calls can be chained.</returns>
 public static MSBuildSettings SetAssemblyVersion(this MSBuildSettings settings, string assemblyVersion)
 => settings.WithProperty("AssemblyVersion", assemblyVersion);
コード例 #6
0
 /// <summary>
 /// Sets the file version.
 /// </summary>
 /// <param name="settings">The settings.</param>
 /// <param name="fileVersion">The file version.</param>
 /// <returns>The same <see cref="MSBuildSettings"/> instance so that multiple calls can be chained.</returns>
 public static MSBuildSettings SetFileVersion(this MSBuildSettings settings, string fileVersion)
 => settings.WithProperty("FileVersion", fileVersion);
コード例 #7
0
 /// <summary>
 /// Sets the version suffix.
 /// </summary>
 /// <param name="settings">The settings.</param>
 /// <param name="versionSuffix">The version suffix.</param>
 /// <returns>The same <see cref="MSBuildSettings"/> instance so that multiple calls can be chained.</returns>
 public static MSBuildSettings SetVersionSuffix(this MSBuildSettings settings, string versionSuffix)
 => settings.WithProperty("VersionSuffix", versionSuffix);
コード例 #8
0
 /// <summary>
 /// Sets the version.
 /// </summary>
 /// <param name="settings">The settings.</param>
 /// <param name="version">The version.</param>
 /// <returns>The same <see cref="MSBuildSettings"/> instance so that multiple calls can be chained.</returns>
 /// <remarks>
 /// Version will override VersionPrefix and VersionSuffix if set.
 /// This may also override version settings during packaging.
 /// </remarks>
 public static MSBuildSettings SetVersion(this MSBuildSettings settings, string version)
 => settings.WithProperty("Version", version);