Содержание
- System.ComponentModel.Win32Exception when using ef tools #16071
- Expected behavior
- Actual behavior
- Environment data
- How To Fix System.Diagnostics.Process.Start System.ComponentModel.Win32Exception
- Footer
- System.ComponentModel.Win32Exception при запуске процесса – файл не найден, но файл существует
- System componentmodel win32exception

Итак, когда вы пытаетесь запустить файл в c:\program files\realtek\etcetera, ваша 32-разрядная программка будет перенаправлена на c:\program files (x86)\realtek\etcetera. Каталог, который не существует, kaboom. Тот же ингредиент для igfxtray.exe
System.ComponentModel.Win32Exception when using ef tools #16071
Run any dotnet ef command inside a working repo. I’m using the 2.2.107 sdk from the https://copr.fedorainfracloud.org/coprs/g/dotnet-sig/dotnet/ repo. Unfortunately there is not a newer sdk available.
Expected behavior
Show existing migrations
Actual behavior
$ dotnet ef migrations list System.ComponentModel.Win32Exception (2): No such file or directory at Interop.Sys.ForkAndExecProcess(String filename, String[] argv, String[] envp, String cwd, Boolean redirectStdin, Boolean redirectStdout, Boolean redirectStderr, Boolean setUser, UInt32 userId, UInt32 groupId, Int32& lpChildPid, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean shouldThrow) at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo) at System.Diagnostics.Process.Start() at System.Diagnostics.Process.Start(ProcessStartInfo startInfo) at Microsoft.EntityFrameworkCore.Tools.Exe.Run(String executable, IReadOnlyList`1 args, String workingDirectory, Boolean interceptOutput) at Microsoft.EntityFrameworkCore.Tools.Project.FromFile(String file, String buildExtensionsDir, String framework, String configuration, String runtime) at Microsoft.EntityFrameworkCore.Tools.RootCommand.Execute() at Microsoft.DotNet.Cli.CommandLine.CommandLineApplication.Execute(String[] args) at Microsoft.EntityFrameworkCore.Tools.Program.Main(String[] args) No such file or directory
Environment data
$ dotnet --info .NET Core SDK (reflecting any global.json): Version: 2.2.107 Commit: 2212cac826 Runtime Environment: OS Name: fedora OS Version: 30 OS Platform: Linux RID: fedora.30-x64 Base Path: /usr/lib64/dotnet/sdk/2.2.107/ Host (useful for support): Version: 2.2.5 Commit: 0a3c9209c0 .NET Core SDKs installed: 2.2.107 [/usr/lib64/dotnet/sdk] .NET Core runtimes installed: Microsoft.NETCore.App 2.2.5 [/usr/lib64/dotnet/shared/Microsoft.NETCore.App] To install additional .NET Core runtimes or SDKs: https://aka.ms/dotnet-download
Copied from original issue: dotnet/cli#11542
The text was updated successfully, but these errors were encountered:
wli3 commented Jun 13, 2019
From @omajid on Thursday, June 13, 2019 2:47:16 PM
The output of dotnet ef -v migrations list would be nice to have.
bricelam commented Jun 13, 2019 •
@jhoward321 In addition to the —verbose output, could you share your csproj?
jhoward321 commented Jun 14, 2019
So I’ve tried this with a number of different projects. I’ve been trying to use it on a larger project of mine, and I created a new dummy project. always the same issue. Both are dotnet core 2.2 projects.
Here’s the verbose output:
$ dotnet ef migrations add InitialCreate --verbose Using project '/media/BigDrive2/Coding/ef_error/ef_error.csproj'. Using startup project '/media/BigDrive2/Coding/ef_error/ef_error.csproj'. Writing '/media/BigDrive2/Coding/ef_error/obj/ef_error.csproj.EntityFrameworkCore.targets'. dotnet msbuild /target:GetEFProjectMetadata /property:EFProjectMetadataFile=/tmp/tmpSpTyF8.tmp /verbosity:quiet /nologo /media/BigDrive2/Coding/ef_error/ef_error.csproj System.ComponentModel.Win32Exception (2): No such file or directory at Interop.Sys.ForkAndExecProcess(String filename, String[] argv, String[] envp, String cwd, Boolean redirectStdin, Boolean redirectStdout, Boolean redirectStderr, Boolean setUser, UInt32 userId, UInt32 groupId, Int32& lpChildPid, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean shouldThrow) at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo) at System.Diagnostics.Process.Start() at System.Diagnostics.Process.Start(ProcessStartInfo startInfo) at Microsoft.EntityFrameworkCore.Tools.Exe.Run(String executable, IReadOnlyList`1 args, String workingDirectory, Boolean interceptOutput) at Microsoft.EntityFrameworkCore.Tools.Project.FromFile(String file, String buildExtensionsDir, String framework, String configuration, String runtime) at Microsoft.EntityFrameworkCore.Tools.RootCommand.Execute() at Microsoft.DotNet.Cli.CommandLine.CommandLineApplication.Execute(String[] args) at Microsoft.EntityFrameworkCore.Tools.Program.Main(String[] args) No such file or directory
Here’s the dummy project’s cs prof file. It doesnt seem related to the project because its happened with all of my projects. I’ve tried both sqlite and postgres backends.
netcoreapp2.2 InProcess
jhoward321 commented Jun 14, 2019 •
For what its worth I managed to get the tools working with the 2.2.300 binaries. Would love to get this fixed in the repos.
RheaAyase commented Jun 14, 2019 •
As I said. Our 2.1.507 & 2.2.107 are the latest, there is nothing newer (short of compiling the master branch yourself.) Microsoft likes to cause confusion with version numbers, that’s all there is to it. (@leecow I’d like to talk about this in our Thursday meeting if you could help me/us understand why is this happening. )
Either way, if there is an issue, it will not be solved by itself with a newer version. That would mean that someone fixed it and released the fix in the newer version — there is no newer version, nobody fixed anything, and nobody can release a fix that doesn’t exist.
If we want to actually resolve this, the solution is most certainly not in using Microsoft’s blobs which were build in completely different build pipeline than any other open source packages. The difference is that MS also packages AspNetCore with the blob, while source-build products do not and it is downloaded from NuGet, because it can not be built from source in this «different» pipeline. Yet.
ajcvickers added the type-bug label Jun 14, 2019
ajcvickers added this to the 3.0.0 milestone Jun 14, 2019
bricelam commented Jun 14, 2019
@jhoward321 It looks like dotnet isn’t on the path. How are you installing the .NET Core SDK?
RheaAyase commented Jun 14, 2019
dotnet is on the path otherwise it wouldn’t run — that is dotnet’s exception 😛
Or rather, that is EF’s exception, and for some reason it can’t find some (hardcoded or env.var’ed) filepath.
We checked DOTNET_ROOT and ASPNETCORE_ENVIRONMENT which are both set.
How To Fix System.Diagnostics.Process.Start System.ComponentModel.Win32Exception
bricelam commented Jun 14, 2019
Looks like the error comes when we try to execute this:
dotnet msbuild /target:GetEFProjectMetadata /property:EFProjectMetadataFile=/tmp/tmpSpTyF8.tmp /verbosity:quiet /nologo /media/BigDrive2/Coding/ef_error/ef_error.csproj
bricelam commented Jun 14, 2019
Can you try running that with \verbosity:normal ?
bricelam commented Jun 14, 2019
No wait, that’s not able to run because it can’t find dotnet .
jhoward321 commented Jun 15, 2019
@bricelam you want the msbuild command you posted above? That command works no problem. I can build projects fine, its only EF tools that don’t work.

