Trying to build Mozilla got this error when trying to open start-shell-msvc2015 - batch-file

I am trying to build Mozilla on Windows 7 64bit
I tried to run this start-shell-msvc2015.bat but got this error.
MozillaBuild Install Directory: C:\mozilla-build\
Visual C++ 2015 Directory: C:\Program Files (x86)\Microsoft Visual Studio 14.0\V
C\
Windows SDK Directory: C:\Program Files (x86)\Windows Kits\8.1\
Unable to call a suitable vcvars script. Exiting.
Press any key to continue . . .
I did everything according to their instructions

When in doubt, search Google for the error message. From the first result:
Hallvord R. M. Steen:
To anybody else who might have this problem: it's caused by choices made during installation, and the installer options were somewhat confusing. I don't remember the exact details, but I think the "Default" installation no longer gives you the required scripts - the "Default vs custom" section on https://msdn.microsoft.com/en-us/library/e2h7fzkw%28v=vs.140%29.aspx seems to confirm that you need to choose "Custom" during install and enable Visual C++ tools specifically.
Andrew Overholt: You're right, Hallvord. I went back to my VS2015 installation .exe download, clicked "Modify [the existing installation]" and picked "Common Tools for Visual C++ 2015" under "Programming Languages" > "Visual C++".
Also you'll need at least update 3 if you're using the VS2015 Community Edition. From that Mozilla dev docs page:
Once you’re up to date, download and install Visual Studio Community 2015 Update 3 from Microsoft. If you have an earlier version of Visual Studio, you'll need to upgrade; Firefox relies on C++ features that aren't supported in older versions of Visual Studio. Do not accept the default configuration. Instead, select **Programming Languages > Visual C++ > Common Tools for Visual C++ 2015.*
See also this question on Super User.
Furthermore, the MDN docs actually were updated with this info after that report, and indeed the current build instructions contain, in bold:
Be sure to install the "Common Tools for Visual C++ 2015", which requires a customized installation in Visual Studio 2015.
In the prerequisites section.
Also you'll need at least update 3 if you're using the VS2015 Community Edition. From that Mozilla dev docs page:
Once you’re up to date, download and install Visual Studio Community 2015 Update 3 from Microsoft. If you have an earlier version of Visual Studio, you'll need to upgrade; Firefox relies on C++ features that aren't supported in older versions of Visual Studio. Do not accept the default configuration. Instead, select Programming Languages > Visual C++ > Common Tools for Visual C++ 2015.

Related

.vdproj is incomatible in VS 2019 - Community Edition - and reload project give load error

I'm unable to run a .vdproj in Visual Studio 2019 Community Edition. I tried the below link which hasn't worked either
Visual Studio - vdproj is incompatible
The project shows incompatible and after installing the Installer Project as Extension given in the above link , the project load is failing. Unable to proceed. Please help
This is redundant question.
Please follow this link for the answer:
Visual Studio - vdproj is incompatible
Or follow these Steps which is also taken from that link:
Go to Extensions > Manage Extension
Select Online > Visual Studio Marketplace
Search for Microsoft Visual Studio Installer Projects
Download the package
Close the Visual Studio to start the installation.
Follow the instructions to install the extension.
Once installation is completed. Launch again the Visual Studio.
In the Solution Explorer, look for the .vdproj project
Right click .vdproj project, click Reload
If all of the mentioned remedies not help, there is another possibility, which was the case here in VS2019 Community.
Installed extensions can not only be uninstalled, but also be disabled. In that case it looks like so:
The "Disable" and "Uninstall" buttons show up after a right-click on the corresponding object.
In my case and to my big astonishment, the Installer Project was disabled (showing "Enable" in the button), whoever did it.
It cost me about 2 hours to find out, some restarts of VS2019 and wondering about useless instructions about having to install the extension. After enabling, everything worked like before. Sigh of relief.
After doing lot of research on this topic, Visual Studio 2019 Community edition , is not supporting these kind of projects. Older versions like 2015 , 2010 supports.
Or convert these projects into a console application and run it for local setup and debugging.

How to program kernel drivers for windows without visual studio?

