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

Arcade MSBuild task packages shouldn't carry assemblies with it that are available inbox in VS / .NET SDK's msbuild #15022

Open
ViktorHofer opened this issue Aug 21, 2024 · 1 comment
Milestone

Comments

@ViktorHofer
Copy link
Member

ViktorHofer commented Aug 21, 2024

see #15018 (comment)

That's a bug in the msbuild tasks package authoring here in Arcade:

<!-- Don't include assemblies that MSBuild ships with. -->
<ItemGroup>
<PackageReference Update="Microsoft.Build" Publish="false" />
<PackageReference Update="Microsoft.Build.Framework" Publish="false" />
<PackageReference Update="Microsoft.Build.Tasks.Core" Publish="false" />
<PackageReference Update="Microsoft.Build.Utilities.Core" Publish="false" />
<PackageReference Update="Microsoft.NET.StringTools" Publish="false" />
<PackageReference Update="System.Resources.Extensions" Publish="false" />
</ItemGroup>
<!-- Don't include assemblies that are provided by the SDK, next to MSBuild. -->
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and '$(SkipSDKInboxPublishExcludes)' != 'true'">
<PackageReference Update="Newtonsoft.Json" Publish="false" />
<PackageReference Update="NuGet.Commands" Publish="false" />
<PackageReference Update="NuGet.Common" Publish="false" />
<PackageReference Update="NuGet.Configuration" Publish="false" />
<PackageReference Update="NuGet.Frameworks" Publish="false" />
<PackageReference Update="NuGet.Packaging" Publish="false" />
<PackageReference Update="NuGet.ProjectModel" Publish="false" />
<PackageReference Update="NuGet.Versioning" Publish="false" />
<PackageReference Update="System.CodeDom" Publish="false" />
<PackageReference Update="System.Security.Cryptography.ProtectedData" Publish="false" />
<PackageReference Update="System.Text.Encoding.CodePages" Publish="false" />
</ItemGroup>
<!-- Don't include assemblies that are inbox in Desktop MSBuild -->
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
<PackageReference Update="Microsoft.Bcl.AsyncInterfaces" Publish="false" />
<PackageReference Update="System.Buffers" Publish="false" />
<PackageReference Update="System.Collections.Immutable" Publish="false" />
<PackageReference Update="System.Memory" Publish="false" />
<PackageReference Update="System.Numerics.Vectors" Publish="false" />
<PackageReference Update="System.Reflection.Metadata" Publish="false" />
<PackageReference Update="System.Reflection.MetadataLoadContext" Publish="false" />
<PackageReference Update="System.Runtime.CompilerServices.Unsafe" Publish="false" />
<PackageReference Update="System.Text.Encodings.Web" Publish="false" />
<PackageReference Update="System.Text.Json" Publish="false" />
<PackageReference Update="System.Threading.Channels" Publish="false" />
<PackageReference Update="System.Threading.Tasks.Dataflow" Publish="false" />
<PackageReference Update="System.Threading.Tasks.Extensions" Publish="false" />
<PackageReference Update="System.ValueTuple" Publish="false" />
</ItemGroup>
<ItemGroup>
<!--
Update all PackageReference items to default Publish to true.
This forces the publish output to contain the dlls.
-->
<PackageReference Update="@(PackageReference)">
<Publish Condition="'%(PackageReference.Publish)' == ''">true</Publish>
<ExcludeAssets Condition="'%(PackageReference.Publish)' == 'false'">runtime</ExcludeAssets>
</PackageReference>

It only excludes direct package dependencies, not transitive ones. Unsure how to fix this, though.

@ViktorHofer ViktorHofer mentioned this issue Aug 21, 2024
1 task
@rainersigwald
Copy link
Member

I think the problem is that src\Common\Microsoft.Arcade.Common\Microsoft.Arcade.Common.csproj doesn't drag in this logic, so it's that reference to MSBuild('s dependencies) that is treated as "normal".

ViktorHofer added a commit that referenced this issue Aug 22, 2024
Remove the Microsoft.Build.* dependency nodes
from the Microsoft.Arcade.Common package.

Remove the copy of STJ in the XliffTasks package
ViktorHofer added a commit that referenced this issue Aug 23, 2024
@missymessa missymessa added this to the Arcade SDK milestone Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants