Devenv.exe crash after running "Devenv.exe /setup" command - visual-studio-2019

I'm facing a problem in Visual Studio 2019 when run "Devenv.exe /setup". The below error appears:
Faulting application name: devenv.exe, version: 16.4.29519.181, time stamp: 0x5dd4c41f
Faulting module name: KERNELBASE.dll, version: 10.0.18362.476, time stamp: 0x540698cd
Exception code: 0xc0020001
Fault offset: 0x001135d2
Faulting process id: 0x1fd4
Faulting application start time: 0x01d5ac2ab285da4c
Faulting application path: c:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\devenv.exe
Faulting module path: C:\Windows\System32\KERNELBASE.dll
Report Id: 1c8317ca-dfc3-445e-be84-8b7a19b32f6c
Faulting package full name:
Faulting package-relative application ID:
Faulting application name: devenv.exe, version: 16.4.29519.181, time stamp: 0x5dd4c41f
Faulting module name: KERNELBASE.dll, version: 10.0.18362.476, time stamp: 0x540698cd
Exception code: 0xc000041d
Fault offset: 0x001135d2
Faulting process id: 0x1fd4
Faulting application start time: 0x01d5ac2ab285da4c
Faulting application path: c:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\devenv.exe
Faulting module path: C:\Windows\System32\KERNELBASE.dll
Report Id: 1047e34b-363a-4ecd-af5f-de8a84c1e04d
Faulting package full name:
Faulting package-relative application ID:
I need this to add extension to Visual Studio menu.
The problem happens for VisualStudio 2019, for both versions 16.3.8 and 16.4.0 which is the last update.
Please advice!

I need this to add extension to Visual Studio menu. The problem
happens for VisualStudio 2019, for both versions 16.3.8 and 16.4.0
which is the last update.
Still l am not sure about what does devenv.exe crash means.
Besides, as the document said like this:
devenv /setup
Forces Visual Studio to merge resource metadata that describes menus, toolbars, and command groups from all available VSPackages. You can only run this command as an administrator.
This switch takes no arguments. The devenv /Setup command is typically given as the last step of the installation process. Use of the /Setup switch doesn't start the IDE.
Note this means you should first run Developer Command Prompt for VS2019 as Administrator.(right-click on it and choose Administrator)
Then type devenv / setup to force Visual Studio to merge resource metadata that describes menus, toolbars, and command groups from all available VSPackages. This will not invoke instance of VS IDE and after that you can start VS.
If you run this command and then the command prompt exits immediately, please try this steps:
1) clean all the files under the path C:\Users\xxx\AppData\Local\Microsoft\VisualStudio\16.0_5131b69d\ComponentModelCache
2) do a repair in vs installer
Hope it could help you.

Related

F# - FSI- Load source file "Process is terminated due to StackOverflowException"

