-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Respond to ProduceReferenceAssembly default changing to true #31598
Respond to ProduceReferenceAssembly default changing to true #31598
Conversation
I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label. |
[InlineData("net7.0", ".fsproj")] | ||
[InlineData(ToolsetInfo.CurrentTargetFramework, ".csproj")] | ||
[InlineData(ToolsetInfo.CurrentTargetFramework, ".fsproj")] | ||
public void It_produces_ref_assembly_for_all_frameworks(string targetFramework, string extension) |
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.
The fixes here address the failures that led to dotnet/msbuild#8131
src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildANetCoreApp.cs
Outdated
Show resolved
Hide resolved
32fbc35
to
4549367
Compare
…0412.2 Microsoft.SourceBuild.Intermediate.msbuild , Microsoft.Build , Microsoft.Build.Localization From Version 17.7.0-preview-23212-01 -> To Version 17.7.0-preview-23212-02
.NET projects now produce a reference assembly by default, per a change in MSBuild's common targets. This commit updates a test on the SDK side in response to that change.
4549367
to
9ded50a
Compare
This is failing due to test sdk/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildANetCoreApp.cs Lines 871 to 913 in 2d01755
The test fails when I'm going to need some help understanding the test failure here as it passes on my machine. I'm pretty sure my environment is set up correctly as the test I did change in this PR also passes on my machine ( Is there some way to get a |
876e5e9
to
c234603
Compare
Latest build is failing with:
This failure seems intermittent. Could xUnit be running these in parallel? I can't see why this wouldn't have failed before my changes though. |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Ah, I see, the truncated-with-hash file name needs to include an identifier for the leg of a multi-leg theory that is unique. Fixed in 039025f. |
@@ -239,11 +239,6 @@ Copyright (c) .NET Foundation. All rights reserved. | |||
<AppendTargetFrameworkToOutputPath Condition="'$(AppendTargetFrameworkToOutputPath)' == ''">true</AppendTargetFrameworkToOutputPath> | |||
</PropertyGroup> | |||
|
|||
<PropertyGroup> | |||
<ProduceReferenceAssembly Condition="'$(ProduceReferenceAssembly)' == '' and '$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), 5.0)) and ('$(ProduceOnlyReferenceAssembly)' != 'true') and '$(MSBuildProjectExtension)' != '.fsproj'" >true</ProduceReferenceAssembly> | |||
<ProduceReferenceAssembly Condition="'$(ProduceReferenceAssembly)' == '' and '$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), 7.0)) and ('$(ProduceOnlyReferenceAssembly)' != 'true') and '$(MSBuildProjectExtension)' == '.fsproj'" >true</ProduceReferenceAssembly> |
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.
Who from F# do we need to vet this?
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.
@vzarytovskii is the go-to.
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.
I don't think any action is needed from us? Now it will set it to true for all projects when using .net8?
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.
Note that, combined with the MS Build change, ref assemblies will be produced for all F# projects when using VS 17.7, irrespective of the target framework.
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.
Yeah, I think it should be fine, and leaves us window to make changes, if needed, before net8 release.
@dotnet/domestic-cat can we land this? |
…31598)" This reverts commit d2e470b, reversing changes made to 377caa7. Follows the MSBuild revert in dotnet/msbuild#8571.
Fixes dotnet/msbuild#8133
Relates to dotnet/msbuild#8571
We have changed the default for all .NET projects such that
ProduceReferenceAssembly
istrue
by default. This change requires updates to the SDK, which are included in this PR.