microsoft / DirectX-Graphics-Samples

This repo contains the DirectX Graphics samples that demonstrate how to build graphics intensive applications on Windows.
MIT License
5.89k stars 2k forks source link

Solution files for samples appear corrupted in VS2022 #787

Closed jenatali closed 1 year ago

jenatali commented 2 years ago

Attempting to open the .sln file for any of the desktop samples in VS2022 produces: image

Applying this diff is enough to get them to work:

--- a/Samples/Desktop/D3D12HelloWorld/src/D3D12HelloWorld.sln
+++ b/Samples/Desktop/D3D12HelloWorld/src/D3D12HelloWorld.sln
@@ -1,8 +1,6 @@
 
 Microsoft Visual Studio Solution File, Format Version 12.00
 # Visual Studio Version 16
-VisualStudioVersion = 16.0.30621.155.26403.0
-MinimumVisualStudioVersion = 10.0.40219.1
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "D3D12HelloTriangle", "HelloTriangle\D3D12HelloTriangle.vcxproj", "{5018F6A3-6533-4744-B1FD-727D199FD2E9}"
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "D3D12HelloBundles", "HelloBundles\D3D12HelloBundles.vcxproj", "{CAE2B6C4-B644-4B92-8804-23E18310765B}"
sebmerry commented 2 years ago

This should be fixed in Visual Studio 2022 version 17.2.2

https://developercommunity.visualstudio.com/t/Visual-Studio-2022-1720-doesnt-work-w/10039352

jenatali commented 2 years ago

Yep, sure enough, I had a pending update and once I installed it, everything's working now. Thanks!

sebmerry commented 2 years ago

Probably still a good idea to just trim these version numbers to something like:

# Visual Studio Version 16
VisualStudioVersion = 16.0
MinimumVisualStudioVersion = 10.0

I'll consider this for a future update.

walbourn commented 2 years ago

Visual Studio writes those values pretty much any time you edit the project, so they can be a real pain to keep to some particular value.

george-tsiros commented 2 years ago

This should be fixed in Visual Studio 2022 version 17.2.2

https://developercommunity.visualstudio.com/t/Visual-Studio-2022-1720-doesnt-work-w/10039352

fwiw i'm on 17.3 and, well, here i am

jenatali commented 2 years ago

There is no 17.3, 17.2.3 is the latest.

Edit: Nevermind, previews.

PathogenDavid commented 2 years ago

@george-tsiros Yeah, it's still broken in the 17.3 previews. I've reported it here if you want to vote on it: https://developercommunity.visualstudio.com/t/Visual-Studio-172-preview-2-can-no-long/1695514

walbourn commented 1 year ago

Works fine in 17.4