dotnetcore / SmartCode

SmartCode = IDataSource -> IBuildTask -> IOutput => Build Everything!!!
Apache License 2.0
572 stars 163 forks source link

mac 使用错误 No such file or directory #46

Open Vision4135 opened 4 years ago

Vision4135 commented 4 years ago

Unhandled Exception: System.ComponentModel.Win32Exception: No such file or directory at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo) at System.Diagnostics.Process.Start() at System.Diagnostics.Process.Start(ProcessStartInfo startInfo) at SmartCode.App.BuildTasks.ProcessBuildTask.Build(BuildContext context) in C:\projects\smartcode\src\SmartCode.App\BuildTasks\ProcessBuildTask.cs:line 70 at SmartCode.App.ProjectBuilder.Build() in C:\projects\smartcode\src\SmartCode.App\ProjectBuilder.cs:line 54 at SmartCode.App.ProjectBuilder.Build() in C:\projects\smartcode\src\SmartCode.App\ProjectBuilder.cs:line 73 at SmartCode.App.SmartCodeApp.Run() in C:\projects\smartcode\src\SmartCode.App\SmartCodeApp.cs:line 103 at SmartCode.CLI.SmartCodeCommand.OnExecute() in C:\projects\smartcode\src\SmartCode.CLI\SmartCodeCommand.cs:line 37 at McMaster.Extensions.CommandLineUtils.Conventions.ExecuteMethodConvention.InvokeAsync(MethodInfo method, Object instance, Object[] arguments) at McMaster.Extensions.CommandLineUtils.Conventions.ExecuteMethodConvention.OnExecute(ConventionContext context, CancellationToken cancellationToken) at McMaster.Extensions.CommandLineUtils.Conventions.ExecuteMethodConvention.<>c__DisplayClass0_0.<b__0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at McMaster.Extensions.CommandLineUtils.CommandLineApplication.ExecuteAsync(String[] args, CancellationToken cancellationToken) at McMaster.Extensions.CommandLineUtils.CommandLineApplication.ExecuteAsync[TApp](CommandLineContext context, CancellationToken cancellationToken) at SmartCode.CLI.Program.Main(String[] args) in C:\projects\smartcode\src\SmartCode.CLI\Program.cs:line 17 at SmartCode.CLI.Program.

(String[] args) image

daimons commented 4 years ago

改下yml 中这四个地方 MakeBuildDir: Type: Process Parameters: FileName: '/bin/mkdir' Args: '{{Project.Parameters.BuildDir}}'

Copy: Type: Process Parameters: FileName: '/bin/cp' Args: '{{Project.ConfigPath}} {{Project.Parameters.BuildDir}}'

CodeFormat: Type: Process Parameters: FileName: /Users/你的用户名/.dotnet/tools/dotnet-format WorkingDirectory: '{{Project.Output.Path}}' Args: ''

ReStore: Type: Process Parameters: FileName: /usr/local/share/dotnet/dotnet WorkingDirectory: '{{Project.Output.Path}}' Args: restore

jimpier commented 4 years ago

/Users/你的用户名/.dotnet/tools/dotnet-format找不到 填上我用户名,执行后报错: System.InvalidOperationException: Failed to set or retrieve rusage information. See the error code for OS-specific error information. at Interop.libproc.proc_pid_rusage(Int32 pid) at System.Diagnostics.Process.get_TotalProcessorTime() at SmartCode.App.BuildTasks.ProcessBuildTask.Build(BuildContext context) in C:\projects\smartcode\src\SmartCode.App\BuildTasks\ProcessBuildTask.cs:line 104 at SmartCode.Generator.GeneratorProjectBuilder.Build() in C:\projects\smartcode\src\SmartCode.Generator\GeneratorProjectBuilder.cs:line 42 at SmartCode.App.SmartCodeApp.Run() in C:\projects\smartcode\src\SmartCode.App\SmartCodeApp.cs:line 120 at SmartCode.CLI.SmartCodeCommand.OnExecute() in C:\projects\smartcode\src\SmartCode.CLI\SmartCodeCommand.cs:line 50 at McMaster.Extensions.CommandLineUtils.Conventions.ExecuteMethodConvention.InvokeAsync(MethodInfo method, Object instance, Object[] arguments) at McMaster.Extensions.CommandLineUtils.Conventions.ExecuteMethodConvention.OnExecute(ConventionContext context, CancellationToken cancellationToken) at McMaster.Extensions.CommandLineUtils.Conventions.ExecuteMethodConvention.<>c__DisplayClass0_0.<b__0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at McMaster.Extensions.CommandLineUtils.CommandLineApplication.ExecuteAsync(String[] args, CancellationToken cancellationToken) at McMaster.Extensions.CommandLineUtils.CommandLineApplication.ExecuteAsync[TApp](CommandLineContext context, CancellationToken cancellationToken) at SmartCode.CLI.Program.Main(String[] args) in C:\projects\smartcode\src\SmartCode.CLI\Program.cs:line 17 at SmartCode.CLI.Program.

(String[] args)