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 cleanup #5190

Closed
rainersigwald opened this issue Mar 23, 2020 · 1 comment · Fixed by #7165
Closed

Microsoft.Common.tasks cleanup #5190

rainersigwald opened this issue Mar 23, 2020 · 1 comment · Fixed by #7165
Labels
needs-design Requires discussion with the dev team before attempting a fix. triaged
Milestone

Comments

@rainersigwald
Copy link
Member

Microsoft.Common.tasks has every built-in MSBuild task duplicated between sections, one of which is

https://github.com/microsoft/msbuild/blob/3453beee039fb6f5ccc54ac783ebeced31fec472/src/Tasks/Microsoft.Common.tasks#L9-L14

I don't think we need to have back compat with dev11 any more, and $(AssemblyVersion) should never be empty with MSBuild as built from this repo.

I'm not 100% sure of the impact of just deleting all the 4.0 references; that needs to be considered.

We cannot delete the 3.5 references like

https://github.com/microsoft/msbuild/blob/3453beee039fb6f5ccc54ac783ebeced31fec472/src/Tasks/Microsoft.Common.tasks#L39

They're needed for asset compat on old projects. But they should be conditioned out on .NET Core, which they currently are not.

@rainersigwald rainersigwald added the needs-design Requires discussion with the dev team before attempting a fix. label Mar 23, 2020
@rainersigwald rainersigwald added this to the Backlog milestone Mar 23, 2020
@Nirmal4G
Copy link
Contributor

Nirmal4G commented Jun 13, 2020

If we make Core SDK (#1686) for the common targets, it might be safe to clean up all workarounds and back-compat till v15!

Can the following be removed too? As you said $(MSBuildAssemblyVersion) will not be empty. These code paths will never hit.

<PropertyGroup Condition="'$(MSBuildAssemblyVersion)' == '' and ('$(VisualStudioVersion)' != '' and '$(VisualStudioVersion)' &gt;= '12.0')">

<!-- If building using 4.X MSBuild, we want to act like this project is TV 4.0, so override
the custom extensibility target locations with the hard-coded 4.0 equivalent. -->
<PropertyGroup Condition="'$(MSBuildAssemblyVersion)' == ''">
<CustomBeforeMicrosoftCommonProps Condition="'$(CustomBeforeMicrosoftCommonProps)'==''">$(MSBuildExtensionsPath)\v4.0\Custom.Before.$(MSBuildThisFile)</CustomBeforeMicrosoftCommonProps>
<CustomAfterMicrosoftCommonProps Condition="'$(CustomAfterMicrosoftCommonProps)'==''">$(MSBuildExtensionsPath)\v4.0\Custom.After.$(MSBuildThisFile)</CustomAfterMicrosoftCommonProps>
</PropertyGroup>

<Import Project="$(MSBuildExtensionsPath)\4.0\Microsoft.Common.props" Condition="'$(MSBuildAssemblyVersion)' == '' and Exists('$(MSBuildExtensionsPath)\4.0\Microsoft.Common.props')" />

We could also remove xmlns as we already removed $(MSBuildAllProjects) (thus the min MSBuild version will be v16)!

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. triaged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants