Skip to content
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

Microsoft.Common.tasks & Microsoft.Common.overridetasks #5492

Open
ArsenShnurkov opened this issue Jul 8, 2020 · 3 comments
Open

Microsoft.Common.tasks & Microsoft.Common.overridetasks #5492

ArsenShnurkov opened this issue Jul 8, 2020 · 3 comments
Labels
needs-design Requires discussion with the dev team before attempting a fix. question triaged
Milestone

Comments

@ArsenShnurkov
Copy link

Both files are physically present in the repository:
https://github.com/microsoft/msbuild/blob/v16.6.0.22303/src/Tasks/Microsoft.Common.tasks
https://github.com/microsoft/msbuild/blob/v16.6.0.22303/src/Tasks/Microsoft.Common.overridetasks
Why this was necessary?
Why not to put all their content into the first file?

I am asking, because I want to redefine one task, and I am unable to deploy mine .overridetasks file, because one is already deployed (and mine file will overwrite the existing one, which is not good).

@rainersigwald
Copy link
Member

That's a good question. I don't think the .overridetasks file is necessary, but I don't understand why it exists at all.

The original commit notes were (10/14/2008 7:54 AM)

Changeset 598865: Override tasks are required to allow msbuild 4.0 to target framework version 3.5 and lower when the toolset being used is 3.5 or lower. The reason is, when targeting .net 3.5 or lower we need to use out of process tasks. The .net 3.5 and 2.0 generate resoruce and resolve com reference tasks do in process work. We have updated the 4.0 tasks to do out of process work. The problem was, we need to be able to tell the 3.5 and 2.0 toolsets to use the 4.0 task rather than that tasks which shipped.

I'm not sure I buy that logic.

For the time being, can you just add to the .override tasks file?

@rainersigwald rainersigwald added needs-design Requires discussion with the dev team before attempting a fix. question labels Jul 8, 2020
@rainersigwald rainersigwald added this to the Backlog milestone Jul 8, 2020
@ArsenShnurkov
Copy link
Author

ArsenShnurkov commented Jul 8, 2020

can you just add to the .override tasks file?

I am using Gentoo Linux, and it is inconvenient to modify files during package installation (and modify back during deinstallation). The best design here is to have the folder for configuration files and define the load order for them. Files should be loaded in that order and next files should redefine directives form previously loaded files.
Specifically, I want to redefine ResolveAssemblyReference task to take {PkgConfig} into account - gentoo/dotnet#379

@Nirmal4G
Copy link
Contributor

Related to #5190

@AR-May AR-May added the triaged label Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-design Requires discussion with the dev team before attempting a fix. question triaged
Projects
None yet
Development

No branches or pull requests

4 participants