Skip to content

Bug: Bug in the C++/WinRT Windows Runtime Component VS Template causes cppwinrt file generate to fail. #1437

@laultman

Description

@laultman

Version

v2.0.230511.6

Summary

The template for the C++/WinRT Windows Runtime Component at line 129 is missing a "" backslash character. This causes the directory name to merge with the file name. This affects the GeneratedFiles directory structure making the tool chain fail.
Incorrect : <ClCompile Include="$(GeneratedFilesDir)module.g.cpp" />
Corrected: <ClCompile Include="$(GeneratedFilesDir)\module.g.cpp" />
"-----------------------------------------------------------| "

Reproducible example

Open a new C++/WinRT Windows Runtime Component project. After it opens in Visual Studio, use some other tool to inspect the vcxproj file. Go to line 129 and observe the missing "\" backslash as shown in the discussion above.

Expected behavior

I expected the template to have been tested and to have worked. I expected the Thermometer code walkthrough at this link to work as described in the article.

Actual behavior

Fails to build projects. Source files are not generated. Module.g.cpp is not generated.

Additional comments

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions