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

Some MonoTargetsTasks project references are not removed during source build #69460

Closed
lbussell opened this issue May 17, 2022 · 4 comments · Fixed by #71691
Closed

Some MonoTargetsTasks project references are not removed during source build #69460

lbussell opened this issue May 17, 2022 · 4 comments · Fixed by #71691
Labels
area-Infrastructure-mono source-build Issues relating to dotnet/source-build
Milestone

Comments

@lbussell
Copy link
Contributor

lbussell commented May 17, 2022

We are seeing a new prebuilt package reported in source-build, Microsoft.DotNet.CilStrip.Sources.7.0.0-beta.22214.1.

It seems like AssemblyStripper.csproj is being picked up by the **/*.csproj pattern in tasks.proj and it is referencing the prebuilt:

<ItemGroup>
<ProjectReference Include="$(MSBuildThisFileDirectory)**\*.csproj" />
<!-- These projects do not need to be built during source-build. -->
<!-- For example, they may take dependencies on pre-built packages that aren't build-from-source. e.g. 'Microsoft.DotNet.CilStrip.Sources' -->
<ProjectReference Remove="MonoTargetsTasks\MonoTargetsTasks.csproj"
Condition="'$(DotNetBuildFromSource)' == 'true'" />
</ItemGroup>

This target should instead ignore all .csproj files under MonoTargetsTasks/.

@ghost ghost added the untriaged New issue has not been triaged by the area owner label May 17, 2022
@dotnet-issue-labeler dotnet-issue-labeler bot added area-Infrastructure-libraries and removed untriaged New issue has not been triaged by the area owner labels May 17, 2022
@ghost
Copy link

ghost commented May 17, 2022

Tagging subscribers to this area: @dotnet/area-infrastructure-libraries
See info in area-owners.md if you want to be subscribed.

Issue Details

We are seeing a new prebuilt package reported in source-build, Microsoft.DotNet.CilStrip.Sources.7.0.0-beta.22214.1.

It seems like AssemblyStripper.csproj is being picked up by the **/*.csproj pattern in tasks.proj and it is referencing the prebuilt:

<ItemGroup>
<ProjectReference Include="$(MSBuildThisFileDirectory)**\*.csproj" />
<!-- These projects do not need to be built during source-build. -->
<!-- For example, they may take dependencies on pre-built packages that aren't build-from-source. e.g. 'Microsoft.DotNet.CilStrip.Sources' -->
<ProjectReference Remove="MonoTargetsTasks\MonoTargetsTasks.csproj"
Condition="'$(DotNetBuildFromSource)' == 'true'" />
</ItemGroup>

It seems like this target should instead ignore all .csproj files under MonoTargetsTasks/.

Author: lbussell
Assignees: -
Labels:

area-Infrastructure-libraries

Milestone: -

@lbussell lbussell changed the title Some MonoTargetsTasks project references are not being removed during source build Some MonoTargetsTasks project references are not removed during source build May 17, 2022
@ViktorHofer ViktorHofer added the source-build Issues relating to dotnet/source-build label May 18, 2022
@ViktorHofer ViktorHofer added this to the 7.0.0 milestone May 18, 2022
@ghost
Copy link

ghost commented May 18, 2022

Tagging subscribers to this area: @directhex
See info in area-owners.md if you want to be subscribed.

Issue Details

We are seeing a new prebuilt package reported in source-build, Microsoft.DotNet.CilStrip.Sources.7.0.0-beta.22214.1.

It seems like AssemblyStripper.csproj is being picked up by the **/*.csproj pattern in tasks.proj and it is referencing the prebuilt:

<ItemGroup>
<ProjectReference Include="$(MSBuildThisFileDirectory)**\*.csproj" />
<!-- These projects do not need to be built during source-build. -->
<!-- For example, they may take dependencies on pre-built packages that aren't build-from-source. e.g. 'Microsoft.DotNet.CilStrip.Sources' -->
<ProjectReference Remove="MonoTargetsTasks\MonoTargetsTasks.csproj"
Condition="'$(DotNetBuildFromSource)' == 'true'" />
</ItemGroup>

This target should instead ignore all .csproj files under MonoTargetsTasks/.

Author: lbussell
Assignees: -
Labels:

source-build, area-Infrastructure-mono

Milestone: 7.0.0

@ericstj ericstj added the untriaged New issue has not been triaged by the area owner label May 18, 2022
@ericstj
Copy link
Member

ericstj commented May 18, 2022

cc @lambdageek @radical per #59720

It's a bit ironic that this "source" package is treated as a "prebuilt". I wonder if this component is needed for source build or not. If not then adding to the remove as @lbussell suggests would be the fix:

<ProjectReference Remove="MonoTargetsTasks\MonoTargetsTasks.csproj;
                          MonoTargetsTasks\ILStrip\AssemblyStripper\AssemblyStripper.csproj" 
                     Condition="'$(DotNetBuildFromSource)' == 'true'" />

@eerhardt
Copy link
Member

I don't believe any of the Mono workloads tasks are needed for source-build. So I think not building AssemblyStripper during source-build makes sense.

See also #60315.

@jeffschwMSFT jeffschwMSFT removed the untriaged New issue has not been triaged by the area owner label May 18, 2022
@MichaelSimons MichaelSimons moved this to Blocked in .NET Source Build Jul 5, 2022
@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Jul 6, 2022
Repository owner moved this from Blocked to Done in .NET Source Build Jul 6, 2022
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Jul 6, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Aug 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-Infrastructure-mono source-build Issues relating to dotnet/source-build
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

5 participants