Everytime I see a driver tutorial I see they use visual studio, I was just wondering if it is absolutely required to install it in order to develop windows drivers?
Say for example I would like to compile the following driver: (source)
NTSTATUS DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath)
{
DbgPrint("Hello World\n");
return STATUS_SUCCESS;
}
How would I be able to compile/link it without visual studio? I have searched all over the place.
The linked tutorials are based on older WDK builds. You can get the old WDK and follow the tutorial, but I don't really recommend it.
Recently, the common way to develop Windows drivers is to use Visual Studio, but there is also a similar approach to the tutorial, which is developed from the command line environment.
https://learn.microsoft.com/en-us/windows-hardware/drivers/develop/using-the-enterprise-wdk
Of course, you don't have to install Visual Studio as using EWDK.
If you would like to use a different IDE then you must use the Enterprise Windows Driver Kit (EWDK) https://learn.microsoft.com/en-us/windows-hardware/drivers/develop/using-the-enterprise-wdk
After downloading and unzipping the archive you will need to launch LaunchBuildEnv.cmd and then run MsBuild.
Example:
Msbuild my_driver_project.vcxproj /p:configuration=debug /p:platform=x64
This assumes that you will write your own vcxproj file. Details about the file format here: https://learn.microsoft.com/en-us/cpp/build/reference/vcxproj-file-structure?view=vs-2019 and you could look at some driver samples from Microsoft here: https://github.com/microsoft/Windows-driver-samples
If you are just starting out with Windows Drivers I would say that using Visual Studio and WDK is a good idea because you can concentrate more on core Driver Development concepts and after you have something working you can write your own vcxproj file and use the eWDK. Having some examples of vcxproj files is useful.
If you do go down the Visual Studio route you can use Visual Studio Community edition which is free for non-commercial use.
It is important to install Visual Studio prior to WDK because the WDK is essentially a plugin to Visual Studio.
Additional instructions and download links for Visual Studio and WDK https://learn.microsoft.com/en-us/windows-hardware/drivers/download-the-wdk

How to compile zlib into a DLL on Visual Studio 2017?

I have a hard time trying to do something I think is really simple (I must not be the first one to want to do that). I use Visual Studio 2017 on Windows 7 to do some C code, and I need inflate/deflate for zip.
I search a little, and I found zlib. It seem to be exactly what I search: free, cool copyright, no patent and extensively used and tested in other project.
So, I start to download the latest version (zip of 1.2.11) and here I go, trying to "simply" get the DLL.
However, the documentation state that in order to compile "zlib1.dll", I have to use "./contrib/vstudio/vc..", with ".." the right Visual Studio. But I have Visual Studio 2017 and there are only "vc9" to "vc14", "vc14" being Visual Studio 2015.
The doc say that I have to use Microsoft Visual C++ 2015, and indeed, when I force open with vs2017, I have integrity error.
So I try to install MVC++ 2015, but then it say that I can't install it because I already have something (VS2017) installed.
Is there really no way to achieve something so basic, or there is knowledge that I don't know?
Open source projects can be a challenge to build as their support tends to lag well behind the latest versions of Visual Studio. This is one reason why Visual Studio now supports cmake directly.
That said, the easiest way to build zlib for Windows is just use a NuGet package. I personally use zlib-msvc14-x86 or zlib-msvc14-x64 which are binary compatible with VS 2015 Update 3, VS 2017, and VS 2019. They also provide a static library instead of a DLL.

SQL Server Management Studio 17 cannot find one or more components

