Skip to content

Commit

Permalink
try fixing linux build issue
Browse files Browse the repository at this point in the history
  • Loading branch information
gasparnagy committed Oct 15, 2024
1 parent 4a38df6 commit d394632
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,6 @@ public string WriteToFileSystem(Solution solution, string outputPath)
? new NetCoreSdkInfo(solution.SdkVersion)
: _netCoreSdkInfoProvider.GetSdkFromTargetFramework(targetFramework);

if (targetFramework != 0 && sdk != null)
{
var globalJsonBuilder = new GlobalJsonBuilder().WithSdk(sdk);

var globalJsonFile = globalJsonBuilder.ToProjectFile();
_fileWriter.Write(globalJsonFile, outputPath);
}

DisableUsingSdkFromEnvironmentVariable();

var createSolutionCommand = DotNet.New(_outputWriter).Solution().InFolder(outputPath).WithName(solution.Name).Build();
Expand All @@ -74,6 +66,14 @@ public string WriteToFileSystem(Solution solution, string outputPath)
_fileWriter.Write(file, outputPath);
}

if (targetFramework != 0 && sdk != null)
{
var globalJsonBuilder = new GlobalJsonBuilder().WithSdk(sdk);

var globalJsonFile = globalJsonBuilder.ToProjectFile();
_fileWriter.Write(globalJsonFile, outputPath);
}

return solutionFilePath;
}

Expand Down

0 comments on commit d394632

Please sign in to comment.