diff --git a/Synthesis.Bethesda.Execution/Patchers/Git/ModifyProject/AddAllReleasesToOldVersions.cs b/Synthesis.Bethesda.Execution/Patchers/Git/ModifyProject/AddAllReleasesToOldVersions.cs index 56d182a2..7444caa7 100644 --- a/Synthesis.Bethesda.Execution/Patchers/Git/ModifyProject/AddAllReleasesToOldVersions.cs +++ b/Synthesis.Bethesda.Execution/Patchers/Git/ModifyProject/AddAllReleasesToOldVersions.cs @@ -1,6 +1,5 @@ using System.Xml.Linq; using Noggog; -using NuGet.Versioning; namespace Synthesis.Bethesda.Execution.Patchers.Git.ModifyProject; @@ -11,13 +10,13 @@ public class AddAllReleasesToOldVersions public void Add( XElement proj, Version? curSynthVersion, - NuGetVersion targetMutagenVersion, - NuGetVersion? targetSynthVersion) + Version targetMutagenVersion, + Version? targetSynthVersion) { if (targetSynthVersion != null && curSynthVersion != null && curSynthVersion < IntroducingSynthesisVersion - && targetSynthVersion.Version >= IntroducingSynthesisVersion) + && targetSynthVersion >= IntroducingSynthesisVersion) { foreach (var group in proj.Elements("ItemGroup")) { diff --git a/Synthesis.Bethesda.Execution/Patchers/Git/ModifyProject/ModifyRunnerProjects.cs b/Synthesis.Bethesda.Execution/Patchers/Git/ModifyProject/ModifyRunnerProjects.cs index 6ee53b06..8896f048 100644 --- a/Synthesis.Bethesda.Execution/Patchers/Git/ModifyProject/ModifyRunnerProjects.cs +++ b/Synthesis.Bethesda.Execution/Patchers/Git/ModifyProject/ModifyRunnerProjects.cs @@ -77,14 +77,7 @@ public void Modify( if (index == -1) return version; return version.Substring(0, index); } - - if (versions.Mutagen == null) - { - throw new ArgumentException("Target mutagen version null"); - } - var targetMutagenNugetVersion = NuGetVersion.Parse(versions.Mutagen); - var targetSynthesisNugetVersion = versions.Synthesis != null ? NuGetVersion.Parse(versions.Synthesis) : default; var trimmedMutagenVersion = TrimVersion(versions.Mutagen); var trimmedSynthesisVersion = TrimVersion(versions.Synthesis); foreach (var subProj in _availableProjectsRetriever.Get(solutionPath)) @@ -112,8 +105,11 @@ public void Modify( { _removeProject.Remove(projXml, "Newtonsoft.Json"); } - - _addAllReleasesToOldVersions.Add(projXml, synthVersion, targetMutagenNugetVersion, targetSynthesisNugetVersion); + + if (targetMutaVersion != null && targetSynthesisVersion != null) + { + _addAllReleasesToOldVersions.Add(projXml, synthVersion, targetMutaVersion, targetSynthesisVersion); + } if (targetMutaVersion >= NamespaceMutaVersion && mutaVersion < NamespaceMutaVersion)