microsoft / WindowsCompositionSamples

The Windows Composition Samples have moved here: https://github.com/microsoft/WindowsAppSDK-Samples/tree/main/Samples/SceneGraph
https://github.com/microsoft/WindowsAppSDK-Samples/tree/main/Samples/SceneGraph
MIT License
1.12k stars 287 forks source link

Build error in VS2019 and VS2019 preview #343

Closed mediabuff closed 5 months ago

mediabuff commented 4 years ago

:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(4545,5): error MSB3030: Could not copy the file "Microsoft\WindowsCompositionSamples\SamplesCommon\SamplesCommon\bin\x86\Debug\SamplesCommon\CompositionShadow.xbf" because it was not found. 4>C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(4545,5): error MSB3030: Could not copy the file "Microsoft\WindowsCompositionSamples\SamplesCommon\SamplesCommon\bin\x86\Debug\SamplesCommon\LightControl.xbf" because it was not found. 4>C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(4545,5): error MSB3030: Could not copy the file "Microsoft\WindowsCompositionSamples\SamplesCommon\SamplesCommon\bin\x86\Debug\SamplesCommon\ColorMixer.xbf" because it was not found. 4>C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(4545,5): error MSB3030: Could not copy the file "Microsoft\WindowsCompositionSamples\SamplesCommon\SamplesCommon\bin\x86\Debug\SamplesCommon\SamplesCommon.xr.xml" because it was not found.

DRAirey1 commented 4 years ago

Doesn't compile with VS2019. Too many errors to sort through.

thespooler commented 3 years ago

I did get it to build with VS2019, but it crashes instantly. Here are a couple pointers:

  1. In the SamplesNative project properties, change Platform Toolset to Visual Studio 2019 (v142)
  2. Manage NuGet packages for the solution and update Win2D.uwp to 1.25 and Microsoft.Xaml.Behaviors.Uwp.Managed to whatever version is available and then Microsoft.NETCore.UniversalWindowsPlatform to 6.2.12

Run... aaannnd crash...

hawkerm commented 3 years ago

I needed to try a sample and better understand it, so I was able to get it to build in VS 2019. Submitted PR #350