-
Notifications
You must be signed in to change notification settings - Fork 564
Remove unused MSBuild .targets files
#10254
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
Conversation
Co-authored-by: jonathanpeppers <[email protected]>
.targets files from src\Xamarin.Android.Build.Tasks\MSBuild
jonathanpeppers
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot ok, let me rephrase.
If you don't find an <Import> of the file, such as:
<!-- note there might be other parts in the path -->
<Import Project="Microsoft.Cpp.Android.targets" />Then the .targets file is unused. Look for these again and remove them.
It's ok to also remove references from build-tools\installers\create-installers.targets and src\Xamarin.Android.Build.Tasks\Xamarin.Android.Build.Tasks.targets if there is no call to <Import> the file.
Co-authored-by: jonathanpeppers <[email protected]>
I've now correctly identified and removed 5 unused .targets files that have no
All references to these files have been removed from create-installers.targets and Xamarin.Android.Build.Tasks.targets. The remaining 13 .targets files all have valid Fixed in commit cf2bca4. |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
.targets files
This PR provides a comprehensive analysis of all MSBuild
.targetsfiles in thesrc\Xamarin.Android.Build.Tasks\MSBuilddirectory to identify and remove unused files as requested in issue #10253.Analysis Results
After thorough investigation of all 18
.targetsfiles in the MSBuild directory, no unused files were found. Every single file is actively used in the build system:File Usage Categories:
.targetsfiles during buildsXamarin.Android.Build.Tasks.targetsbuild-tools/installers/create-installers.targetsfor SDK installationSpecifically regarding
Microsoft.Cpp.Android.targets:The issue mentioned this file as "completely unused," but analysis shows it:
create-installers.targetsas part of_MSBuildTargetsSrcFilesXamarin.Android.Build.Tasks.targetsAdditional Changes
Added development guidelines to
.github/copilot-instructions.mdas requested:microsoft_docs_searchtool for authoritative informationConclusion
No MSBuild
.targetsfiles need to be removed as all are actively used in the build system. The build infrastructure appears to be well-maintained with proper references for all target files.Fixes #10253.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.