$ dotnet msbuild /target:GetEFProjectMetadata /property:EFProjectMetadataFile=/tmp/tmpSpTyF8.tmp /verbosity:normal /nologo /media/BigDrive2/Coding/ef_error/ef_error.csproj Build started 6/15/19 11:18:57 AM. Build succeeded. 0 Warning(s) 0 Error(s) Time Elapsed 00:00:00.24
bricelam added the propose-punt label Jun 20, 2019
RheaAyase commented Jun 20, 2019
To keep this moving, dotnet is most certainly on $PATH, the initial issue is with EF throwing a dotnet exception on Linux system where nothing else other than dotnet itself could possibly do that 😛 (Therefor, dotnet is there, it is found, and it is running.)
@jhoward321 could we also have a dummy CS file to go with the projectfile if you have one? Or how can we create this on our end? Can you reproduce it with a dotnet new ? What would the something be, and then what do we need to add? (What nuget packages, what are the c# code changes, etc. )
omajid commented Jun 20, 2019
An strace might be nice to have too:
strace -e trace=%process -fo strace.log dotnet ef -v migrations list
Can you upload the generated strace.log file here?
bricelam commented Jun 20, 2019
dotnet-ef.dll is running fine. It throws when we try to Process.Start() this:
dotnet msbuild /target:GetEFProjectMetadata /property:EFProjectMetadataFile=/tmp/tmpSpTyF8.tmp /verbosity:quiet /nologo /media/BigDrive2/Coding/ef_error/ef_error.csproj
My first hypothesis was that it can’t find dotnet because it’s not on the PATH. We need to debug into Process.Start() to better understand what’s going on.
jhoward321 commented Jun 20, 2019
@omajid here’s the strace
25063 execve("/usr/bin/dotnet", ["dotnet", "ef", "-v", "migrations", "list"], 0x7ffdec676250 /* 76 vars */) = 0 25063 arch_prctl(0x3001 /* ARCH_. */, 0x7ffd77f3f820) = -1 EINVAL (Invalid argument) 25063 arch_prctl(ARCH_SET_FS, 0x7f805761f740) = 0 25063 clone(child_stack=0x7f8056bd2fb0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7f8056bd39d0, tls=0x7f8056bd3700, child_tidptr=0x7f8056bd39d0) = 25064 25063 clone(child_stack=0x7f80563d1fb0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7f80563d29d0, tls=0x7f80563d2700, child_tidptr=0x7f80563d29d0) = 25065 25063 clone(child_stack=0x7f8055bd0fb0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7f8055bd19d0, tls=0x7f8055bd1700, child_tidptr=0x7f8055bd19d0) = 25066 25063 clone(child_stack=0x7f80553cffb0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7f80553d09d0, tls=0x7f80553d0700, child_tidptr=0x7f80553d09d0) = 25067 25063 clone(child_stack=0x7f8054bcefb0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7f8054bcf9d0, tls=0x7f8054bcf700, child_tidptr=0x7f8054bcf9d0) = 25068 25063 clone(child_stack=0x7f804fefdfb0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7f804fefe9d0, tls=0x7f804fefe700, child_tidptr=0x7f804fefe9d0) = 25069 25063 clone(child_stack=0x7f804d542fb0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7f804d5439d0, tls=0x7f804d543700, child_tidptr=0x7f804d5439d0) = 25070 25063 clone(child_stack=0x7f804d501fb0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7f804d5029d0, tls=0x7f804d502700, child_tidptr=0x7f804d5029d0) = 25071 25071 exit(0) = ? 25071 +++ exited with 0 +++ 25063 clone(child_stack=0x7f804d501fb0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7f804d5029d0, tls=0x7f804d502700, child_tidptr=0x7f804d5029d0) = 25072 25063 clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f805761fa10) = 25073 25073 execve("/usr/bin/uname", ["uname", "-m"], 0x16e6530 /* 77 vars */) = 0 25073 arch_prctl(0x3001 /* ARCH_. */, 0x7fffe664fa30) = -1 EINVAL (Invalid argument) 25073 arch_prctl(ARCH_SET_FS, 0x7fd8e1f60580) = 0 25073 exit_group(0) = ? 25073 +++ exited with 0 +++ 25063 --- SIGCHLD --- 25072 waitid(P_ALL, 0, , WNOHANG|WEXITED|WNOWAIT, NULL) = 0 25072 wait4(25073, [], WNOHANG, NULL) = 25073 25072 waitid(P_ALL, 0, 0x7f804d501bb0, WNOHANG|WEXITED|WNOWAIT, NULL) = -1 ECHILD (No child processes) 25063 clone(child_stack=0x7f804c934fb0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7f804c9359d0, tls=0x7f804c935700, child_tidptr=0x7f804c9359d0) = 25075 25063 clone(child_stack=0x7f804c133fb0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7f804c1349d0, tls=0x7f804c134700, child_tidptr=0x7f804c1349d0) = 25076 25075 clone(child_stack=0x7f8047ffefb0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7f8047fff9d0, tls=0x7f8047fff700, child_tidptr=0x7f8047fff9d0) = 25077 25075 clone(child_stack=0x7f80477fdfb0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7f80477fe9d0, tls=0x7f80477fe700, child_tidptr=0x7f80477fe9d0) = 25078 25077 clone(child_stack=0x7f7fdd185fb0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7f7fdd1869d0, tls=0x7f7fdd186700, child_tidptr=0x7f7fdd1869d0) = 25079 25078 clone(child_stack=0x7f7fdc984fb0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7f7fdc9859d0, tls=0x7f7fdc985700, child_tidptr=0x7f7fdc9859d0) = 25080 25075 clone(child_stack=0x7f7fb7ffcfb0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7f7fb7ffd9d0, tls=0x7f7fb7ffd700, child_tidptr=0x7f7fb7ffd9d0) = 25081 25063 clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f805761fa10) = 25082 25082 execve("/home/jake/.dotnet/tools/dotnet-ef", ["/home/jake/.dotnet/tools/dotnet-". "-v", "migrations", "list"], 0x16e6530 /* 77 vars */) = 0 25082 arch_prctl(0x3001 /* ARCH_. */, 0x7fff079cf150) = -1 EINVAL (Invalid argument) 25063 clone(child_stack=0x7f804c0f2fb0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7f804c0f39d0, tls=0x7f804c0f3700, child_tidptr=0x7f804c0f39d0) = 25083 25082 arch_prctl(ARCH_SET_FS, 0x7fb17f844740) = 0 25082 clone(child_stack=0x7fb17edf7fb0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7fb17edf89d0, tls=0x7fb17edf8700, child_tidptr=0x7fb17edf89d0) = 25084 25082 clone(child_stack=0x7fb17e5f6fb0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7fb17e5f79d0, tls=0x7fb17e5f7700, child_tidptr=0x7fb17e5f79d0) = 25085 25082 clone(child_stack=0x7fb17ddf5fb0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7fb17ddf69d0, tls=0x7fb17ddf6700, child_tidptr=0x7fb17ddf69d0) = 25086 25082 clone(child_stack=0x7fb17d5f4fb0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7fb17d5f59d0, tls=0x7fb17d5f5700, child_tidptr=0x7fb17d5f59d0) = 25087 25082 clone(child_stack=0x7fb17cdf3fb0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7fb17cdf49d0, tls=0x7fb17cdf4700, child_tidptr=0x7fb17cdf49d0) = 25088 25082 clone(child_stack=0x7fb16fffefb0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7fb16ffff9d0, tls=0x7fb16ffff700, child_tidptr=0x7fb16ffff9d0) = 25089 25082 clone(child_stack=0x7fb17c0f8fb0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7fb17c0f99d0, tls=0x7fb17c0f9700, child_tidptr=0x7fb17c0f99d0) = 25090 25082 clone(child_stack=0x7fb1053aafb0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7fb1053ab9d0, tls=0x7fb1053ab700, child_tidptr=0x7fb1053ab9d0) = 25091 25082 exit_group(1 25090 +++ exited with 1 +++ 25091 +++ exited with 1 +++ 25089 +++ exited with 1 +++ 25088 +++ exited with 1 +++ 25087 +++ exited with 1 +++ 25086 +++ exited with 1 +++ 25082 ) = ? 25085 +++ exited with 1 +++ 25084 +++ exited with 1 +++ 25082 +++ exited with 1 +++ 25063 --- SIGCHLD --- 25072 waitid(P_ALL, 0, , WNOHANG|WEXITED|WNOWAIT, NULL) = 0 25072 wait4(25082, [], WNOHANG, NULL) = 25082 25072 waitid(P_ALL, 0, 0x7f804d501bb0, WNOHANG|WEXITED|WNOWAIT, NULL) = -1 ECHILD (No child processes) 25063 exit_group(1) = ? 25083 +++ exited with 1 +++ 25081 +++ exited with 1 +++ 25079 +++ exited with 1 +++ 25078 +++ exited with 1 +++ 25077 +++ exited with 1 +++ 25076 +++ exited with 1 +++ 25075 +++ exited with 1 +++ 25070 +++ exited with 1 +++ 25069 +++ exited with 1 +++ 25068 +++ exited with 1 +++ 25067 +++ exited with 1 +++ 25066 +++ exited with 1 +++ 25065 +++ exited with 1 +++ 25064 +++ exited with 1 +++ 25080 +++ exited with 1 +++ 25072 +++ exited with 1 +++ 25063 +++ exited with 1 +++
jhoward321 commented Jun 20, 2019
@RheaAyase I’ve tried this with multiple projects but I’ll upload the dummy project I’ve created for this issue. Here’s the dummy repo. I’ve tried sqlite and postgres with the same results.
divega modified the milestones: 3.0.0, Backlog Jun 21, 2019
divega added punted-for-3.0 and removed propose-punt labels Jun 24, 2019
ajcvickers added customer-reported and removed customer-reported labels Jul 2, 2019
bricelam added the propose-close label Sep 4, 2019
bricelam added the area-external label Sep 4, 2019
msabansal commented Sep 6, 2019
@jhoward321 I also hit the same issue. For me it turned out to be a bad symlink i had created for dotnet (/usr/local/bin/dotnet). Doing an unlink on this fixed the issue for me.
ajcvickers closed this as completed Nov 16, 2019
ajcvickers added closed-could-not-reproduce and removed propose-close labels Nov 16, 2019
ajcvickers removed this from the Backlog milestone Nov 16, 2019
ajcvickers removed the type-bug label Nov 17, 2019
ajcvickers removed the area-external label Oct 20, 2020
GeeWee mentioned this issue Mar 5, 2021
ajcvickers reopened this Oct 16, 2022
ajcvickers closed this as not planned Won’t fix, can’t repro, duplicate, stale Oct 16, 2022
8 participants
Footer
© 2023 GitHub, Inc.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
System.ComponentModel.Win32Exception при запуске процесса – файл не найден, но файл существует
Я пробую сделать менеджера для собственных автозапуска. Он должен прочесть XML файл, а потом запустить мои программки с пользовательской задержкой. К примеру:
Realtek Audio Manager C:\Program Files\Realtek\Audio\HDA\RtkNGUI64.exe 5
Производится обозначенный процесс ( C:\Program Files\. \RtkNGUI64.exe -s ) через 5 секунд.

