Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dotnet cake --target=info shows an error on macos. #468

Open
Techienaut opened this issue Oct 13, 2024 · 2 comments
Open

dotnet cake --target=info shows an error on macos. #468

Techienaut opened this issue Oct 13, 2024 · 2 comments
Labels
support Further information is requested

Comments

@Techienaut
Copy link

Techienaut commented Oct 13, 2024

I went through the entire steps in https://github.com/gusztavvargadr/packer/blob/master/samples/README.md?plain=1
to install dependencies (e.g. dotnet, cake, etc etc).

I'm getting this error when I enter: dotnet cake --target=info on my macbook:
Error: Argument 'sample' was not set.

dotnet is in my PATH. The git folder name is "packer" and I'm in the root of that folder. I downloaded all the submodules for git.

More Info

When I enter dotnet cake --target=info --verbosity=diagnostic I get error:

Compiling build script...
Error: Cake.Core.CakeException: Argument 'sample' was not set.
   at Cake.Common.ArgumentAliases.Argument[T](ICakeContext context, String name) in C:\projects\cake\src\Cake.Common\ArgumentAliases.cs:line 86
   at Submission#0.Argument[T](String name)
   at Submission#0.<<Initialize>>d__0.MoveNext()
--- End of stack trace from previous location ---
   at Microsoft.CodeAnalysis.Scripting.ScriptExecutionState.RunSubmissionsAsync[TResult](ImmutableArray`1 precedingExecutors, Func`2 currentExecutor, StrongBox`1 exceptionHolderOpt, Func`2 catchExceptionOpt, CancellationToken cancellationToken)
   at Microsoft.CodeAnalysis.Scripting.Script`1.RunSubmissionsAsync(ScriptExecutionState executionState, ImmutableArray`1 precedingExecutors, Func`2 currentExecutor, Func`2 catchExceptionOpt, CancellationToken cancellationToken)
   at Cake.Infrastructure.Scripting.RoslynScriptSession.Execute(Script script) in C:\projects\cake\src\Cake\Infrastructure\Scripting\RoslynScriptSession.cs:line 206
   at Cake.Core.Scripting.ScriptRunner.Run(IScriptHost host, FilePath scriptPath) in C:\projects\cake\src\Cake.Core\Scripting\ScriptRunner.cs:line 172
   at Cake.Features.Building.BuildFeature.RunCore(ICakeArguments arguments, BuildFeatureSettings settings) in C:\projects\cake\src\Cake\Features\Building\BuildFeature.cs:line 99
   at Cake.Features.Building.BuildFeature.Run(ICakeArguments arguments, BuildFeatureSettings settings) in C:\projects\cake\src\Cake\Features\Building\BuildFeature.cs:line 49
   at Cake.Commands.DefaultCommand.Execute(CommandContext context, DefaultCommandSettings settings) in C:\projects\cake\src\Cake\Commands\DefaultCommand.cs:line 76
@gusztavvargadr gusztavvargadr added the support Further information is requested label Oct 15, 2024
@gusztavvargadr
Copy link
Owner

@Techienaut related to your other issue #467, unfortunately, the docs are still lacking a bit after a recent update, that's why it's commented out in the README. The not rendered part is the old version which is slightly out of date, although the concepts are the same. Please see this discussion for a similar query: #449 (comment)

To start a build in the new setup use the configuration parameter as follows:

dotnet cake --configuration windows-server/2022-standard/virtualbox/native
dotnet cake --configuration windows-server/2022-standard/virtualbox/vagrant

The first command will build the native image, the second one will use the first one's output to build a Vagrant box.

For the time being while the docs are not updated, you can take a look at the pipeline definitions for working samples of the usage and the source of the build script itself.

Sorry for the inconvenience and please let me know if you have any other questions.

@gusztavvargadr
Copy link
Owner

@Techienaut any luck with this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
support Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants