dotnet / dotnet/wcf

svcutil throws System.ComponentModel.Win32Exception while starting application on ubuntu 20

Open
#4,869 0 comments 0 reactions 1 assignee Claimed by @imcarolwang View on GitHub
Dominant language
C#
Stars
1.8k
Forks
576
Avg merge
6d 9h
Merged PRs (30d)
2

Description

svcutil throws System.ComponentModel.Win32Exception while starting application on ubuntu 20. The root cause is a permission denied while trying to run some file in /tmp directory.

Unhandled exception: System.ComponentModel.Win32Exception (13): An error occurred trying to start process '/tmp/dotnet-svcutil-lib_Temp/2022_Aug_02_18_12_28/SvcutilBootstrapper/bin/Debug/net6.0/SvcutilBootstrapper' with working directory '/tmp/dotnet-svcutil-lib_Temp/2022_Aug_02_18_12_28/SvcutilBootstrapper'. Permission denied

**To Reproduce**
1. Go to project directory
2. Run "dotnet svcutil --roll-forward LatestMajor SOME_WSDL_URL"

**Expected behavior**
- ServiceReference directory and code generated
- Project dependencies associated

**Screenshots**
```
dotnet svcutil --roll-forward LatestMajor https://sim-wgespaut-qa.dqs.afip.gob.ar/wgespaut.asmx --sync
Herramienta de generación de proxy del modelo de servicio WCF de Microsoft (R) para la plataforma .Net Core
[Microsoft.Tools.ServiceModel.Svcutil, Versión 2.0.3]
Copyright (c) Microsoft Corporation. Todos los derechos reservados.

Esta herramienta recopila información sobre su uso para mejorarla. Para deshabilitar esta funcionalidad, establezca la variable de entorno "DOTNET_SVCUTIL_TELEMETRY_OPTOUT" en 1.

Resolviendo las referencias del proyecto...
Arrancando la aplicación...
Unhandled exception: System.ComponentModel.Win32Exception (13): An error occurred trying to start process '/tmp/dotnet-svcutil-lib_Temp/2022_Aug_02_18_12_28/SvcutilBootstrapper/bin/Debug/net6.0/SvcutilBootstrapper' with working directory '/tmp/dotnet-svcutil-lib_Temp/2022_Aug_02_18_12_28/SvcutilBootstrapper'. Permission denied
at System.Diagnostics.Process.ForkAndExecProcess(ProcessStartInfo startInfo, String resolvedFilename, String[] argv, String[] envp, String cwd, Boolean setCredentials, UInt32 userId, UInt32 groupId, UInt32[] groups, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean usesTerminal, Boolean throwOnNoExec)
at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start()
at Microsoft.DotNet.Cli.Utils.Command.Execute(Action`1 processStarted)
at Microsoft.DotNet.Cli.Utils.Command.Execute()
at Microsoft.DotNet.Tools.Run.RunCommand.Execute()
at Microsoft.DotNet.Tools.Run.RunCommand.Run(ParseResult parseResult)
at Microsoft.DotNet.Cli.ParseResultCommandHandler.Invoke(InvocationContext context)
at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_0.<b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass12_0.<b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<b__18_0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass16_0.<b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass8_0.<b__0>d.MoveNext()
```
**Additional context**
I admit I am a freak by using this on linux, but I am trying to generate a poc and tutorial to adopt .net core 6 in my organization.

Thank you!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.