ERROR: Unrecoverable build error - 0x8007000B - VS2022 Winforms Project C# - c#

I tried this ways in two differents computers Win10:
Registering MergeMod and Ole32(with Admin Privileges)
Delete project setup and create again
Reinstalling VS Installer Projects 2022
Updating & Restarting the computer
It's the same, I have hours with this problem.
I create a project with VS2019 with a copy/paste of the files and works!
but with VS2022 failed
If anyone has the same situation with VS2022 and could solve, I'd love to hear about it!
Thanks!

0x8007000B is ERROR_BAD_FORMAT and most likely occurs when you are mismatching 32-bit and 64-bit binaries. You're likely incorrectly registering a 32-bit DLL but trying to run it in a 64-bit exe (or the reverse situation could possibly be true too.)
If this is a plug-in to Visual Studio, please note that the Visual Studio IDE itself is now a 64-bit process, as of Visual Studio 2022, so your old 32-bit plug-ins may not work with the new 64-bit Visual Studio without being rebuilt to be compatible with a 64-bit host process.

Related

Where to find MSBuild 14.0 x64

I'm setting up a script that builds my C# solution from command-line. It works fine, but currently it runs MSBuild as 32-bit application and I want it to be ran as 64-bit.
Maybe I'm missing something obvious, but I can't find how to run MSBuild as 64-bit executable.
First I tried to use C:\Windows\Microsoft.NET\Framework64\v4.0.30319\MSBuild.exe, but this is wrong version.
So I found C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe which is version 14.0 (now I have both Visual Studio 2015 and Microsoft Build Tools 2015 installed), but it runs as 32-bit application (or I'm missing something)?
I expected to see some .exe in C:\Program Files where other 64-bit exes are stored, but nothing there.
My machine is 64-bit Quad Intel Xeon.
Maybe before calling MSBuild I should call some cmd-file to setup environment properly? Like vcvarsqueryregistry.bat?
Well, yes it was like in VS 2012 and VS 2013 in amd64 subfolder:
C:\Program Files (x86)\MSBuild\14.0\Bin\amd64\MSBuild.exe

Installation failed while trying to install Visual Studio 2015 community edition [duplicate]

This question already has answers here:
Multiple Errors Installing Visual Studio 2015 Community Edition
(23 answers)
Closed 6 years ago.
I was trying to install visual studio 2015 community edition on my system using the downloaded ISO file. There occurred an error showing the installation failed. The error was like:
team explorer for visual studio 2015
fatal error during installation
I have compared the SHA-1 hash value of my downloaded iso file with one provided at microsoft site. They are correct and matching. I have tried all possibilities including reinstall, repair etc. Still not working.
PS: I have already installed visual studio 2008 on my system and its working properly.
Answer from another question asked on stackoverflow, source:
Multiple Errors Installing Visual Studio 2015 Community Edition
I spent a whole week trying to solve this issue.
What finally did it for me was disabling my anti-virus programs.
Before I stumbled upon my solution, I went through a lot of other solutions. I
thought, I'd post some of the solutions that might prove to be useful for those who are still having trouble with installing Visual Studios 2015 Community Edition.
Solution 1: Minimal Installation
Try installing with minimal extra features. Run the Visual Studios 2015 installation, then click "Custom" and on the following screen, uncheck everything and proceed with the installation.
Solution 2: Delete installation cache
Perhaps the installation failed due to corrupt files in the cache. When installation fails, remove all Visual Studio cache related items and do a full re-installation. To do this, run command prompt (Run as Administrator) and type: "cd /programdata/package cache/" then press enter. Then type "del /f /s *.msi /f /s *.cab" then press enter.
Now run the Visual Studios 2015 installation again.
Solution 3: Delete temporary file data stored on your computer
Open up File Explorer and go to "C:\Users\[Your User Account Name]\AppData\Local\Microsoft". Then delete the following folders: VSCommon, VisualStudio, Blend, VsGraphics, ApplicationInsights, vshub, Team Foundation, Web Platform Installer and MsBuild. After this, run the Visual Studios 2015 Installer again.
Solution 4: Enable all four evaluations of Symbolic links
First, check to see if all four evaluations are enabled. Open up command prompt (Run as Administrator) and type "fsutil behavior query SymlinkEvaluation". All 4 evaluations should be enabled. If they aren't then type "fsutil behavior set SymlinkEvaluation L2L:1 R2R:1 L2R:1 R2L:1". Once those 4 evaluations are set, clear up temporary files and clear installation cache (see Solution 2 and Solution 3) then run the Visual Studios 2015 installation again.
Solution 5: Repair the Redistributables
Perhaps, the problem is that your VC-redistributables are faulty and are in need of repair. To do so, run "Add/Remove programs" and look for all the x86 and x64 versions of Microsoft Visual C++ [Year] Redistributable (Version). Then press Change for each of them and when the uninstallation screen pops up, press Repair. I did it for all the versions I had previously installed: 2012, 2013 and 2015. Therefore, I repaired 6 of them: 2012: x86 and x64, 2013: x86 and x64, 2015: x86 and x64.
Solution 6: Check to see if x86 and x64 sizes are the same
As mentioned by others in this discussion, do a search for vcruntime140.dll and see if the x86 and x64 versions. They should NOT have the same size. If they do, see solution 5 or you can manually delete them (** Be cautious when deleting files from the Windows folder!) and re-install them (from here: https://www.microsoft.com/en-ca/download/details.aspx?id=48145). Also do the same check for msvcp140.dll. I personally did a search for these files in "C:\Windows\SysWOW64 and C:\Windows\System32" and compared the files from the two folders. Moreover I also checked for differences of vcruntime140.dll and msvcp140.dll in "C:\Program Files\Microsoft Visual Studio 14.0" and "C:\Program Files (x86)\Microsoft Visual Studio 14.0"
Solution 7: Temporarily disable all Anti-Virus Protection and Firewalls
For me, it turned out that the problem stemmed from having ByteFence Anti-Malware and Norton Security with Backup protection. I disabled real-time protection from ByteFence Anti-Malware and I disabled Auto-Protect and Smart Firewall from Norton Security with Backup. Before I ran the installation again, I repeated Solution 2 and Solution 3 (scroll up). And Voila, installation was successful. But how did I find out that the Anti-Virus Program was the culprit? Read Solution 8.
Solution 8: Carefully monitor Visual Studios Installation Process for Intrusions
I resorted to this solution in order to find out the problem. After reading Ezh's article, I decided to download Process Monitor v3.2 and Process Explorer v16.1. I was carefully monitoring 3 programs side-by-side: Process Monitor, Process Explorer and the Visual Studios 2015 Installer, and I watched very closely all the processes that the installer was invoking. Then I noticed that when VSIXInstaller.exe process came on and attempted to install something from a remote server, it kept failing over and over again because my Anti-Virus Program would suddenly appear on screen (as a process) and decide to hog/block some important DLL files that VSIX installation needed. Temporarily disabling the anti-virus program solved my issue!
Solution 9: Complete Windows format and re-installation
If all else fails, and you are really desperate to get Visual Studios 2015 working, I suggest a complete Windows re-installation. At this point, the problem is most likely some type of interference/intrusion with a program which you do not know of.
After a tough day of reinstalling and uninstalling of VS2015 again and again (both Professional and Enterprise, both with updates and without) on Windows 10 nothing seemed to help. Finally this approach worked:
Uninstall the crashing version of VS2015 completely
Uninstall C++ 2015 Redistributables - both x64 and x86 version
Restart the computer
Manually delete remaining dlls from both system32 and SysWOW64 system folders (their names end with *140.dll - but be careful and do a backup!)
Download "Microsoft Visual C++ 2015 Redistributable Update 3" from here - https://www.microsoft.com/en-us/download/confirmation.aspx?id=53840 - both x64 and x86 version
Install the "Microsoft Visual C++ 2015 Redistributable Update 3" - both x64 and x86 version
Restart the computer if needed
And finally - Install the VS 2015
Working!
I 've tried all the workarounds that are in "Mai Benanami" answer without success and what finally do the trick was to uninstall all visual studios and all Microsoft Visual C++ XXX Redistributable x86 and x64 versions.
Then, run the Visual Stuido installer again.
Hope it helps!

ClickOnce Installer Prerequisites: How to auto-detect required version of Visual C++ Runtime

I have written a C# application that requires the Visual C++ 2010 redistributable to be installed, and I'm using the built-in "Publish" mechanism in Visual Studio to distribute the app -- which uses Microsoft's "ClickOnce" installer technology.
I discovered that I needed to click on the "Prerequisites" button on the Publish page, but there lies a problem.
Not knowing whether a user is x86 or 64-bit, I have to check box the x86 and x64 versions of the redistributable.
But if an x86 user installs it, they get an error: "Prerequisite check for system component Visual C++ 2010 Runtime Libraries (x64) failed with the following error message: "Installation of Visual C++ 2010 Runtime Libraries (x64) is supported only on x64 machines."
But if I don't include the x64 version, then 64-bit users can't user the installer.
Another issue is that some users get the error "A newer version of Microsoft Visual C++ 2010 Redistributable has been detected on the machine", and the installer fails.
This whole thing seems like a big mess. Isn't the ClickOnce installer tech smart enough to figure out whether the user needs the x86 or 64-bit version of the C++ redistributable? And if a newer version is installed, is that really a show stopper?
This all seems very brittle and it seems as though there should be a very simple fix for it.
ClickOnce is the actual deployment of the application, not the bootstrapper. Publishing a ClickOnce application will create a setup.exe that is a bootstrapper that installs the prerequisites for you. Your problem is with the prerequisite.
You can use the bootstrapper manifest generator (or notepad) to create the XML package information needed to make the C++ redistributable into a prerequisite package that you can select from the Visual Studio/Publish/Prerequisites dialog. I recommend you set up the prerequisite this way, and look at some of the other packages in the Bootstrapper folder (like SQLExpress) to see how they have done this.

When creating a WCF project in VS2010, I get "Error : WcfProject.csproj cannot be opened. The project type is not supported by this installation"

hey there. So, we have a VS2010 project and the VisualSVN server on one machine. We added a new machine with the client visual svn and the projected loaded in. except for the WCF service. i'm getting a...
" error : the project file c:/..../wcfProject.csproj cannot be opened.
The project type is not supported by this installation."
i've checked the directory, the files and file structure are there and the same as the main development machine. any tips/solutions?
thanks
David K.
I had a similar problem with some WCF solution which I downloaded from a blog.
The solutions of running deveng with the switches did not resolve my issues. After some more searching it turned out that the following clue in the answer of Ralph Willgoss lead to the solution of my problem:
I resolved it by installing the Visual Web Developer.
I also had to (manually) install the Web Platform Installer to (automatically) download the last requirements for the project to properly load.
I had a similar problem when trying to create a new project of the following types:
WCF Service Application
WCF Work Flow Service Application
Syndication Service Library
I was using Windows 7 Ultimate 64bit, with no other versions of Visual Studio installed.
I also had tried many other options, such as:
devenv /resetsettings
devenv /resetskippkgs
ensuring I had C++ option of VS2010 installed
VS2010 Service Pack 1
I resolved it by installing the Visual Web Developer.
There are a few things this could be so I can't give you one specific answer. However, here are a few things to try on your machine that is throwing the error:
First, verify which version of Visual Studio is set as the default for opening csproj files. It could be that you installed SQL or something else that uses an older version of Visual Studio. Sometimes that can give an error. Even if the default is the Visual Studio version selector I've seen it throw an error. Open up the correct version of Visual Studio (through the Programs menu) and then inside Visual Studio try to open the package. If that works, you know the issue is with which version is opening the file.
If that doesn't work, you could try resetting the Visual Studio settings. From the run menu type devenv /setup This should reset the Visual Studio environment and hopefully it will fix the issue. If this does not work, try running devenv /ResetSkipPkgs from the Run menu. This will try to load any packages that Visual Studio previously skipped.
If these steps don't work, let us know. Give us any further error messages that come up after attempting these steps.

Visual Studio registry capture utility has stopped working, error compiling C# project in Windows7

Visual Studio registry capture utility has stopped working.... http://easycaptures.com/fs/uploaded/256/9376236710.png
Windows 7 Shows build error like below everytime I compile my project.
From Microsoft Connect:
Locate regcap.exe here: C:\Program Files\Microsoft Visual Studio 9.0\Common7\Tools\Deployment
Right click and select properties.
Select Compatibility tab
Check box to Run this program in compatibility mode.
Select Windows Vista SP2 in the OS drop-down and Run as Administrator.
Click Ok and Recompile.
This solution also works on Windows 7 with Visual Studio 2008 (32 bit version), where in the 5th step, you just need to select the check box in the last group box "Privilege Level" for "Run this program as an administrator"
Another reason From Add-In-Express:
Long paths (a buffer overflow?). This was my case: I had *.tlb in a setup project with a long path, I excluded it and it compiled ok.
I ran into this build an MSI project using VS 2008 on Windows 7 64 bit. The problem was that an assembly that reference Microsoft.InteropFormTools.tlb and had to be callable from VB 6 through COM. Visual Studio defaulted the type library's Registry property to vsdrfCOMSelfReg. Changing it to vsdrfDoNotRegister solved the problem.
TIP: Pay attention to the Output window during the Build/Rebuild processing. I saw the following warning after I closed RegCap program:
Note: Unable to create registration information for file named 'Microsoft.InteropFormTools.tlb'
In case anyone is running into this issue with Visual Studio 2015, the path for regcap is now C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\VSI\bin.
I also encountered this error when I tried to add a class to my project that had previously been compiled as an external DLL that was added as a reference. I added the class to the project, but forgot to remove the reference to the DLL. Removing the reference to the external component resolved the problem and this error message no longer occurred.
If your project doesn't require to build in 64bit , you can build it in 32 bit instead.
This works in my case. I build my project VS 2008 and Windows 7-64 bit and have the same error message. I then try to build again in 32-bit and run Visual Studio in Compatibility mode and it works.
Run Visual Studio in Compatibility mode for Windows XP:
Right click Visual studio icon
Select Properties
In Compatibility tab, check on Run this program in compatibility mode for Windows
XP SP3 and check on Run this program as administrator
Go to Configuration manager and Debug your project in X86 mode

Categories

Resources