Note:
The tool requires that the project is set up already and that the actions are executed in the top-level directory of where your domain layer directory is located.
Can you be more specific?
What is that top-level directory?
I tried to run the scaffolder in the root directory where all the other domains and commands and queries are, with the following arguments:
scaffold -o Nomenclatures -o Create -ot command
and I got this exception:
Unhandled exception. Microsoft.Build.Shared.InternalErrorException: MSB0001: Internal MSBuild Error: unexpectedly not a rooted path
at Microsoft.Build.Shared.ErrorUtilities.ThrowInternalError(String message, Object[] args)
at Microsoft.Build.Shared.ErrorUtilities.VerifyThrowInternalRooted(String value)
at Microsoft.Build.Construction.SolutionFile.set_FullPath(String value)
at Microsoft.Build.Construction.SolutionFile.Parse(String solutionFile)
at CQRSAndMediator.Scaffolding.Models.DomainSettingsModel..ctor(String concern, String operation, PatternDirectoryType patternType, GroupByType groupBy) in C:\Sources\MyGithub\CQRSAndMediator-Scaffolding\Models\DomainSettingsModel.cs:line 27
at CQRSAndMediator.Scaffolding.Infrastructure.ClassAssembler..ctor(String concern, String operation, PatternDirectoryType patternType, GroupByType groupBy) in C:\Sources\MyGithub\CQRSAndMediator-Scaffolding\Infrastructure\ClassAssembler.cs:line 19
at CQRSAndMediator.Scaffolding.Infrastructure.ClassAssembler.Configure(String concern, String operation, PatternDirectoryType patternType, GroupByType groupBy) in C:\Sources\MyGithub\CQRSAndMediator-Scaffolding\Infrastructure\ClassAssembler.cs:line 23
at CQRSAndMediator.Scaffolding.Builders.BuildResponse.Build(String concern, String operation, GroupByType groupBy) in C:\Sources\MyGithub\CQRSAndMediator-Scaffolding\Builders\BuildResponse.cs:line 10
at CQRSAndMediator.Scaffolding.Program.<>cDisplayClass0_0.b0() in C:\Sources\MyGithub\CQRSAndMediator-Scaffolding\Program.cs:line 79
at McMaster.Extensions.CommandLineUtils.CommandLineApplication.<>cDisplayClass148_0.b0(CancellationToken _)
at McMaster.Extensions.CommandLineUtils.CommandLineApplication.ExecuteAsync(String[] args, CancellationToken cancellationToken)
at McMaster.Extensions.CommandLineUtils.CommandLineApplication.Execute(String[] args)
at CQRSAndMediator.Scaffolding.Program.Main(String[] args) in C:\Sources\MyGithub\CQRSAndMediator-Scaffolding\Program.cs:line 102
By the way, it would be nice if the application shows the help when invoked without any arguments.
Note: The tool requires that the project is set up already and that the actions are executed in the top-level directory of where your domain layer directory is located.
Can you be more specific? What is that top-level directory?
I tried to run the scaffolder in the root directory where all the other domains and commands and queries are, with the following arguments:
scaffold -o Nomenclatures -o Create -ot command
and I got this exception:
Unhandled exception. Microsoft.Build.Shared.InternalErrorException: MSB0001: Internal MSBuild Error: unexpectedly not a rooted path at Microsoft.Build.Shared.ErrorUtilities.ThrowInternalError(String message, Object[] args) at Microsoft.Build.Shared.ErrorUtilities.VerifyThrowInternalRooted(String value) at Microsoft.Build.Construction.SolutionFile.set_FullPath(String value) at Microsoft.Build.Construction.SolutionFile.Parse(String solutionFile) at CQRSAndMediator.Scaffolding.Models.DomainSettingsModel..ctor(String concern, String operation, PatternDirectoryType patternType, GroupByType groupBy) in C:\Sources\MyGithub\CQRSAndMediator-Scaffolding\Models\DomainSettingsModel.cs:line 27 at CQRSAndMediator.Scaffolding.Infrastructure.ClassAssembler..ctor(String concern, String operation, PatternDirectoryType patternType, GroupByType groupBy) in C:\Sources\MyGithub\CQRSAndMediator-Scaffolding\Infrastructure\ClassAssembler.cs:line 19 at CQRSAndMediator.Scaffolding.Infrastructure.ClassAssembler.Configure(String concern, String operation, PatternDirectoryType patternType, GroupByType groupBy) in C:\Sources\MyGithub\CQRSAndMediator-Scaffolding\Infrastructure\ClassAssembler.cs:line 23 at CQRSAndMediator.Scaffolding.Builders.BuildResponse.Build(String concern, String operation, GroupByType groupBy) in C:\Sources\MyGithub\CQRSAndMediator-Scaffolding\Builders\BuildResponse.cs:line 10 at CQRSAndMediator.Scaffolding.Program.<>cDisplayClass0_0.b0() in C:\Sources\MyGithub\CQRSAndMediator-Scaffolding\Program.cs:line 79
at McMaster.Extensions.CommandLineUtils.CommandLineApplication.<>cDisplayClass148_0.b 0(CancellationToken _)
at McMaster.Extensions.CommandLineUtils.CommandLineApplication.ExecuteAsync(String[] args, CancellationToken cancellationToken)
at McMaster.Extensions.CommandLineUtils.CommandLineApplication.Execute(String[] args)
at CQRSAndMediator.Scaffolding.Program.Main(String[] args) in C:\Sources\MyGithub\CQRSAndMediator-Scaffolding\Program.cs:line 102
By the way, it would be nice if the application shows the help when invoked without any arguments.