I have just upgraded to Visual Studio 2017 Professional and SSMS 17.
I can access my servers and databases through Visual Studio 17's SQL Server Object Explorer but when I try to execute SSMS outside of the VS IDE it tells me "Cannot find one or more components.  Please reinstall the application".  I have reinstalled SSMS 17 twice and still cannot run it.
The SSMS executable is at:
C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio\Ssms.exe.
I get the same problem on another machine running VS 2017 Community.
What is causing the message "Cannot find one or more components.  Please reinstall the application" when I try to execute SSMS outside of Visual Studio? What do I need to do to execute SSMS outside of the VS IDE?
I had similar problem and in my case it was due to a corrupt Microsoft Visual Studio 2015 Shell (Isolated) which SSMS 17 requires to run outside the VS IDE.
To fix this, I had to do the following:
Uninstall Microsoft Visual C++ 2017 Redistributable (both the x64 and x86). This is to ensure that step (2) will succeed as the repair process of the prerequisites might fail in some cases if newer versions have been installed.
Repair Microsoft Visual Studio 2015 Shell (Isolated) (or reinstall using https://download.microsoft.com/download/C/9/C/C9CA8400-20AA-4488-92A3-F3F6D978AD81/vs_isoshell.exe).
Reinstall Microsoft Visual C++ 2017 Redistributable (https://go.microsoft.com/fwlink/?LinkId=746572 and https://go.microsoft.com/fwlink/?LinkId=746571) if removed earlier.
Here is a quick fix for cannot find one or more components in SQL Server
Follow these steps:
Run Add or remove programs (Type into run box)
Repair Microsoft Visual Studio 2015 Shell (Isolated) (Modify > Repair)
The installation process will report that it was unable to install some of the Visual C++ executables as they are already present; this message can be ignored, the repair still fixes the problem reported in the question.
For SSMS 2017 delete this folder from the registry:
HKEY_CURRENT_USER\Software\Microsoft\SQL Server Management Studio\14.0_Config
It would be better to export the keys before deleting them.
Same steps as Roberto's solution above - but updated links:
1. Uninstall:
Microsoft Visual C++ 2015-2019 Redistributable (x86) - 14.xxxx
Microsoft Visual C++ 2015-2019 Redistributable (x64) - 14.xxxx
2. Repair or Download/Install:
Microsoft Visual Studio 2015 Shell (Isolated)
https://visualstudio.microsoft.com/vs/older-downloads/isolated-shell/
3. Reinstall:
Microsoft Visual C++ 2015-2019 Redistributable (x86) - 14.xxxx
https://aka.ms/vs/16/release/vc_redist.x86.exe
Microsoft Visual C++ 2015-2019 Redistributable (x64) - 14.xxxx
https://aka.ms/vs/16/release/vc_redist.x64.exe
For everyone that is coming here in 2022 and has Windows 11 (build 22622.440) installed, this is your reason> Missing components for Microsoft Visual Studio 2017 Shell (isolated)
Disable the sv2 nav pane from experimental features from windows!
Download https://github.com/thebookisclosed/ViVe
Run vive tool from elevated cmd with the option to disable the experimental feature:
vivetool /disable /name:SV2Navpane
Restart windows immeadiatly:
shutdown -r -t 0
Taken from here, thanks to #Erin Stellato: https://feedback.azure.com/d365community/idea/6b7d06dc-9bec-ec11-a81b-6045bd7ac9f9
In my case, I accidentally uninstall Microsoft Visual Studio 2015 Shell (Isolated) and I got the error "SQL Server Management Studio 17 cannot find one or more components". even though I recover or Repair Microsoft Visual Studio 2015 Shell (Isolated), the same error was there.
The only thing I did was reinstall Microsoft Visual Studio 2015 Shell (Isolated). I did not Uninstall Microsoft Visual C++ 2017 Redistributable (both the x64 and x86).
this worked for me.
I'm running SSMS 18 and every time KB5014770 installs, I get this error. If I uninstall this upgrade (KB5014770) it starts working again.
Remove every version installed of visual C++, then run the repair on the Visual Studio 2015 Shell (isolated). Once completed, open the SQL Server Management Studio and it will work.
In my case, it was corrupted because the drive that it was installed on originally was removed as part of a drive consolidation exercise. That is to say, it was installed on E:\ but E:\ no longer existed.
I managed to resolve by using VSubst (https://www.ntwind.com/software/utilities/visual-subst.html) and creating a fake drive pointing back to C:\ (run as admin) where there was a "fresh" install of 2015 after downloading the VS 2015 ISO.
I then re-ran the uninstaller, which fails, then inside the log file, on the first line is the path to the "old installer". Now if you run a {PathInLog}\vs_isoshell.exe /uninstall /force with the E:\ created it will force uninstall.
I had same issue and solved very easily. Normally SSMS will look for integrated application. This integrated is installed by default during SSMS setup installation.
I can say your error "Cannot find one or more components. Please reinstall the application" caused because some application is uninstalled or missing by anyhow. To open SSMS will look for some connected integrated application.
Please follow these steps:
search "shell" in Control Panel\Programs\Programs and Features
uninstall any "shell" application
Download from Microsoft below application.
"en_visual_studio_2015_shell_isolated_x86_dvd_XXXXXXXX"
Run the application and allow all application to install during the process.
Once everything is done. Restart your system.

silverlight4 tools for visual studio 2010 fails with the following error... HELP!

I am trying to migrate my silverlight applications from version 3 to version 4. I've been running into this problem. when i try to install silverlight4 tools for visual studio 2010
Visual Studio 2010 or Visual Web Developer Express 2010 or Visual Phone Developer Express 2010 that matches the language version of Silverlight Tools 4 must be installed before installation of Silverlight Tools can continue. Silverlight Tools is available in other languages at http://go.microsoft.com/fwlink/?LinkId=177432.
I have installed
microsoft visual studio 2010 professional
version 10.0.30319.1.RTMRel
Microsoft .net framework
version 4.0.30319 RTMRel
please help!!!!!
Silverlight tools 4 is available in English, French, German and Japanese. You need to have downloaded the correct language version of the Silverlight Tools (note the language combobox).
If your version of Studio is installed for another language then you could try installing the English Visual Web Developer Express 2010 (it should install fine side-by-side with your standard product) then installing the Tools. I'm not sure that will get you completely to where you'd want to be as far as templates are concerned but it should get you going.
How to determine what failed
If you use the Web Platform Installer to install, it tells you in the log file what happened.
IronSpigot::Main::LogPackageNameAndVersion(): Package Name = Silverlight 4 Tools for Visual Studio 2010
IronSpigot::Main::LogPackageNameAndVersion(): Package Version = 10.0.30319 1033
It will compare these against the values in the following two registry keys:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\10.0\Setup\VS\BuildNumber\1033
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0\General\UILanguage
If you have VS.NET 2010 SP1 for en-us, the first will contain '10.0.40219' and the second 1033.
The setup confusingly reports this as a language issue, but if you read carefully it is a language and version issue.
Here's how to work around the version check:
Using regedit, change the first key to 10.0.30319. Run the setup.
Using regedit, change the first key back to 10.0.40219
I recommend reapplying SP1 to be safe, but I'm not sure if it is required.
This other answer has a longer solution which is to uninstall SP1, install the tools, then reinstall SP1.
coudn't find the soulution.
however my issue resolved when i installed the same build version of Visual Studio Premium version.

Resources