Ask me anything!

Have a question you always wanted to ask Moonchild but never did? Now's your chance!
From 2026-03-08 to 2026-03-15 I'll be open to any question by the community, after which I'll provide answers.

Go here to participate: https://forum.palemoon.org/viewtopic.php?f=66&t=33222

Visual Studio 2026

Talk about code development, features, specific bugs, enhancements, patches, and similar things.
Forum rules
Please keep everything here strictly on-topic.
This board is meant for Pale Moon source code development related subjects only like code snippets, patches, specific bugs, git, the repositories, etc.

This is not for tech support! Please do not post tech support questions in the "Development" board!
Please make sure not to use this board for support questions. Please post issues with specific websites, extensions, etc. in the relevant boards for those topics.

Please keep things on-topic as this forum will be used for reference for Pale Moon development. Expect topics that aren't relevant as such to be moved or deleted.
User avatar
UCyborg
Keeps coming back
Keeps coming back
Posts: 774
Joined: 2019-01-10, 09:37
Location: Slovenia

Re: Visual Studio 2026

Post by UCyborg » 2026-02-04, 12:16

Older build tools from VS 2022 are still available, so presumably you can use VS 2026 and compile Win7 compatible binaries.

Image

Even Windows XP stuff.

User avatar
Moonchild
Project founder
Project founder
Posts: 38957
Joined: 2011-08-28, 17:27
Location: Sweden

Re: Visual Studio 2026

Post by Moonchild » 2026-02-04, 12:49

Unless you intend to use new features from VS2026's IDE or what not, there's no real reason to upgrade and then using the older toolchains as it won't actually provide a benefit to the resulting compilation.
"There is no point in arguing with an idiot, because then you're both idiots." - Anonymous
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
UCyborg
Keeps coming back
Keeps coming back
Posts: 774
Joined: 2019-01-10, 09:37
Location: Slovenia

Re: Visual Studio 2026

Post by UCyborg » 2026-02-04, 18:44

I'm aware.

I haven't used Visual Studio for me in about a decade now. Last time I did, I used 2015 version. Being a student at the time, MS was generous and gave me the version costing thousands for free. Of course, I probably never used most of its features. But for most of my old game hacking projects, I used MS Visual C++ 6.0 from, shall we say, third-party sources. :P With SP5 + Processor Pack. It generates lean binaries linked with msvcrt.dll, which you only have to install on old versions of Windows 95, but it's been part of Windows ever since, no extra dependencies.

The project at work is bound to be updated to .NET 10 because of course the end of support for .NET 8 is the total end of the world. /S Guess I'll have to warn on the chance I encounter the customer with NT 6.x system. Even if .NET 10 happens to still work, there's dependency on some C++ stuff that will be built with new toolchain. And compatibility goes despite there hardly being any really good reason for it to go.

User avatar
UCyborg
Keeps coming back
Keeps coming back
Posts: 774
Joined: 2019-01-10, 09:37
Location: Slovenia

Re: Visual Studio 2026

Post by UCyborg » 2026-02-05, 20:29

The latest and greatest...it still happens at times that I edit some code, then start the program with debugging, set a breakpoint and it tells me the source code doesn't match the actual program. Then I stop the program (that I'm debugging), start it again and then it works.

Funny that workplace chases latest build tools...but still uses freaking Subversion. TortoiseSVN tends to randomly complain about directory being locked (by itself) and to run clean up. Yesterday, it even crashed out of the blue and opened their website, which said my version is not supported...but it's the latest. It's possible I don't have JavaScript whitelisted, in case it depends on it to work right.

Bleh! Git (and TortoiseGit) just works. At least I don't remember ever having any random problem with it. Besides being unable to clone that Subversion monstrosity of a repo to Git with git svn on Windows.

More on topic, I didn't find anything specific written on the website regarding running Pale Moon under Visual Studio's debugger. Do you just build it according to usual instructions, run the browser, then use the attach to process option in Visual Studio? Asking because most things I messed with came with Visual Studio solution. Or it was generatable with CMake.

User avatar
Moonchild
Project founder
Project founder
Posts: 38957
Joined: 2011-08-28, 17:27
Location: Sweden

Re: Visual Studio 2026

Post by Moonchild » 2026-02-05, 20:35

