-
Notifications
You must be signed in to change notification settings - Fork 701
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
After some time c++ winrt project build starts failing #10038
Comments
Considering where the first error is, base.h being generated incorrectly is a very real possibility here. To illustrate what I mean, the start of Microsoft.UI.Xaml.Data.h is:
The error is on the static assert line, and the two errors related to it are at the start of winrt (line 7 column 15) and the start of check_version (line 7 column 22). So, the next time you see this error, could you check the contents of base.h to see if anything is obviously wrong? To address whether .idl files have anything to do with this. The last time I checked, the project builds in this way:
There is a little more to it, but the .idl files are always compiled first and C++/WinRT always generates the projection in 3 steps. Are you using the latest release version of C++/WinRT? |
I was using C++/WinRT version 20.240111.5. I upgraded to 2.0.240405.15 and the problem still occurred. I also upgraded SDK Build Tools, Windows APP SDK, Windows Implementation Library, WebView2 to their latest and the problem continued. Microsoft.Windows.CppWinRT.2.0.240405.15 I then decided to create a new project and copy my files over. This built fine. As soon as I changed the compiler level from C++17 to 20, the build failed as mentioned in the original post. So seems I am able to recreate it at will now. I looked at the generated files between the 2 projects and they are identical. Outside of the generated files, I did notice a difference in this log file: TestG\x64\Debug\TestG.tlog\CL.read.1.tlog The log file from the last build on C++17 has these lines at the top: The log file from the first build on C++20 has these lines at the top: Note that these lines are only in the C++17 log: and this line is only in the C++20 log: Then both logs are exactly the same until much further down where these lines are only found in the C++17 log: C:\PROGRAM FILES (X86)\WINDOWS KITS\10\INCLUDE\10.0.22621.0\UM\RESTRICTEDERRORINFO.H Note that the fourth file in that list is WINRT/BASE.H. So maybe WINRT\BASE.H is not getting included in the C++20 build which is leading to all the errors. Note that if I go back to C++17 at this point the error continues to occur. |
As far as the theory regarding the C++ 20 standard is concerned. 2024-10-06.02-39-55.mp4I dug through the logs, and the only thing that changes is that /std:c++20 is passed to cl.exe rather than /std:c++17. There is also one other important thing here, $(GeneratedFilesDir) is automatically put in the additional include directory for the compiler settings. Since base.h is generated in the same directory as the projection headers: then if the projection headers are being found then base.h must also be found. Another important thing to note, if base.h was not being included, then the compiler would emit the C1083 error. If you are not seeing that error, then base.h is being found and included. Also, the logs can be inaccurate. Unless you are doing a full build then Visual Studio will just move updated files to the end. Most of the time pch.cpp is the first one in there because of where it occurs in the build, but if you modify pch.h and rebuild then something that doesn't depend on the precompiled header will move to the top. All I did to get that was to build the project, touched the time of pch.h and then built the project again without cleaning first. The second file in that log was pch.cpp and base.h was being read. Finally, to test the whole C++17->C++20->C++17 thing. 2024-10-06.03-06-17.mp4So I just don't see it. Also, from where I am sitting, this looks like it is a C++/WinRT problem, since the cppwinrt executable is the only thing that modifies base.h. There are two potentially related questions, first, is your build drive on an SSD of some kind (SATA SSD or NVMe)? Secondly, have you tried disabling any antimalware software during the build? I am wondering if writes to base.h is being delayed somehow and that causes cl.exe to find a bad file, but base.h looks ok after the fact. But at this point, I feel like you should provide a minimal sample that reproduces the error. |
The problem occurred again yesterday but it wasn't after a compiler update from C++17 to 20. It was after a clean operation. And then I remembered that the first time this occurred was immediately after a clean operation as well. I then tried to recreate the error from scratch by doing the compiler update. This time I made the update soon after creating the project. The error didn't recreate so I decided to see if I could recreate it by performing a clean at various stages. The error did not recreate after adding 1 idl file but it did recreate after there were multiple idl files in the project. None of these idl files were being used by the way. They were simply defined in the project. The sequence of steps leading up to the error are below along with a link to different versions of the solution folder. I wonder if the compiler update causes an implicit clean and that is the reason why it triggers the error. Sequence of steps leading up to the error for completeness. I suspect the multiple idl files is the culprit. After each step I built the project.
Added: Updated:
At this point the build failed with a single error about a Microsoft.Ui... reference. Can't remember the exact error.
At this point the build failed with the error from the original post. I have uploaded 3 versions of the contents of the solution folder at the link below.
https://drive.google.com/drive/folders/19bGJeC_6t4VAiFwgeiOJm22OK_Wh864_?usp=sharing |
Right, I triggered it. It is also one of those obvious but simple ones when you know it, but so easy to miss if you are not expecting it errors. The big thing that I noticed here was that pch.h was reporting errors in Test.h, my project's projection file, which wasn't even included in the precompiled header. I used the /showIncludes compiler option to figure out how that was being included, and it was coming in from the stl's <thread>.
Basically, Windows.Foundation.h was including base.h, base.h was including thread, thread was including process.h and this was then including the project's Process.h. The issue here is that it really wanted the UCRT's process.h. So, how did it go after the wrong process.h? Well, it was a double whammy of a compiler setting and a compiler behaviour. First, the project directory was added as an additional include directory. I showed this screenshot previously, but it is true here, and I think it comes from C++/WinRT's added properties: this causes the project's Process.h to be findable with angle brackets and not just quotes. The second is that include paths provided with the /I option take precedence over paths defined in the environment. Since the project's directory was a search path is provided by the /I option and the UCRT's path is provided by the INCLUDE environment variable, it was just picking your project's Process.h first. |
Thanks a lot for figuring this out. I certainly was not expecting my header files to be picked up outside of my own changes. In one project, I did a rename from Process to MyProcess and the build now succeeds. It seems there's no added value to me to have the project directory as an additional include directory since I always use double-quotes when including those. So on another project I simply removed the $(ProjectDir) from the additional includes directories. However, that one continues to fail in the same way. Is there something additional I need to do to remove my project dir from the search path? |
I can't really say without knowing how you set the Additional Include Directories option. But as a reminder, the MSBuild project system has inheirtable properties. If you refer to my previous screenshot, notice the If you click into the property's text box, you should notice that a little down arrow appears to the side: If you click this, you can edit the property. If the text isn't in bold, then the property has been obtained by inheritance. If it is bold, then it has been set in the project file. If the text is bold, then selecting this down arrow also allows you to revert the setting back to the inherited value. Selecting edit opens up a window that shows the current values. As you can see, this also include the values obtained by inheritance. From this, you can see that Please notice that the "Inherit from parent or project defaults" checkbox has been deselected. This removes the 1>XamlTypeInfo.g.cpp If you look at the generated XamlTypeInfo.g.cpp, it indeed does include project header files:
It isn't failing on pch.h, even though it should, due to compiler magic. It is substituting pch.h with the precompiled header file. So due to the source generation, Xaml projects need the project directory set as an additional include directory. Just in case you were wondering, I knew about this already, but I wanted to give you all of the details so you are able to test it out for yourself. |
This is great information. I can't tell you how much I appreciate this. Not only did you answer my question but you took the time to explain why it will not work. Thank you very much. |
Describe the bug
Blank App, Packaged (WinUI 3 in desktop) C++ project with idl files builds eventually start failing due to not recognizing winrt.
Steps to reproduce the bug
I can't recreate this consistently. Using Visual Studio 2022 64-bit 17.11.4. Used the "Blank App, Packaged (WinUI 3 in desktop)" template. Changed the following in the project file:
true to false
false
and added these:
None
true
Created a couple idl files for a view model and corresponding .h and .cpp files. Things will be working fine and suddenly, my builds start failing. Even if I only did one thing between the last successful build and the currently failing one and I undo that change, the build continues to fail. As an example, the last time this happened, the only change I made between the last successful build and the currently failing one was changing from C++17 to C++20. Even after undoing that change, the build continued to fail in the same way.
I tried upgrading to the latest nuget packages and tried stopping using pre-compiled headers but it still fails.
This has happened several times now. Each time I started over with a fresh project and eventually it starts failing like this. There doesn't seem to be a clear action. It always seems to follow a different action.
I have another project similar to the ones that fail but that one doesn't have any idl files. So maybe something about the idl files is triggering the failure.
I think this will be hard to recreate. If needed, I can provide a zip of a solution where this is currently happening. I would've attached it to this issue but it's too big.
Removed the successful first part of the build as the full log was too long to include in this issue.
Build log:
Build started at 7:46 PM...
1>------ Build started: Project: TestG, Configuration: Debug x64 ------
...
1>Processing WinMD c:\program files (x86)\windows kits\10\references\10.0.22621.0\windows.ui.xaml.core.direct.xamldirectcontract\5.0.0.0\windows.ui.xaml.core.direct.xamldirectcontract.winmd
1>Microsoft(R) Metadata Merge Utility Version 10.0.49.
1>
1>
1>Processing input metadata file TestG\x64\Debug\Unmerged\MainWindow.winmd.
1>Processing input metadata file TestG\x64\Debug\Unmerged\Process.winmd.
1>Processing input metadata file TestG\x64\Debug\Unmerged\Request.winmd.
1>Processing input metadata file TestG\x64\Debug\Unmerged\XamlMetaDataProvider.winmd.
1>Saved output metadata file TestG.winmd.
1>Validating metadata file TestG\x64\Debug\Merged\TestG.winmd.
1>pch.cpp
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\Microsoft.UI.Xaml.Data.h(7,15): error C2653: 'winrt': is not a class or namespace name
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\Microsoft.UI.Xaml.Data.h(7,22): error C3861: 'check_version': identifier not found
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\Microsoft.UI.Xaml.Data.h(7,35): error C2131: expression did not evaluate to a constant
1>(compiling source file 'pch.cpp')
1> C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\Microsoft.UI.Xaml.Data.h(7,35):
1> a non-constant (sub-)expression was encountered
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\Microsoft.UI.Xaml.h(7,15): error C2653: 'winrt': is not a class or namespace name
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\Microsoft.UI.Xaml.h(7,22): error C3861: 'check_version': identifier not found
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\Microsoft.UI.Xaml.h(7,35): error C2131: expression did not evaluate to a constant
1>(compiling source file 'pch.cpp')
1> C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\Microsoft.UI.Xaml.h(7,35):
1> a non-constant (sub-)expression was encountered
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\Microsoft.UI.h(7,15): error C2653: 'winrt': is not a class or namespace name
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\Microsoft.UI.h(7,22): error C3861: 'check_version': identifier not found
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\Microsoft.UI.h(7,35): error C2131: expression did not evaluate to a constant
1>(compiling source file 'pch.cpp')
1> C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\Microsoft.UI.h(7,35):
1> a non-constant (sub-)expression was encountered
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(6,14): error C2143: syntax error: missing ';' before 'namespace'
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(6,1): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(10,14): error C2143: syntax error: missing ';' before 'namespace'
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(10,1): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(10,1): error C2086: 'int WINRT_EXPORT': redefinition
1>(compiling source file 'pch.cpp')
1> C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(6,1):
1> see declaration of 'WINRT_EXPORT'
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(19,57): error C2146: syntax error: missing ';' before identifier 'IIterable'
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(19,57): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(20,57): error C2146: syntax error: missing ';' before identifier 'IIterator'
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(20,57): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(21,69): error C2146: syntax error: missing ';' before identifier 'IKeyValuePair'
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(21,14): error C2977: 'winrt::Windows::Foundation::Collections::WINRT_IMPL_EMPTY_BASES': too many template arguments
1>(compiling source file 'pch.cpp')
1> C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(19,34):
1> see declaration of 'winrt::Windows::Foundation::Collections::WINRT_IMPL_EMPTY_BASES'
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(21,69): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(22,57): error C2146: syntax error: missing ';' before identifier 'IMapChangedEventArgs'
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(22,57): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(23,69): error C2146: syntax error: missing ';' before identifier 'IMapView'
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(23,14): error C2977: 'winrt::Windows::Foundation::Collections::WINRT_IMPL_EMPTY_BASES': too many template arguments
1>(compiling source file 'pch.cpp')
1> C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(19,34):
1> see declaration of 'winrt::Windows::Foundation::Collections::WINRT_IMPL_EMPTY_BASES'
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(23,69): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(24,69): error C2146: syntax error: missing ';' before identifier 'IMap'
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(24,14): error C2977: 'winrt::Windows::Foundation::Collections::WINRT_IMPL_EMPTY_BASES': too many template arguments
1>(compiling source file 'pch.cpp')
1> C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(19,34):
1> see declaration of 'winrt::Windows::Foundation::Collections::WINRT_IMPL_EMPTY_BASES'
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(24,69): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(25,69): error C2146: syntax error: missing ';' before identifier 'IObservableMap'
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(25,14): error C2977: 'winrt::Windows::Foundation::Collections::WINRT_IMPL_EMPTY_BASES': too many template arguments
1>(compiling source file 'pch.cpp')
1> C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(19,34):
1> see declaration of 'winrt::Windows::Foundation::Collections::WINRT_IMPL_EMPTY_BASES'
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(25,69): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(26,57): error C2146: syntax error: missing ';' before identifier 'IObservableVector'
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(26,57): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(29,57): error C2146: syntax error: missing ';' before identifier 'IVectorView'
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(29,57): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(30,57): error C2146: syntax error: missing ';' before identifier 'IVector'
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(30,57): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(34,69): error C2146: syntax error: missing ';' before identifier 'MapChangedEventHandler'
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(34,14): error C2977: 'winrt::Windows::Foundation::Collections::WINRT_IMPL_EMPTY_BASES': too many template arguments
1>(compiling source file 'pch.cpp')
1> C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(19,34):
1> see declaration of 'winrt::Windows::Foundation::Collections::WINRT_IMPL_EMPTY_BASES'
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(34,69): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(35,57): error C2146: syntax error: missing ';' before identifier 'VectorChangedEventHandler'
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(35,57): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(39,42): error C3856: 'category': symbol is not a class template
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(39,84): error C2143: syntax error: missing ';' before 'winrt::Windows::Foundation::Collections::IIterable'
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(39,93): error C2143: syntax error: missing ';' before '<'
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(39,84): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(39,84): error C2086: 'int winrt::Windows::Foundation::Collections::IIterable': redefinition
1>(compiling source file 'pch.cpp')
1> C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(19,57):
1> see declaration of 'winrt::Windows::Foundation::Collections::IIterable'
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(39,97): error C2143: syntax error: missing ';' before '{'
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(39,97): error C2447: '{': missing function header (old-style formal list?)
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(40,34): error C2974: 'winrt::impl::category': invalid template argument for 'T', type expected
1>(compiling source file 'pch.cpp')
1> C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(39,34):
1> see declaration of 'winrt::impl::category'
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(40,95): error C2988: unrecognizable template declaration/definition
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(40,95): error C2143: syntax error: missing ';' before '>'
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(40,95): error C2059: syntax error: '>'
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(40,97): error C2143: syntax error: missing ';' before '{'
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(40,97): error C2447: '{': missing function header (old-style formal list?)
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(41,46): error C2977: 'winrt::impl::category': too many template arguments
1>(compiling source file 'pch.cpp')
1> C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(39,34):
1> see declaration of 'winrt::impl::category'
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(41,114): error C2988: unrecognizable template declaration/definition
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(41,114): error C2143: syntax error: missing ';' before '>'
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(41,14): error C2977: 'winrt::impl::category': too many template arguments
1>(compiling source file 'pch.cpp')
1> C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(39,34):
1> see declaration of 'winrt::impl::category'
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(41,114): error C2059: syntax error: '>'
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(41,116): error C2143: syntax error: missing ';' before '{'
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(41,116): error C2447: '{': missing function header (old-style formal list?)
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(42,106): error C2988: unrecognizable template declaration/definition
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(42,106): error C2143: syntax error: missing ';' before '>'
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(42,106): error C2059: syntax error: '>'
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(42,108): error C2143: syntax error: missing ';' before '{'
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(42,108): error C2447: '{': missing function header (old-style formal list?)
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(43,109): error C2988: unrecognizable template declaration/definition
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(43,109): error C2143: syntax error: missing ';' before '>'
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(43,14): error C2977: 'winrt::impl::category': too many template arguments
1>(compiling source file 'pch.cpp')
1> C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(39,34):
1> see declaration of 'winrt::impl::category'
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(43,109): error C2059: syntax error: '>'
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(43,111): error C2143: syntax error: missing ';' before '{'
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(43,111): error C2447: '{': missing function header (old-style formal list?)
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(44,105): error C2988: unrecognizable template declaration/definition
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(44,105): error C2143: syntax error: missing ';' before '>'
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(44,14): error C2977: 'winrt::impl::category': too many template arguments
1>(compiling source file 'pch.cpp')
1> C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(39,34):
1> see declaration of 'winrt::impl::category'
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(44,105): error C2059: syntax error: '>'
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(44,107): error C2143: syntax error: missing ';' before '{'
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(44,107): error C2447: '{': missing function header (old-style formal list?)
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(45,115): error C2988: unrecognizable template declaration/definition
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(45,115): error C2143: syntax error: missing ';' before '>'
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(45,14): error C2977: 'winrt::impl::category': too many template arguments
1>(compiling source file 'pch.cpp')
1> C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(39,34):
1> see declaration of 'winrt::impl::category'
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(45,115): error C2059: syntax error: '>'
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(45,117): error C2143: syntax error: missing ';' before '{'
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(45,117): error C2447: '{': missing function header (old-style formal list?)
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(46,103): error C2988: unrecognizable template declaration/definition
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(46,103): error C2143: syntax error: missing ';' before '>'
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(46,103): error C2059: syntax error: '>'
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(46,105): error C2143: syntax error: missing ';' before '{'
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(46,105): error C2447: '{': missing function header (old-style formal list?)
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(47,24): error C2913: explicit specialization; 'winrt::impl::category' is not a specialization of a class template
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(48,24): error C2913: explicit specialization; 'winrt::impl::category' is not a specialization of a class template
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(49,97): error C2988: unrecognizable template declaration/definition
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(49,97): error C2143: syntax error: missing ';' before '>'
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(49,97): error C2059: syntax error: '>'
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(49,99): error C2143: syntax error: missing ';' before '{'
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(49,99): error C2447: '{': missing function header (old-style formal list?)
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(50,93): error C2988: unrecognizable template declaration/definition
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(50,93): error C2143: syntax error: missing ';' before '>'
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(50,93): error C2059: syntax error: '>'
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(50,95): error C2143: syntax error: missing ';' before '{'
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(50,95): error C2447: '{': missing function header (old-style formal list?)
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(51,24): error C2913: explicit specialization; 'winrt::impl::category' is not a specialization of a class template
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(52,24): error C2913: explicit specialization; 'winrt::impl::category' is not a specialization of a class template
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(53,24): error C2913: explicit specialization; 'winrt::impl::category' is not a specialization of a class template
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(54,24): error C2913: explicit specialization; 'winrt::impl::category' is not a specialization of a class template
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(55,123): error C2988: unrecognizable template declaration/definition
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(55,123): error C2143: syntax error: missing ';' before '>'
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(55,14): error C2977: 'winrt::impl::category': too many template arguments
1>(compiling source file 'pch.cpp')
1> C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(54,24):
1> see declaration of 'winrt::impl::category'
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(55,123): error C2059: syntax error: '>'
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(55,125): error C2143: syntax error: missing ';' before '{'
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(55,125): error C2447: '{': missing function header (old-style formal list?)
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(56,111): error C2988: unrecognizable template declaration/definition
1>(compiling source file 'pch.cpp')
1>C:\Users\developer\MyData\VSTEST\TestG\Generated Files\winrt\impl\Windows.Foundation.Collections.0.h(56,111): error C1003: error count exceeds 100; stopping compilation
1>(compiling source file 'pch.cpp')
1>Done building project "TestG.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Build completed at 7:46 PM and took 06.775 seconds ==========
Expected behavior
I expect the build to succeed
Screenshots
No response
NuGet package version
None
Windows version
No response
Additional context
Actually on Windows 11 Pro 10.0.22631
The text was updated successfully, but these errors were encountered: