Visual Studio solution doesn't load after running CMake without errors - azerothcore

On Windows. CMake looks like it completed successfully and I could click Open Project, but Visual Studio couldn't load the solution.
Output from opening the project in Visual Studio 2019:
C:\ACBuild\deps\zlib\zlib.vcxproj : error : The application for the project is not installed.
Is zlib a dependency I missed?

So, I clicked "Open Project" and it worked the second time. Not sure what happened. Maybe some background process wasn't completed the first time.

Related

Visual Studio 2019--Exception from HRESULT 0x80041fe4

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

Visual Studio 2019 Doesn't seem to see that I have .NET Core 3.1 Installed (with SDK)

I just installed Visual Studio a few days ago and for some reason I can't create anything but a class.
When I go to create a new User Control the pop up window lets me do everything except for click the "Add" Button to close the window and create the control.
If I double-click the User Control selector to create automatically, it pops up an alert box that says I need to go to the installer to get the .NET Framework target libraries. But when I go to the project's properties I see that I am already targeting .NET Core 3.1 and the only other option I have to target is .NET Core 3.0.... I assume this is because I'm in a .NET Core WPF application but I have no idea why it won't let me create a new control. It won't let me create anything except for a new class.
What is going on here? How can I work around this bug?
I've faced your problem recently. most of the templates were not installed after installation.
something you have to do is Modify your installation.
open Visual Studio Installer and click on Modify then choose the features(.Net core,Asp.net, Desktop Application and etc) in order to re-install them.
keep it in mind that, if installer encounters any problem or missing dll. installation instantly will be completed that should not happen.
keep your eyes close to your installer process and make sure all packages are installed.
a successful installation MUST not have any warning otherwise there are packages not installed.
it's better to install packages one by one NOT totally. I mean if you want the Asp.Net Core feature then try to install it at first. then try to install another feature.
Actually, I was not able to install whole features in a single installation and I don't know why. in short, don't heavy your installation.
If the problem still exists then:
1. Close all open solutions
2. Run InstallCleanup.exe
C:\Program Files (x86)\Microsoft Visual Studio\Installer\resources\app\layout\InstallCleanup.exe
3. Remove all existing Visual Studio programs from Control Panel -> program features
4. Restart pc and re-install Visual Studio
5. Make sure you have connected to the network
6. Choose only one feature(Don't select all) to install + Visual Studio Editor
vs bug
Extensions don't work properly in VS 2019 and make it hang. it's may happen because the Extensions have to be updated to be compatible with vs 2019 or it's vs bug.

Visual Studio 2017 not installing packages for new projects

Recently installed Visual Studio 2017.
Usually, when you create a new project, you immediately fire it up and run the scaffolded code.
Unfortunately for me, the new project doesn't have the required packages making the build fail.
Also, objects in the code are marked as not recognized. This is also correct for javascript dependencies.
4 new projects of different types, same result. Didn't even change the code yet I can't build.
The light bulb icon doesn't even show the dependency. Visual Studio doesn't recognize it.
How come scaffolded code has missing references??
Please help.
Well, this was annoying...
Package restore was disabled.
Enabled it in Visual Studio's options and ran the project.
Packages appeared magically.
Tools > Nuget Package Manager > Package Manager Settings

Visual Studio error "Object reference not set to an instance of an object" after install of ASP.NET and Web Tools 2015

After installing the ASP.NET and Web Tools 2015 (RC1 update 1) I get the following error within ASP.NET MVC 4 projects when opening *.cshtml files:
Object reference not set to instance of an object
I get the same error message even if I start a new ASP.NET MVC 4 project and try to open a *.cshtml file there.
I'm using Visual Studio 2015
Maybe this helps:
Delete the contents from the following folders:
C:\Users\%userprofile%\AppData\Local\Microsoft\VisualStudio
C:\Users\%userprofile%\AppData\Local\Microsoft\VSCommon
Sometimes, you need to go to:
[x64] C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE
[x86] C:\Program Files\Microsoft Visual Studio 14.0\Common7\IDE
and run devenv /resetuserdata.
Expect, that all of your user settings such as Visual Studio layout, linked Microsoft account or start page might disappear.
Delete %LocalAppData%\Microsoft\VisualStudio\14.0\ComponentModelCache and restart Visual Studio.
Alternatively, use the Clear MEF Component Cache extension.
For me,
I ended the process in Windows Task Manager: VsHub.exe.
Restarted Visual Studio.
After that, everything works like a charm again!
I solved it doing
run devenv /resetuserdata
in this path:
[x64] C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE
I assume that in x86 it works in this path:
[x86] C:\Program Files\Microsoft Visual Studio 14.0\Common7\IDE
It's recommended to try any or all of the following:
Restart Visual Studio
Try Running As Administrator (right-click Visual Studio and choose "Run As Administrator")
Check for any updates for Visual Studio (download and install them if any are available)
Try opening a different solution / project
If problems persist, you might try the following options:
Restart your local machine
Attempt to reset Visual Studio to System Defaults (this can be done from the options within Visual Studio)
Attempt to repair your Visual Studio installation
In the hopes it might narrow things down/help someone, I did an investigatory approach. For me, I initially moved the folder at C:\Users\{user}\AppData\Local\Microsoft\VisualStudio to My Documents and allowed Visual Studio to re-create it by re-launching it. This removed the errors. So I moved everything back, one-by-one, and restarted Visual Studio each time until I discovered the culprits. These folders were fine to move back in:
1033 (overwrote the auto-generated copy with old)
Designer (was in my old copy, not initially re-created when I re-launched VS, copied it back in)
Extensions (overwrote the auto-generated copy with old)
ImageLibrary (overwrote the auto-generated copy with old)
Notifications (overwrote the auto-generated copy with old)
STemplate (was in my old copy, not initially re-created when I re-launched VS, copied it back in)
VTC (was in my old copy, not initially re-created when I re-launched VS, copied it back in)
These files were fine to move back in/overwrite the auto-generated ones:
ApplicationPrivateSettings (was in my old copy, not initially re-created when I re-launched VS)
ApplicationPrivateSettings.lock (overwrote the auto-generated copy with old)
vspdmc.lock (overwrote the auto-generated copy with old)
These files were fine to move back in. Each was in my old copy, and not initially re-created when I re-launched VS:
.NETFramework,Version=v4.0,Set=Framework,Hash=C958D412.dat
.NETFramework,Version=v4.0,Set=RecentAssemblies,Hash=0.dat
.NETFramework,Version=v4.5,Set=Extensions,Hash=75EAE334.dat
.NETFramework,Version=v4.5,Set=Extensions,Hash=497525A2.dat
.NETFramework,Version=v4.5,Set=Framework,Hash=5AE9A175.dat
.NETFramework,Version=v4.5.2,Set=Extensions,Hash=24CEEB0D.dat
.NETFramework,Version=v4.5.2,Set=Extensions,Hash=72AE305.dat
.NETFramework,Version=v4.5.2,Set=Extensions,Hash=ADF899D7.dat
.NETFramework,Version=v4.5.2,Set=Framework,Hash=D8E943A2.dat
These caused problems - delete these files and re-launch VS to allow it to re-create them:
ComponentModelCache - When I overwrote this folder's contents with my old ones (4 files: MS.VS.Default.cache, .catalogs, .err, .external), this gave me all of the errors I had gotten before about not being able to load packages when loading my project, and the "object reference not set to an instance of an object" error when trying to close VS.
devenv.exe.config - same as ComponentModelCache
.NETFramework,Version=v4.0,Set=Extensions,Hash=6D09DECC.dat - causes error output from the JavaScript Language Service, complaining of missing js files
.NETFramework,Version=v4.0,Set=Extensions,Hash=9951BC03.dat - causes error output from the JavaScript Language Service, complaining of missing js files
.NETFramework,Version=v4.5.2,Set=RecentAssemblies,Hash=0.dat - causes error output from the JavaScript Language Service, complaining of missing js files
These are the errors from those last .NETFramework files (which I do not get if I do not add them back in):
01:10:11.7550: Referenced file 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\JavaScript\References\libhelp.js' not found.
01:10:11.7550: Referenced file 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\JavaScript\References\sitetypesWeb.js' not found.
01:10:11.7550: Referenced file 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\JavaScript\References\domWeb.js' not found.
01:10:11.7550: Referenced file 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\JavaScript\References\underscorefilter.js' not found.
01:10:11.7550: Referenced file 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\JavaScript\References\showPlainComments.js' not found.
I might just need to re-install/repair the JavaScript Language Service plug-in, so it might be un-related. But definitely devenv.exe.config and ComponentModelCache need to go to correct the "object reference not set to an instance of an object" error.
For me, ASP.NET 5 is not yet required, I removed update, and then reinstalled ASP.NET 4.5. It's a bit tricky:
Removed from control panel "Microsoft ASP.NET 5 RC1 Update1". After that, you will no longer open ASP.NET MVC projects
Then I changed the installation of "Microsoft Visual Studio Professional 2015", clicked "Modify", and selected "Microsoft Web Developer Tools"
No longer follow the notification of update in Visual Studio 2015!!!
After trying the top answer, I found that you must also restart the computer. The error may be part of a git issue as well where restarting your computer will reset.
I was getting an exception every time I tried to create a "new" project.
My solution was:
Go menu Tools → Extensions and Updates
Check the "Updates" link... There was an update to Microsoft ASP.NET and Web Tools. Install it.
That fixed it for me.
In my case (not necessarily be the solution for you, but it may be helpful for someone), the solution was:
Go menu Tools → Extensions and Updates
Select the Online tab from the right panel
Search for the words web tools, and then select Microsoft ASP.NET and Web Tools and install it.
In my case, this was missing from my computer because of a lot of repairing operations for Visual Studio.
I was getting similar error in VS2017 while trying to publish my solution to Azure.
This algorithm helped me to resolve it:
Close VS2017
Open C:\Users{your user name}\AppData\Local\Microsoft\VisualStudio\ folder
Rename 15.0_08edcd83 folder
Start VS
Publish works fine!
Note that this will remove your Visual Studio's recent files / projects from it's history and also linking to MS account.
This method is slightly different from the Top answer. Here you don't have to delete other folders except renaming abovementioned one.
I was getting this exception every time I created a "new" project.
My solution was:
Go menu Tools ? Extensions and Updates
Not check the "Updates" link...search "asp.net". There was an
update to Microsoft ASP.NET and Web Tools. Get it as
AspNetWebFrameworksTools2015_KB3137909.exe and install it.
That fixed it for me.
Unfortunately, I ran into another exception:
"Exception has been thrown by the target of an invocation"
I disabled the FIPS setting Enabled DWORD value to zero.
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\FipsAlgorithmPolicy]
Enabled=dword:00000000 And All fixed.
Goto windows+R and type %temp% and hit enter. delete the temp folder and files and then try opening the same
I have been fighting with this during the whole weekend. But it's pretty easy to do it. What I did was to click on repair rather than uninstall. After repairing, I clicked on restart directly. After that, everything is working perfectly.
You should try this, may be it can work also for you!!!
Restarting Visual Studio did it for me. On the next run, it displayed a "Scanning new and updated MEF components ..." and then it executed normally.
It seems to be related to Windows update somehow, although I don't have proof.
Delete bin and obj folders in all projects of that solution.
Seems like those folders were having old files generated by some older version of visual studio, which are not compatible with new version of visual studio.
The solution to the issue when i had this earlier today was that there was an additional
set of tags bolted on the end of my Web.config. Once removed the functionality returned.
Problem:
My VS 2015 was throwing up error after I installed SSDT. Whenever I clicked on Tools >> Extensions and Update it was throwing "Object reference not set to an instance of an object" error. When I tried to open a solution it threw some provider not set correctly.
Solution:
After many hours of research trying out all the solutions previously mentioned by others didn't solve my problem. Every time the error popup was pointing to check the ActivityLog.xml. But I was ignoring it. After hours of frustration I decided to read the error carefully and looked into ActivitLog.xml and found that it was looking for "Could not load file or assembly 'System.Collections.Immutable, Version=1.1.37.0". So I just started searching for this assembly and stumbled upon this link https://sergeytihon.com/2015/12/01/how-to-restore-viual-studio-2015-after-update-1-dependency-dance/
and followed the steps there, which fixed my issue.
Went into %LOCALAPPDATA%/Local\Microsoft\VisualStudio\14.0\devenv.exe.config and searched for "System.Collections.Immutable" and change newVersion from 1.1.36.0 to 1.1.37.0
Final config should look like this
<dependentAssembly>
<assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="1.0.27.0-1.1.65535.65535" newVersion="1.1.37.0"/>
</dependentAssembly>

Why does running IncrediBuild from the command line on my Qt app never halt?

I use Visual Studio 2013 with IncrediBuild to compile Qt apps. Through the IDE everything works fine, but when running on the command line, BuildConsole never returns.
Process that are running:
BuildConsole.exe
cmd.exe
devenv.com
devenv.exe
MSBuild.exe
Turns out, the qt5appwrapper step was the piece that was never finishing.
I could see this by opening up IncrediBuild's Build Monitor window and seeing that that portion was just going and going and going...
Uninstalling the Qt Add-in 1.2.4 fixed the problem.
This is done by running Qt5VSAddin\uninst.exe. I found it in my start menu under Qt5 Visual Studio Add-in (not from inside Visual Studio).

Resources