projects: fix Windows project 'clean' function#18412
Closed
jay wants to merge 7 commits into
Closed
Conversation
- Fix generate.bat "-clean" option. - Minor change to version template substitutes to match old files, eg go back to using format version "11.00" instead of "11.0". - Do not remove the VC directories during clean, instead remove just the generated project files. Removing the VC directories has the unwanted behavior of removing files other than those generated. Visual Studio will generate its own preference files (like if you have some debug arguments in your .suo) and those files sit in the VC directories. We ignore these files and they are the user's files and should not be deleted. Also the user (such as me) may have their own untracked files that we shouldn't be deleting. Follow-up to 57d349f which consolidated the project templates. Closes #xxxx
jay
force-pushed
the
fix_projects_clean
branch
from
August 27, 2025 07:35
59fe6b3 to
8437c7a
Compare
Member
Author
|
I think it may be possible to not have VCxx in the tree without affecting the untracked files so I'm going to limit this PR to getting rid of the remove directory command but not the create directory command. |
vszakats
reviewed
Aug 27, 2025
vszakats
reviewed
Aug 27, 2025
Member
|
Peeking into the Their content, after deleting non-existing extensions: <ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>c</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc</Extensions>
</Filter>
</ItemGroup>
</Project> |
.. also add a readme explaining that files in templ directory should not be opened with visual studio. template files are already in a tmpl directory which is enough to identify them as template files without having the templ extension. however it's possible the user won't understand that? so i added a readme explaining that they are template files.
Member
Author
vszakats
approved these changes
Aug 29, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Fix generate.bat "-clean" option.
Minor change to version template substitutes to match old files,
eg go back to using format version "11.00" instead of "11.0".
Do not remove the VC directories during clean, instead remove just the
generated project files.
Removing the VC directories has the unwanted behavior of removing files
other than those generated. Visual Studio will generate its own
preference files (like if you have some debug arguments in your .suo)
and those files sit in the VC directories. We ignore these files and
they are the user's files and should not be deleted. Also the user (such
as me) may have their own untracked files that we shouldn't be deleting.
Follow-up to 57d349f which consolidated the project templates.
Closes #xxxx