Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidVollmers committed May 4, 2024
1 parent adb6625 commit f9de9b4
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/Doki.CommandLine/Commands/GenerateCommand.Outputs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,16 @@ internal partial class GenerateCommand
{
_logger.LogDebug("Loading output registration from project: {ProjectFileName}", fileInfo.Name);

var buildResult = await BuildProjectAsync(fileInfo, "Release", false, cancellationToken);
var fileName = fileInfo.Name[..^fileInfo.Extension.Length];

// this is needed so we can document Doki using Doki
var buildForDoki = fileName.StartsWith("Doki.Output.");

var buildResult =
await BuildProjectAsync(fileInfo, "Release", buildForDoki, cancellationToken);
if (buildResult != 0) return null;

var assemblyPath = Path.Combine(fileInfo.DirectoryName!, "bin", "Release", "net8.0",
$"{fileInfo.Name[..^fileInfo.Extension.Length]}.dll");
var assemblyPath = Path.Combine(fileInfo.DirectoryName!, "bin", "Release", "net8.0", $"{fileName}.dll");

return LoadOutputRegistrationFromAssembly(assemblyPath);
}
Expand Down

0 comments on commit f9de9b4

Please sign in to comment.