Visual Studio 2019--Exception from HRESULT 0x80041fe4 - asp.net

Every time I try to create a new "ASP.NET Web Application (.NET Framework)" project, as soon as I get to the page where I select from Empty, Web Forms, MVC etc and select Web Forms, I get a popup saying
Exception from HRESULT: 0x80041fe4
I'm able to continually try creating these with no luck. I've deleted the folder and retried, I've uninstalled Visual Studio and reinstalled it, all to no avail.

Cora - I encountered the same issue and your steps worked. After VS2019 created the solution folder, I closed it and relaunched it. The second time through, creating the solution and project using exactly the same name it successfully created the solution and project.

I encountered the same error when trying to create a C# console app project. I used the steps in JJ Lay's answer to work around the issue. To be clear, these are the steps that I used:
Attempt to create a C# console app project (for example, named "TestProj" in Visual Studio 2019
Encounter 'Exception from HRESULT 0x80041fe4'
Close Visual Studio 2019
Open Visual Studio 2019
Use the same exact steps and name as in step 1 (for example, "TestProj") and try to create the project again
Project is created successfully this time

I fixed it by closing closing open window and creating a new project in fresh visual studio

I encountered the same error message 'Exception from HRESULT 0x80041fe4' when creating a C# NUint Project.
I tried the Steps mentioned by #Lars Passic without any success
I'm using Visual Studio Community 2022 .Net 7 Windows 10 OS with intel i9 Processor
Close all Visual Studio Processes
Opened the Visual Studio Installer
Click on More
Click on Repair
Restart the Computer after it Complete
Create the new Project
Project Successfully Created.
This issue occurs after my computer shut down (unstable Power supply issue) when I was working on the project
Tried to restore the files once reopened Visual Studio

Related

Getting an error on first line of all my aspx pages even when started to create a new web application

I'm using Visual studio 2017 for past few years. Now, first line of all aspx page shows below error on all my existing web applications.
Runtime error: Object reference not set to an instance of an object.
Also I tried to create a new project. It is also showing same issue. And when I try to run those project, It shows "localhost refused to connect."
I have tried many solutions from web. But couldn't solve the issue. What I tried are,
Deleted .vs folder
Deleted .suo file
Clean and rebuild
Uninstalled VS 2017 and reinstalled. Now I'm using version 15.9.34
UPDATE 1
I have uninstalled VS 2017 and installed VS 2019. Still showing same error for website projects. I have installed .NET frame work version V4.0.30319 and ASP.NET and web development tools.

ASP.Net Core 2 - IIS 502.5 Error

I am creating an ASP .Net Core (2.0) MVC application within Visual Studio 2017 which was working absolutely fine.
After turning off my computer yesterday and coming back to my application today, I now receive this browser error when I start the application in chrome without debugging.
Running dotnet run within the directory of the application, I can access the site just fine. It is just when I run it via Visual Studio/IIS Express I get this error.
HTTP Error 502.5 - Process Failure
The application builds and compiles just fine. I have also cleaned the solution.
Looking in the event logs I find:
Application 'MACHINE/WEBROOT/APPHOST/MYAPP' with
physical root 'C:\Users\Ben Hawkins\Desktop\Development Folder
\Dev\Website\Version_2\MYAPP\MYAPP\'
failed to start process with commandline 'C:\Program Files
(x86)\Microsoft Visual
Studio\2017\Community\Common7\IDE\Extensions\Microsoft\Web
Tools\ProjectSystem\VSIISExeLauncher.exe -argFile "C:\Users\Ben
Hawkins\AppData\Local\Temp\tmp3547.tmp"', ErrorCode = '0x80004005 :
0.
Within my output window in Visual Studio 2017 I recieve this message under
ASP NET CORE WebServer
Failed to initialize CoreCLR, HRESULT: 0x80131534
What I have tried:
Cleaning the solution, rebuilding etc
Restarting the computer
Trying to launch another application. (Same result)
Created a new application from scratch. Same result.
Repairing Visual Studio Community 2017. Same result.
Stopping/Closing IIS Express
My setup was working perfectly yesterday and suddenly is not.
Thank you for your time. I hope we can find a solution.
We finally found the issue! After logging on to the machine as a different user, we saw a warning that the main user had ignored initially. There was a 0 byte file in the root of the directory named "Program" with no file extension. It appears that this causes some sort of issue when VSIISExeLauncher.exe is invoked through Visual Studio. (Note it would work if executed from the command prompt). After deleting the file, everything worked!
We do not know how this file was placed there for certain, but suspect it was some sort of copy error when the user was pulling in files from his old hard drive.
I don't know if anyone else will come across this, but if so hopefully this helps!
Maybe you need install previous versions of .NET Core, isn't it? I installed here and it works now. I had only .NET Core 2.0 installed and I realized that applications with 1.1 stopped so when running. In Windows' event logs I've had the same error registered.
Try to change the IISExpress to IIS by creating new IIS profile and change the Lunch to IIS. It resolved my problem.
I have hit a very similar issue with ASP.net Core 2.0. I had copied my VS project to a new one, and I was getting this error message.
After doing some research, I was able to determine that the nlog.config file was not copied into the bin > Debug > net461 folder. Once I did this, I was able to run my application.
I found it by running dotnet run from the command line on my project where the csproj files live.
Had same issue yesterday (windows 10).
Solved it this way:
Update Microsoft.AspNetCore to latest (Nuget manager - 2.1.3)
Make sure the sdk also updated to latest version. if not, update it manually from Nuget console like this:
Install-Package Microsoft.NETCore.App -Version 2.1.3
Download and install latest ASP.NET Core/.NET Core: Runtime & Hosting Bundle
from here
Same problem with version 2.2. Reinstalling .NET Core SDK fixed the problem for us.
In my case, my project was setup as a website in IIS and the file "bin\IISSupport\VSIISExeLauncher.exe" was missing in the project's directory.
I simply selected "IIS" when debugging the project in Visual Studio 2019 and it generated the missing file. It also generated 2 text files (IISExeLauncherArgs.txt, pidfile.txt) in the IISSupport folder, made changes to my web.config file, and my project ran successfully.
After that I was able to access the local website that was setup in IIS without running it in Visual Studio.