UCyborg wrote:
2026-02-05, 20:29
I didn't find anything specific written on the website regarding running Pale Moon under Visual Studio's debugger. Do you just build it according to usual instructions, run the browser, then use the attach to process option in Visual Studio?
Yeah if I actively debug code I build and mach run, with the symbol path set to the appropriate objdir in VS if it needs that (usually it finds them automatically), and attach the debugger to the running process. It just works grabbing any crashes or breakpoints. I use the same method investigating reported crash addresses (but then of course running release and pointing symbols paths to the release objdir)
"There is no point in arguing with an idiot, because then you're both idiots." - Anonymous
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
UCyborg
Keeps coming back
Keeps coming back
Posts: 774
Joined: 2019-01-10, 09:37
Location: Slovenia

Re: Visual Studio 2026

Post by UCyborg » 2026-02-05, 20:55

Ok, one more question regarding ATL and MFC. They seem to come in two variants, with and without Spectre mitigations. Generally, do you decide to use one or another? I'm puzzled by the part of instructions for building Pale Moon dealing with 32-bit build, where for ATL, it says to install both.

User avatar
UCyborg
Keeps coming back
Keeps coming back
Posts: 774
Joined: 2019-01-10, 09:37
Location: Slovenia

Re: Visual Studio 2026

Post by UCyborg » 2026-02-24, 23:16

Was my question my stupid? Not having dug any deeper into those libraries yet, I'd assume there's a choice between mitigated and non-mitigated libraries and developer evaluates most fitting for their project.

Regarding Visual Studio and RAM usage, read Rico Mariani on Why Visual Studio Isn’t 64-bit. And now a decade later.

User avatar
Moonchild
Project founder
Project founder
Posts: 38957
Joined: 2011-08-28, 17:27
Location: Sweden

Re: Visual Studio 2026

Post by Moonchild » 2026-02-25, 07:51

UCyborg wrote:
2026-02-05, 20:55
They seem to come in two variants, with and without Spectre mitigations. Generally, do you decide to use one or another? I'm puzzled by the part of instructions for building Pale Moon dealing with 32-bit build, where for ATL, it says to install both.
Not a stupid question, but I did find that depending on my build config it wanted either one or the other, so having both installed just prevents missing build prerequisites. I didn't dig deeper into why at the time.
"There is no point in arguing with an idiot, because then you're both idiots." - Anonymous
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
UCyborg
Keeps coming back
Keeps coming back
Posts: 774
Joined: 2019-01-10, 09:37
Location: Slovenia

Re: Visual Studio 2026

Post by UCyborg » 2026-03-12, 21:21

2026 still has a mind of its own, sometimes it suggests banal auto-completions if you've been applying multiple similar statements in different places in the file. I got funny bug while turning the upside down the database backend in software at work, when I wanted to continue execution from the breakpoint, it said it can't apply code changes due to internal error, even though there were no changes, the thing was built after cleaning solution. I just restarted VS at that point.

Something that applies to 2022 as well as 2026, DO NOT have the solution opened while performing operations through TortoiseGit that change files in the repository. Visual Studio may cause files to be randomly deleted during rebasing, they you'll wonder while editing commits why file X is suddenly shown as missing. I know Git is integrated in Visual Studio, though I haven't quite got accustomed to its interface. Plus, if I'm not mistaken, there aren't any options to interface with git svn, which TortoiseGit has. Speaking of the former, I was recently surprised by the warning saying git svn is no longer supported by the Git for Windows project after recently updating from I think 2.43 something. It still works, but appears to be on the chopping block and they say to use Linux version of Git through Windows Subsystem for Linux if git svn is needed (and want the latest and greatest Git). git svn is a bit of band-aid solution, need to know its gotchas, but it's either that or having no useful client-side features.

Does anyone here use Visual Studio for editing JavaScript files? If so, have you performed any tweaks? Seems I'd have to at least find the settings for identation. Visual Studio Code seems nicer to work with JavaScript out-of-box (but it's an Electron monstrosity). At some point, I installed TypeScript (ESLint, Prettier) in Visual Studio in hope to get some useful hints about the code. But, all this web tech is so foreign me. Maybe there's a way to configure it right, but as it is, everything in every file I open is underlined. Or maybe all code is simply crap! :D