I have updated Visual Studio Community 2019 to Version 16.11.4 and when I try to load a source file (i.e.: Library1.fs) into the FSI environment (trough Alt+Enter or writing the #load command inside the FSI environment inside VISUAL STUDIO), I get the Stack Overflow Exception error:
Microsoft (R) F# Interactive versione 11.4.2.0 per F# 5.0
Copyright (C) Microsoft Corporation. Tutti i diritti sono riservati.
Per informazioni, digitare #help;;
#load "C:\Users\GianLuca\Source\Repos\x\x\Library1.fs";;
Process is terminated due to StackOverflowException.
Session termination detected.
This happen everytime I try to “Load” any source file, event an empty source file!!
NOTE: I’m using F-Sharp Library (.NET Framework 4.72), but the same occurs with CLASS LIBRARY (.NTE STANDARd or .NET CORE)
NOTE: if I lunch “dotnet fsi” from the command prompt (cmd) - outside form Visual Studio - and I try to “Load” the same files, it works fine (no Stack Overflow Exception!).
NOTE: I have launched the REPAIR action from the VISUAL STUDIO INSTALLER, but the problem persists.
How I can resolve it? I’m confused.
It seems a problem of F# INTERACTIVE inside Visual Studio Community 2019 Version 16.11.4
Many thanks in advance!
(See also: https://developercommunity.visualstudio.com/t/F---FSI--Load-source-file-Process-is-t/1550593)

Process with an id of x is not running (Visual studio 2017)

UPDATED BELOW
I have went trough several (if not all) posts mentioning this error on SO and google, but still having this issue. The error I get is:
Process with an id of x is not running
In addition I can notice this error in my VS output window as well:
The program '[11392] iisexpress.exe' has exited with code 0 (0x0).
The program '[11392] iisexpress.exe: Program Trace' has exited with code 0 (0x0).
Where the number is always the same as the PID mentioned in the original error.
I have checked and no, the PID is not used by any process, I have done a ton of stuff like proposed in here, here, here, here and some others ...
This is for all my Web projects (newly created from scratch or old ones).
So with a WPF for example this is working fine.
So this must be something IIS related i think, uninstalled it, reinstalled it had not effect, neither did renaming/removing the IISEXPRESS folder in documents or checking all options in CPanel => Turn features on/off for the IIS options and tons of other things I tried like adding environment variable
_CSRUN_DISABLE_WORKAROUNDS
run as admin, removing the .vs folder, removing the
IISUrl , DevelopmentServerVPath & DevelopmentServerPort
parts in the .csproj file or checking the
Tools menu > Options > Projects and Solutions > Web Projects > Use the 64 bit version of IIS Express
even uninstalled all my VS versions and reinstalled only 1 VS Enterprise 2017 ...
I'm completely lost here, what's happening?
Any suggestion is welcome!
UPDATE 1:
I have uninstalled the IISExpress 10 and installed the version 8, still the same issue.
This is what Event viewer is logging:
Log Name: Application
Source: Application Error
Date: 01/06/2019 09:33:00
Event ID: 1000
Task Category: (100)
Level: Error
Keywords: Classic
User: N/A
Computer: PCName
Description:
Faulting application name: iisexpress.exe, version: 8.0.8418.0, time stamp: 0x4fbae3d6
Faulting module name: ntdll.dll, version: 10.0.17763.475, time stamp: 0x3230aa04
Exception code: 0xc0000008
Fault offset: 0x00000000000a356a
Faulting process ID: 0x2d68
Faulting application start time: 0x01d5184c3d470917
Faulting application path: C:\Program Files\IIS Express\iisexpress.exe
Faulting module path: C:\WINDOWS\SYSTEM32\ntdll.dll
Report ID: cce33ecf-9507-42ab-87bf-9482a39181e9
Faulting package full name:
Faulting package-relative application ID:
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Application Error" />
<EventID Qualifiers="0">1000</EventID>
<Level>2</Level>
<Task>100</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2019-06-01T07:33:00.972839500Z" />
<EventRecordID>58319</EventRecordID>
<Channel>Application</Channel>
<Computer>PCName</Computer>
<Security />
</System>
<EventData>
<Data>iisexpress.exe</Data>
<Data>8.0.8418.0</Data>
<Data>4fbae3d6</Data>
<Data>ntdll.dll</Data>
<Data>10.0.17763.475</Data>
<Data>3230aa04</Data>
<Data>c0000008</Data>
<Data>00000000000a356a</Data>
<Data>2d68</Data>
<Data>01d5184c3d470917</Data>
<Data>C:\Program Files\IIS Express\iisexpress.exe</Data>
<Data>C:\WINDOWS\SYSTEM32\ntdll.dll</Data>
<Data>cce33ecf-9507-42ab-87bf-9482a39181e9</Data>
<Data>
</Data>
<Data>
</Data>
</EventData>
</Event>
UPDATE 2:
I have tried running VS 2017 Enterprise in SafeMode and it gives me this error:
I will investigate this error further, please, if anyone has any idea, post it!
I have the same problem. Here are some of the things I've done that haven't worked:
Delete the .vs folder in my project
Delete the IIS Express folder in My Documents
Add _CSRUN_DISABLE_WORKAROUNDS to your environment variable
Restart the computer
Restart Visual Studio
Change the port
Even re-install visual studio
Uninstall IIS 10.0 Express via Control Panel, then reinstall
I've tried almost all the solutions I got from several forums and none of them have worked.
Finally I found the source of the problem. The source of the problem is not from my project nor from my visual studio, but from my IIS.
When I open iisexpress.exe from C: \ Program Files \ IIS Express, the command prompt closes immediately. If your IIS Express is fine, then what will appear is as shown below.
iisexpress.exe if success
What I do is reset or reinstall IIS Express via Turn Windows Features on or off in Control Panel. And follow the step by step contained in the following link
My worked solution
This is the only way that worked for me, and hopefully it will help the others too.
For me problem was in different version of .net version on machine where i was trying to start project.
VS Solution was created on .net 6.o.5 version and after transferring solution to pc where o.6.4 only installed - issue with process occurs.
After updating .net to correct version issue is gone.
P.S. method with deleting the .vs folder does not help.
P.S.2 VS2022

"Csc.exe" could not be run. Access is denied (MSB6003)

I just downloaded and installed Xamarin and selected the ASP.NET MVC template. I haven't touched anything. When I build the solution I get the following error:
Could not add packages.
"The specified task executable "Csc.exe" could not be run. Access is denied (MSB6003)".
This is at the end of messages displayed on the Package Console:
Added file 'packages.config'.
An exception was thrown while dispatching a method call in the UI thread.
I'm running Windows 8.1 and Visual Studio Community 2015.
Any ideas?

c# exe throwing error only when run through task scheduler

I have an exe that developed on visual studio.
When we run it on the server, it will execute with out any issues.
But when I tried to execute it through Task scheduler, it is not running.
Please find the below error message from event viewer.
Please help me to resolve the issue
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.IO.DirectoryNotFoundException
Stack:
at System.IO.__Error.WinIOError(Int32, System.String)
at System.IO.Directory.InternalCreateDirectory(System.String, System.String, System.Object, Boolean)
at System.IO.DirectoryInfo.Create()
at CentralMarketTransfer.HEB.CentralMarketTransfer.util.SimpleLogging.LogMessageToFile(System.String)
at CentralMarketTransfer.HEB.CenteralMarketTransfer.main.ProjectMain.Main(System.String[])
Try to explicitly set the start directory for the task. You can set in Task Scheduler.
Select Task -> Right Click -> Properties -> Actions Tab -> Select Action -> Edit -> Start in (optional)
To me it seems that the current running directory is different when the exe is executed directly and when running through the task scheduler.
For reference:
What is the default working directory for a scheduled task in Windows 2008 R2?
Specifying the running directory for Scheduled Tasks using schtasks.exe

azure developement fabric dll hell

Hello I am trying to package and start up azure developement fabric on a windows 2008 server, I am so close yet still far. The steps I take are
1) run cspack.exe command /copyOnly to generate the .csx folder
2) run csrun.exe commmand /LaunchBrowser to start up the developement fabric and startup the browser
the error is as follows
System.BadImageFormatException: Could
not load file or assembly
'Interop.SSCE' or one of its
dependencies. An attempt was made to
load a program with an incorrect
format.
== Pre-bind state information === LOG: User = IP-0AE2B2DF\Administrator LOG:
DisplayName = Interop.SSCE (Partial)
LOG: Appbase =
file:///C:/Users/Administrator/Documents/Visual
Studio
2010/Projects/MyAzureProject/src/AzureCloudService/ServiceDefinition.csx/roles/MyAzureProject.Web/approot/
LOG: Initial PrivatePath =
C:\Users\Administrator\Documents\Visual
Studio
2010\Projects\MyAzureProject\src\AzureCloudService\ServiceDefinition.csx\roles\MyAzureProject.Web\approot\bin
Calling assembly : (Unknown).
=== LOG: This bind starts in default load context. LOG: Using application
configuration file:
C:\Users\Administrator\Documents\Visual
Studio
2010\Projects\MyAzureProject\src\AzureCloudService\ServiceDefinition.csx\roles\MyAzureProject.Web\approot\web.config
LOG: Using host configuration file:
C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Aspnet.config
LOG: Using machine configuration file
from
C:\Windows\Microsoft.NET\Framework64\v2.0.50727\config\machine.config.
LOG: Policy not being applied to
reference at this time (private,
custom, partial, or location-based
assembly bind). LOG: Attempting
download of new URL
file:///C:/Users/Administrator/AppData/Local/dftmp/s0/deployment(98)/res/deployment(98).AzureCloudService.MyAzureProject.Web.0/aspNetTemp/aspNetTemp/root/dfbc079a/82bed8d5/Interop.SSCE.DLL.
LOG: Attempting download of new URL
file:///C:/Users/Administrator/AppData/Local/dftmp/s0/deployment(98)/res/deployment(98).AzureCloudService.MyAzureProject.Web.0/aspNetTemp/aspNetTemp/root/dfbc079a/82bed8d5/Interop.SSCE/Interop.SSCE.DLL.
LOG: Attempting download of new URL
file:///C:/Users/Administrator/Documents/Visual
Studio
2010/Projects/MyAzureProject/src/AzureCloudService/ServiceDefinition.csx/roles/MyAzureProject.Web/approot/bin/Interop.SSCE.DLL.
ERR: Failed to complete setup of
assembly (hr = 0x8007000b). Probing
terminated.
this error happens with 2 dlls Interop.SSCE.DLL and SqlLite.dll Ive replaced all references to SqLite dll with a 64bit version and I dont have any references anymore to Interop.SSCE.DLL since I am not using it. Manually deleting these assemblies from the location
"C:\Users\Administrator\Documents\Visual Studio
2010\Projects\MyAzureProject\src\AzureCloudService\ServiceDefinition.csx\roles\MyAzureProject.Web\approot\bin"
solves the issue, but I dont obviously want to manually delete these everytime as I trying to automate a build process. My question is then how is the .csx folder actually generated and will this give me clues as to where these dll's are bring copied from? This is really frustrating as with the exception of those dll errors, I =m able to package the solution and startup the developement fabric with no other problems. Please Help!!
I realize this is old, but I just ran across it while trying to solve the same problem. In my case, the issue was that some of my projects were set to build x86 assemblies, instead of Any CPU. The solution was:
Go to Build -> Configuration Manager
Make sure "Active solution platform" is set to "Any CPU"
Make sure each of the projects also has the "Platform" set to "Any CPU"
Rebuild
Go to:
Tools > Options > Projects and Solutions > Web Projects
Check the Use the 64 bit version of IIS Express for web sites and projects.
This will ensure that your web project runs in x64 mode and will thus be able to use Service Fabric files.
Hope it helps...

Resources