encountered my Xamarin windows phone UWP app creation in visual studio 2017 RC

I recently updated my Visual Studio 2017 RC and after update the PCL option were not shown in my Xamarin app, so I selected shared form app. While starting new project, it's given me an error and it does not created UWP project in solution explorer.
I have tried repair, reinstall every dependent of VS2017 RC but it's still giving me the same error:
A problem was encountered creating the sub project 'App1.UWP. Unable
to copy the file 'Windows_TemporaryKey.pfx' form the project template
to project. Cannot find file
"C:\User\\AppData\Local\Temp\mnmdes3z.njy\Temp\Windows_temporaryKey.pfx"
Haven't encountered this problem before with VS2017 RC Not sure, but I hope this helps: https://developercommunity.visualstudio.com/content/problem/18705/xamarinforms-solution-fails-to-create-uwp-project.html
or
https://twitter.com/Houssem_Dbira/status/831872617422397440

Visual Studio 2015 - Opening two projects in debug mode

I'm using Visual Studio Ultimate 2015 CTP (Version 14.0.22512.0 DP), and create two asp.net 5 vnext web applications.
When one is running, and I'm starting the second one with the context menu "Debug->Start new instance" option, the IIS Express crashes instantly (Internet Explorer opens firstly the second project, and then instantly closes both, Chrome simply display only that the page doesn't exist).
The only trace that I found is in the Event Viewer, a Warning from IIS Express:
The directory specified for caching compressed content C:\Users\Alek\AppData\Local\Temp\iisexpress\IIS Temporary Compressed Files\Clr4IntegratedAppPool is invalid. Static compression is being disabled.
Any suggestions how to fix this? It's hard to work on a multi-tier project when only one project can be run at a time.
When I created manually above folder, nothing is logged to the event viewer, but the IIS Express still crashes. On Visual Studio 2013 I can run two instances of two Web Applications withtout any problems
It should work if you set your solution to use multiple startup projects and add all the projects you need to debug
Really easy steps to follow here:
http://www.magnetismsolutions.com/blog/paulnieuwelaar/2015/04/07/debug-multiple-projects-at-the-same-time-in-visual-studio
Still not as easy as previous versions of visual studio
Maybe not a solution, but a workaround which I found - running two instances of Visual Studio 2015 allow to run two projects.

Object reference is not set to an instance of an object on creating windows phone app

When i tried to create a windows phone application on visual studio 2012 i get the error "Object reference is not set to an instance of an object". I searched on google and find that deleting the 'NuGet packet manager' will solve the issue. But after deleting the packet manager i got the same error. What should i do to create the app.?
it appears that your windows phone development kit along with your visual studio is messed up. Try running the Visual Studio setup again and choose repair your installation. Once done, try creating the windows app again.
Thanks
Reinstall your Windows phone SDK toolkit or repair it. If still your are getting same issue try to repair your visual studio 2012 from control panel.
Note: Please close your visual studio before repair.

Resources