pch issue E2998 warning and thousands of errors.

Gavin Williams 761 Reputation points
2021-06-16T13:23:59.59+00:00

I'm setting up a UWP DirectX app.

I'm getting the following error in my Application.cpp file on the #include "pch.h" line..

E2998 PCH warning: an unknown error occurred. An IntelliSense PCH file was not generated.

My pch.h file is as follows..

#pragma once

// Use the C++ standard templated min/max
#define NOMINMAX

#include "winrt/Windows.ApplicationModel.h"
#include "winrt/Windows.ApplicationModel.Core.h"
#include "winrt/Windows.ApplicationModel.Activation.h"
Developer technologies | Universal Windows Platform (UWP)
Developer technologies | C++
0 comments No comments
{count} votes

Accepted answer
  1. Gavin Williams 761 Reputation points
    2021-06-17T02:56:23.607+00:00

    Someone suggested using the nuget version of C++/WinRT. That fixed at least this issue - though I can't understand why it wasn't using it already, because the project was a project template with the source taken out.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.