Skip to content

Commit

Permalink
fix: set TargetFramework to have default value (#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
glennawatson authored Jan 1, 2020
1 parent 575cb8c commit d3759cd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/Pharmacist.MsBuild.NuGet/PharmacistNuGetTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ namespace Pharmacist.MsBuild.NuGet
[SuppressMessage("Design", "CA1031: Catch specific exceptions", Justification = "Final logging location for exceptions.")]
public class PharmacistNuGetTask : Task, IEnableLogger
{
private const string DefaultTargetFramework = "netstandard2.0";

private static readonly ISet<string> ExclusionPackageReferenceSet = new HashSet<string>(StringComparer.InvariantCultureIgnoreCase)
{
"Pharmacist.MSBuild",
Expand All @@ -42,8 +44,7 @@ public class PharmacistNuGetTask : Task, IEnableLogger
/// <summary>
/// Gets or sets the target framework.
/// </summary>
[Required]
public string TargetFramework { get; set; }
public string TargetFramework { get; set; } = DefaultTargetFramework;

/// <summary>
/// Gets or sets the output file.
Expand All @@ -65,8 +66,7 @@ public override bool Execute()

if (string.IsNullOrWhiteSpace(TargetFramework))
{
Log.LogError($"{nameof(TargetFramework)} is not set");
return false;
TargetFramework = DefaultTargetFramework;
}

using (var writer = new StreamWriter(Path.Combine(OutputFile)))
Expand Down
2 changes: 1 addition & 1 deletion version.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.3",
"version": "1.4",
"publicReleaseRefSpec": [
"^refs/heads/master$", // we release out of master
"^refs/heads/develop$", // we release out of develop
Expand Down

0 comments on commit d3759cd

Please sign in to comment.