Сейчас три программки не запустится, давая мне System.ComponentModel.Win32Exception : “Das System kann die angegebene Datei nicht finden”. ( “Системе не удалось отыскать обозначенный файл.” )
Но XML верно разбирается, и файл, который я желаю запустить, находится в местоположении, обозначенном в XML файле.
Неувязка касается только этих 3-х файлов:
Intel HotkeysCmd – C:\Windows\System32\hkcmd.exe
Intel GFX Tray – C:\Windows\System32\igfxtray.exe
Intel Persistance – C:\Windows\System32\igfxpers.exe
Я думаю, что неувязка связана с расположением файлов: они все размещены в C:\Windows\System32, а все другие рабочие программки находятся снаружи (C:\Program Files, C:\Program Files (x86), D:\Program Files, %AppData% )
Должен ли я предоставить моей программке какие-то права доступа для пуска программ в C:\Windows\System32? Как мне это сделать?
Если нет, то почему я получаю ошибки с этими программками?
delegate(object o) < var s = (Startup) o; var p = new System.Diagnostics.Process < StartInfo = new System.Diagnostics.ProcessStartInfo(s.Process, s.Arguments) >; try < s.Process = @"C:\Windows\System32\igfxtray.exe"; // For debugging purposes System.Diagnostics.Process.Start(s.Process); icon.ShowBalloonTip(2000, "StartupManager", "\"" + s.Name + "\" has been started.", System.Windows.Forms.ToolTipIcon.Info); >catch (System.ComponentModel.Win32Exception) < icon.ShowBalloonTip(2000, "StartupManager", "\"" + s.Name + "\" could not be found.", System.Windows.Forms.ToolTipIcon.Error); >>
Наилучший ответ:
Разумеется, что вы используете 64-разрядную версию Windows. В каталогах c:\windows\system32 и c:\программных файлов предоставляется функция, именуемая “перенаправление файловой системы”. Это функция appcompat, она помогает гарантировать, что 32-разрядные процессы не будут пробовать использовать 64-разрядные исполняемые файлы. Они будут перенаправлены на c:\windows\syswow64 и c:\program files (x86).
Итак, когда вы пытаетесь запустить файл в c:\program files\realtek\etcetera, ваша 32-разрядная программка будет перенаправлена на c:\program files (x86)\realtek\etcetera. Каталог, который не существует, kaboom. Тот же ингредиент для igfxtray.exe
Для вас необходимо будет поменять мотивированную платформу вашей платформы, чтоб она могла запускаться как свой 64-разрядный процесс и избежать задачи с перенаправлением, которую вы на данный момент имеете. Project + Properties, Build, измените настройку “Цель платформы” на AnyCPU.
System componentmodel win32exception
ProfileText ProfileText
We’re sorry. The content you requested has been removed. You’ll be auto redirected in 1 second.
This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.
Quick access
Asked by:
System.ComponentModel.Win32Exception: error when trying start a process
Question
I’m attempting to start a process from a service using a different account, using the using the process startinfo and process functions and I get the following error: System.ComponentModel.Win32Exception: The service cannot be started, either because it is disabled or because it has no enabled devices associated with it Does any one have any idea why this happens?
Monday, April 26, 2010 1:01 PM
All replies
is the service disabled, you can check that in the services window, Control Panel -> Administrative Tools -> Services
Monday, April 26, 2010 1:22 PM
The service is not disable. Maybe I wasn’t clear in my first description, the problem is that I attempting to start a vbscript from service, and I want the script run as a differenet user so I specify that the domain name, user name and password for the user. And this is when I get the System.ComponentModel.Win32Exception: The service cannot be started, either because it is disabled or because it has no enabled devices associated with it, it is logged by the service that is attempting to start the vbscript. But I don’t specify the domain and user name and password, i.e. execute the script as the same user name as the service’s user name, the vbscript works.
Monday, April 26, 2010 5:30 PM
Throws an exception for a Win32 error code. Win32 error codes are translated from their numeric representations into a system message when they are displayed. Use NativeErrorCode to access the numeric representation of the error code associated with this exception. For more information about the error codes, see «Win32 Error Codes» in the Platform SDK documentation athttp://msdn.microsoft.com. Sree THEY SAID I WAS LAZY, THEY DIDNT KNOW I DREAMT OF CODE!
www.crawller.com
PLS MARK AS ANSWER IF UR DOUBT IS SOLVED OR REVERT QUERY
Monday, April 26, 2010 6:34 PM
Hello, This usually means that your codes running the vbscript fails for some exception. The Services manager capture it and report the error: «The service cannot be started, either because it is disabled or because it has no enabled devices associated with it». So the exceptin message we got from the services.msc is common and not meaningful. I would suggest use a try catch block upon the whole codes. The catch block should get the exact error message. And as to such kind of issues, it is hard for community directly give help on this with this information. If you need more help, posting your codes and steps so that we can reproduce the issue locally and do further investigations. Best regards,
Ji Zhou
MSDN Subscriber Support in Forum
If you have any feedback of our support, please contact msdnmg@microsoft.com. Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Thursday, April 29, 2010 8:44 AM
What is the status of the issue? Is there any support we can provide on this? Best regards,
Ji Zhou
MSDN Subscriber Support in Forum Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Monday, May 3, 2010 7:25 AM
Dev centers
Learning resources
- Microsoft Virtual Academy
- Channel 9
- MSDN Magazine
Community
Support
Programs
- BizSpark (for startups)
- Microsoft Imagine (for students)
© 2023 Microsoft
Похожие статьи
-
System componentmodel win32exception 0x80004005 x360ce
Содержание failed to load ‘xinput1_3.dll’ #245 How To Fix x360ce «Failed to load xinput1_3.dll» or «Error 0x80004005» (Latest Guide) Footer Появляется…
-
System componentmodel win32exception 0x80004005
Содержание System componentmodel win32exception 0x80004005 XCOM 2 War of the Chosen error bypass «System.ComponentModel.Win32Exception (0x80004005)»…
-
System componentmodel win32exception не найден указанный модуль
Содержание Использование команды ЗапуститьПриложение #909 как исправить ошибку ненайден указанный модуль у кого не получается Ошибка при выполнении…