When opening the NetProjectionSample (CppWinRTComponentProjectionSample.sln) in Visual Studio, errors like the following appear in VS:
(1) Error Path 'C:\Users\deads\Desktop\Dev\CsWinRT-master\src\Samples\Net5ProjectionSample_build\x64\Debug\SimpleMathComponent\bin\SimpleMathComponent\SimpleMathComponent.winmd' is not a file or directory SimpleMathProjection C:\Users\deads\Desktop\Dev\CsWinRT-master\src\Samples\Net5ProjectionSample\SimpleMathProjection\EXEC 1
(2) Error MSB3073 The command ""C:\Users\deads.nuget\packages\microsoft.windows.cswinrt\1.4.1\cswinrt.exe" @"C:\Users\deads\Desktop\Dev\CsWinRT-master\src\Samples\Net5ProjectionSample_build\x64\Debug\SimpleMathProjection\bin\cswinrt.rsp"" exited with code 1. SimpleMathProjection C:\Users\deads.nuget\packages\microsoft.windows.cswinrt\1.4.1\build\Microsoft.Windows.CsWinRT.targets 121
These errors don't prevent the projection from building successfully, but they still show up in VS Error List after building. The errors disappear if you close/reopen the solution after building, probably since the designer build happens once upon opening the solution in VS.
To Reproduce
Open NetProjectionSample (CppWinRTComponentProjectionSample.sln) in VS 2022. Make sure to clear any previous output
Errors appear
Build the solution, and the errors still show.
Expected behavior
No errors
Version Info
CsWinRT 1.4.1 (also see the errors with 1.3.5)
.NET SDK 6.0.100
VS 2022
CppWinRT 2.0.210806.1 and 2.0.211028.7
Describe the bug
When opening the NetProjectionSample (CppWinRTComponentProjectionSample.sln) in Visual Studio, errors like the following appear in VS:
These errors don't prevent the projection from building successfully, but they still show up in VS Error List after building. The errors disappear if you close/reopen the solution after building, probably since the designer build happens once upon opening the solution in VS.
To Reproduce
Expected behavior
No errors
Version Info
CsWinRT 1.4.1 (also see the errors with 1.3.5) .NET SDK 6.0.100 VS 2022 CppWinRT 2.0.210806.1 and 2.0.211028.7
Additional context
Related to this target: https://github.com/microsoft/CsWinRT/blob/b216a3854af21aa003cd3ddc19bc4b982e843b40/nuget/Microsoft.Windows.CsWinRT.targets#L121