Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NuGet errors when building D3D12HelloWorld #881

Open
Witek902 opened this issue Aug 15, 2024 · 6 comments
Open

NuGet errors when building D3D12HelloWorld #881

Witek902 opened this issue Aug 15, 2024 · 6 comments
Labels
bug samples Issues related to Samples

Comments

@Witek902
Copy link

When building D3D12HelloWorld.sln solution I'm getting following errors:
5>D:\DEV\EXTERNAL\DirectX-Graphics-Samples\Samples\Desktop\D3D12HelloWorld\src\HelloVAResourceInterop\D3D12HelloVAResourceInterop.vcxproj(156,5): error : This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is ..\packages\Microsoft.Direct3D.D3D12.1.613.1\build\native\Microsoft.Direct3D.D3D12.props.

Microsoft Visual Studio Community 2022
Version 17.10.6
VisualStudio.17.Release/17.10.6+35201.131
Microsoft .NET Framework
Version 4.8.09037

@walbourn
Copy link
Member

If you are building from in the IDE, the NuGet restore should happen automatically. If you are building from the command-line, you need to use nuget restore D3D12HelloWorld.sln after downloading nuget.exe.

@Witek902
Copy link
Author

I am trying to build from IDE

@oliverxyy
Copy link

oliverxyy commented Aug 19, 2024

The D3D12 version specified in packages.config is different from .vcxproj file, fix either of them can work.
packages.config:
<packages> <package id="Microsoft.Direct3D.D3D12" version="1.614.1" targetFramework="native" /> </packages>

*.vcxproj
<ImportGroup Label="ExtensionTargets"> <Import Project="..\packages\Microsoft.Direct3D.D3D12.1.613.1\build\native\Microsoft.Direct3D.D3D12.targets" Condition="Exists('..\packages\Microsoft.Direct3D.D3D12.1.613.1\build\native\Microsoft.Direct3D.D3D12.targets')" /> </ImportGroup>

@bub1ick
Copy link

bub1ick commented Aug 27, 2024

The issue stems from the commit regarding issue #879 (commit bf2e880). It changed the required package version in lots of different packges.config files. Hope this helps.

@magi-guy
Copy link

image
I'm putting this here because it fixed the problem for me, even though I have no idea why. Changing the version of the Agility SDK from 1.614.1 to 1.613.1 in just the HelloWindow packages.config file fixed every single build error for every project. I do not know if this breaks anything else.

@walbourn
Copy link
Member

Yes, the problem is that the D3D12HelloTriangle.vcxproj and the packages.config are out of sync. Another fix is to open the .vcxproj in a text editor and change all the 1.613.1 references to 1.614.1

@walbourn walbourn added bug samples Issues related to Samples and removed question labels Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug samples Issues related to Samples
Projects
None yet
Development

No branches or pull requests

5 participants