Top
Best
New

Posted by deevus 13 hours ago

I fixed Windows native development(marler8997.github.io)
617 points | 302 commentspage 2
gnarlouse 1 hour ago|
“Don’t do it”

I fixed windows native development. Band together friends, force WSL3 as the backbone of Windows.

malkia 6 hours ago||
Or... you can

"winget install Microsoft.VisualStudio.BuildTools"

"winget install Microsoft.WindowsSDK.10.0.26100"

macshome 6 hours ago||
I thought for a moment I was missing something here. I always just use winget for this sort of thing as well. It may kickoff a bunch of things, but it’s pretty low effort and reliable.
scotty79 5 hours ago|||
But those are installed system wide. What if you have two different project with different requirements at the same time?

Every language should have a tool like Python uv.

Const-me 4 hours ago||
> What if you have two different project with different requirements at the same time?

Install multiple versions of Windows SDK. They co-exist just fine; new versions don’t replace old ones. When I was an independent contractor, I had 4 versions of visual studio and 10 versions of windows SDK all installed at once, different projects used different ones.

malkia 2 hours ago||
You can provide custom options to winget, and in there where to install it too (and additional components you need).
tonymet 6 hours ago||
Nearly all of the Windows hate i see comes from 20 year old takes . ( the bing/cortana / copilot / ads slop criticism is warranted, but is also easily disabled).
malkia 2 hours ago||
it's not ideal, but much much much better!
bob1029 10 hours ago||
You can do a lot of "native" windows development from modern C#/.NET via win32 interop.

Newer C# features like ref returns, structs, spans, et. al., make the overhead undetectable in many cases.

https://github.com/prasannavl/WinApi

https://github.com/microsoft/CsWin32

pjmlp 6 hours ago|
Exactly, the major pain point remains the .NET allergy from Windows team, but it is workable.
Alifatisk 8 hours ago||
> It’s so vast that Microsoft distributes it with a sophisticated GUI installer where you navigate a maze of checkboxes, hunting for which “Workloads” or “Individual Components” contain the actual compiler. Select the wrong one and you might lose hours installing something you don’t need.

I have a vague memory of stumbling upon this hell when installing the ldc compiler for dlang [1].

1. https://wiki.dlang.org/Building_and_hacking_LDC_on_Windows_u...

torginus 10 hours ago||
What we did for out build agents was to just install the required version of build tools via chocolatey. But cool approach!
pjmlp 10 hours ago||
Nowadays you can also use winget for it.
MomsAVoxell 10 hours ago||
Same. Choco solves this with a one-liner for me.
remix2000 5 hours ago||
I don't really use Windows OS much, but why not just use MinGW? Then you have Clang on all platforms you can think of: Android, all the various Darwin flavors and of course Linux and Windows; as well as on platforms you can't think of like FreeBSD or even Haiku maybe? Like honestly what's the point of supporting MSVC at all?? Maybe I'm just not enough of a Windows nerd to understand? (so I'm basically wondering if mingw has any drawbacks)
marler8997 4 hours ago|
If you have a self-contained project, where you don't depend on anyone else and others don't depend on you, MinGW works great. Problems arise when you have dependencies that don't work with it. I'd love to see if MinGW could find a way to be binary compatible with MSVC-compiled binaries. Right now it's kind of an all or nothing solution which makes it hard to adopt.
remix2000 4 hours ago||
Ah, binary-only dependencies, right… That's very specific though, so unless you need to drive some proprietary hardware, why bother using stuff that forces you into MSVC hell lol? Also wouldn't LLVM based MinGW benefit from Clang's MSVC compat? Not sure about this at all, that's why I'm asking, heh… ^^"
jordand 10 hours ago||
For big C++ projects, the .vsconfig import/export way of handling Visual Studio components has worked well for the large teams I'm on. Tell someone to import a .vsconfig and the Visual Studio Installer does everything. Only times we've had issues is from forgetting to update it with components/SDK changes.
jayd16 8 hours ago|
Yeah, seems like this is just ignorance around .vsconfig files. Makes life way easier. You can also just use the VS Build Tools exe to install things instead of the full VS installer, if you plan to use a different IDE.
scotty79 5 hours ago||
Can you use .vsconfig to tell Build Tools what your project needs?

Can you generate .vsconfig with Build Tools?

jayd16 3 hours ago||
You pass in the --config param to import it.

Exporting this way might be possible but it wouldn't be as useful seeing as it would just grab everything you have installed instead of some minimal set used by some project.

6581 11 hours ago||
> No Visual Studio installation. No GUI. No prayer. Just a script that does exactly what it says.
never_inline 11 hours ago||
Yeah its obvious clanker writing. I don't even mind using LLM for code but this rubs the wrong way.
jacobgorm 3 hours ago||
I’ve found that just installing LLVM, CMake and Ninja is enough to get started developing on Windows for most things C/C++.
jdthedisciple 10 hours ago|
Actually not that complicated: You simply check in a global.json [0] where you specify the sdk and workload versions.

Then you also specify target platform sdk versions in the .csproj file and VS will automatically prompt the developer to install the correct toolchain.

[0] https://learn.microsoft.com/en-us/dotnet/core/tools/global-j...

jcotton42 9 hours ago||
global.json is only for .NET toolchains.

What you’re actually wanting here is .vsconfig https://learn.microsoft.com/en-us/visualstudio/install/impor...

huflungdung 10 hours ago||
[dead]
More comments...