Skip to content

Conversation

@gtbuchanan
Copy link
Contributor

@gtbuchanan gtbuchanan commented May 21, 2025

https://learn.microsoft.com/en-us/visualstudio/msbuild/msbuild

MSBuild does not change its behavior based on the file extension, but the convention is to use extensions ending in proj such as .csproj, .vcxproj, or .vbproj, for the main MSBuild input file, called the "project file."

The Visual Studio build system stores project-specific logic in the project file itself, and uses imported MSBuild XML files with extensions like .props and .targets to define the standard build logic. The .props files define MSBuild properties, and .targets files define MSBuild targets.

I didn't include all known types (like the other **proj listed here), but the more common ones should be sufficient until someone needs the others.

@asottile
Copy link
Member

unfortunately it seems a few of these new extensions are ambiguous and cannot be included

@gtbuchanan
Copy link
Contributor Author

I was afraid of that. I assume you're referring to proj and props?

@asottile
Copy link
Member

I was afraid of that. I assume you're referring to proj and props?

tbh I stopped looking once I saw proj so there might be more

@gtbuchanan
Copy link
Contributor Author

I removed proj. I could not find props or targets used for anything other than MSBuild.

Copy link
Member

@asottile asottile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@asottile asottile merged commit 00310d3 into pre-commit:main May 23, 2025
6 checks passed
@gtbuchanan gtbuchanan deleted the feature/msbuild branch May 23, 2025 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants