Setting up Firefox build - firefox

I am getting this error in start shell MSCV 2015
ERROR: Cannot determine the location of the VS Common Tools folder

It looks like you're missing the build pre-requisites. At this time, it means you need to have installed Visual Studio Community 2015 Update 3 with C++ support. As the docs state:
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

Build fails for C++/CX project with v141 platform toolset in Visual Studio 2019

I have tried to switch to Visual Studio 2019 since it is now officially released, but I am having problems building a C++/CX based project.
I have not retargeted the project, but it is still configured to use the v141 platform toolset, i.e. Visual Studio 2017 Build Tools.
As far as I can tell, I have specifically installed the required build tools in Visual Studio 2019, which should be evident here:
Still, according to the project properties, Visual Studio 2017 Build Tools are not installed:
And when I build the project I get the following error:
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets(378,5): error MSB8020: The build tools for Visual Studio 2017 (Platform Toolset = 'v141') cannot be found. To build using the v141 build tools, please install Visual Studio 2017 build tools. Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Retarget solution".
Am I still missing some components in my installation, or is this a bug in Visual Studio 2019?
EDIT I should point out that I still have Visual Studio 2017 installed on the same computer as well.
I had a similar issue, but this is what I was missing.
You will find these options on the Workloads tab of the VS installer on the right under Installation details (i.e. not under Individual components).
It turns out that the (Windows Runtime Component) project was not properly set up. In the .vcxproj file the ApplicationTypeRevision element was missing, which is also "evident" (if you know what you are looking for...) from looking at the project properties above, where only the General configuration properties node is visible, and the Target Platform value is empty.
Inserting the following line in the .vcxproj file immediately following e.g. the WindowsTargetPlatformMinVersion element should do the trick:
<ApplicationTypeRevision>10.0</ApplicationTypeRevision>
Most likely, it was also necessary to add the C++ Universal Windows Platform Tools. The v142 version was made available when trying to create a new C++ Universal Windows Platform project. As far as I could tell, this component was not otherwise visible in the Visual Studio Installer? Once the v142 component was installed, the corresponding v141 component was also available for installation.
I had this same problem for Visual Studio 2017, even though V141 was explicitly shown as installed. It turned out the problem was that VCTargetsPath was set in System Environment Variables to "C:\Program Files (x86)\MSBuild\Microsoft.Cpp\V4.0\V140". Removing or unsetting this variable solved the issue.
I suspect this variable was set during an earlier install of Visual Studio 2015. Even after uninstalling all other Visual Studios the variable was never removed and the problem persisted.

Fresh installed Visual Studio 2017 won't create C++ project with error 0x80041fe2

I just installed Visual Studio 2017 (current time: August 2018). I only need C++ so I picked C++ component and deselected everything listed in "optional" items. Then after the installation, I cannot even create any C++ projects including both console and desktop projects. It gives me a error dialog of "Exception from hresult 0x80041fe2".
I did a search online. This question, visual studio and qt: HRESULT: 0x80041FE2, seems close but it's QT related, so it's different.
I did eventually find a solution. Will answer my own question below.
It turns out this is probably a Visual Studio installation bug. The "Optional" components are really not totally optional. I then picked the following Optional components and then it works:
Just-in-Time debugger
VC++ 2017 version 15.8 v14.15 latest v141 tools
C++ profiling tools
C++/CLI support
VC++ 2015.3 v14.00 (v140) toolset for desktop
Almost certainly not all of these are needed. But I don't want to spend time to find out which "Optional" is actually not optional...

Visual Studio 2017 Build Tools - Architecture and analysis tools

I'm encountering an issue when trying to build .modelproj projects using msbuild via Visual Studio 2017 Build Tools.
This is the error I see:
...[ProjectName].modelproj error MSB4057: The target "Rebuild" does
not exist in the project.
I have found this thread relating to some issues opening .modelproj files via the IDE in VS2017 - Visual Studio 2017 not opening .modelproj - however is there a way to get this fix onto just Build Tools rather than the full IDE? Ideally we'd like to avoid having to install the full IDE when all we require are the Build Tools on the server.
however is there a way to get this fix onto just Build Tools rather than the full IDE? Ideally we'd like to avoid having to install the full IDE when all we require are the Build Tools on the server.
You can not build Modeling projects using msbuild via Visual Studio 2017 Build Tools. Because starting with Visual Studio 2017, the UML Designers have been removed from Visual Studio, If you are a significant user of the UML designers, you can continue to use Visual Studio 2015 or earlier versions.
You can get the detail information from Port, Migrate, and Upgrade Visual Studio Projects and Microsoft Application Lifecycle Management:

Is there a way to just install part of visual studio 2013 to support msbuild and if yes which packages I need

I'm setting up a build server and I'm trying to install the minimum I can. I don't want to install all the visual studio 2013 express, How I can do that? also I'm assuming I need the vs2013 command line to support msbuild correct?
Thanks
Jp
If you don't have Visual Studio installed on your computer, you can
use Build Tools 2013 to build managed applications. The Visual Basic
and C# compilers are also included in this download. (In earlier
versions, these tools were included in the stand-alone .NET
Framework.)
Similarly, Microsoft Build Tools 2015 and 2015 Visual C++ Build Tools.

Compile Firefox add-on in Visual Studio 2012 [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Compiling a MFC app from Visual Studio 2010 to 2012 RC results in LNK2038
I am moving an XPCOM Firefox add-on project from Visual Studio 2010 to Visual Studio 2012. When I open up the project, Visual Studio asks if I want the project to use the latest C++ compiler. If I say no then I get this compile error:
Error 1 error MSB8020: The builds tools for Visual Studio 2010
(Platform Toolset = 'v100') cannot be found. To build using the v100
build tools, either click the Project menu or right-click the
solution, and then select "Update VC++ Projects...". Install Visual
Studio 2010 to build using the Visual Studio 2010 build
tools. C:\Program Files
(x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.Cpp.Platform.targets 42 5 FF
(Visual Studio 2010)
If I say yes then I get five of these compile errors for xpcomglue_s_nomozalloc.lib in the xulrunner-sdk\lib directory:
error LNK2038: mismatch detected for '_MSC_VER': value '1600' doesn't
match value '1700'
I cannot install Visual Studio 2010. I suppose I could compile Gecko myself, using Visual Studio 2012, although that seems like a lot of work and I'm not sure it will work. So please let me know the best way to compile my Firefox add-on in Visual Studio 2012.
When you are compiling binary XPCOM components you must use the same compiler as used to compile Firefox itself - otherwise the binary compatibility is just not given. Currently this means using Visual C++ 10, be it via the free Visual Studio Express 2010 or by some other means.
If the purpose of the XPCOM component is just to run some native code then you might consider compiling a regular DLL instead and calling it via js-ctypes, then you can use any compiler you like - no binary compatibility constrains (it is also generally recommendable since you no longer need to recompile for each Firefox release).

Resources