-
Notifications
You must be signed in to change notification settings - Fork 247
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
Bug: Bug in the C++/WinRT Windows Runtime Component VS Template causes cppwinrt file generate to fail. #1437
Comments
We don't have anyone working the VS templates at the moment. Feel free to contribute a fix and I'll see if I can get someone familiar with that code to review it. |
That property already includes a trailing slash so it is not necessary to add another one. I just created an empty cppwinrt project using the Visual Studio templates and added a target to dump this property.
And the output when building is:
|
@dmachaj That's well and good for the field name. But that does not mean the syntax is correct in the template. You are correct it does have resolve to the correct name but the syntax in the line requires the backslash before a file name. |
There must be a subtlety that I am missing here. If the variable expands to the correct thing when msbuild runs a build, then that should be all that matters. The statement "the syntax in the line requires the backslash before a file name" does not align with that. What tool says the syntax requires a slash here? It doesn't seem to be msbuild. If there is some sort of error message please include it. |
Apparently, we are talking about different things. Then go follow the ThermometerWRC instructions. In the end you must fix the path or module.g.cpp is never built. |
I just created a brand new C++/WinRT runtime component project, and I see module.g.cpp getting built just fine:
|
OK, here we go again. Just reinstalled Windows, and reinstalling VS for the 3d time this month. Maybe I'll get lucky and it will work. |
This issue is stale because it has been open 10 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
I disregarded the comments as my solution was to add the backslash and it works. Don't care. |
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
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
The text was updated successfully, but these errors were encountered: