-
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
Roll forward self-contained apps to latest patch version #2085
Roll forward self-contained apps to latest patch version #2085
Conversation
6eb1c43
to
bf9a4ef
Compare
// (1) different from the fixed framework-dependent defaults (1.0.5, 1.1.2, 2.0.0) | ||
// (2) currently available on nuget.org | ||
// | ||
// This allows bumping the versions before builds without causing tests to fail. |
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.
We've lost this property again. Note that we will need to bump this for security updates before they are available on nuget.org or even to this repo from anywhere.
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 logic we had before felt too complex to me, and was never going to test the actual roll-forward behavior (since it always used a fake version to roll forward to when testing). My thinking was that we could set LatestNetCorePatchVersion
as a way to override this in tests. Thinking about it more now, I'm not sure how well that would work.
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.
@nguerrera I've added properties that allow the latest patch for each minor version of .NET Core to be overridden. We could use these to override this from tests like we were doing before, but I think a better solution would be to set the latest version in the CLI via BundledVersions.props.
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.
👍 Love the BundledVersions approach :)
@eerhardt Is it supported to do {
"runtimeOptions": {}
} Investigating the test failures in this PR revealed that there are tests (eg This PR rolls the runtime for self-contained apps forward to 2.0.6, where previously 2.0.0 would have been used. So it seems like something may have changed in the runtime here. |
…n would be selected with current settings
…atch between restore and subsequent operations
…erridden via properties
I believe that will try to run the app as "self-contained" - meaning all the framework assemblies (especially the It feels like a scenario we shouldn't try to optimize for. @steveharter would know more. |
78582b0
to
84f50b5
Compare
@steveharter @eerhardt We tried to isolate a repro for the issue on Mac OS I was asking about, and it looks like it was a regression in the muxer or host that has since been fixed in newer builds. I can provide more details if you're interested. |
As @eerhardt said the runtimeconfig.json with empty runtimeOptions is expected for a self-contained application because there is no framework name or version to specify. @dsplaisted I'm not aware of any Mac issues that were fixed around the muxer\host except for a case where you could have a date-mismatched hostfxr and hostpolicy libraries, but that shouldn't be the case for self-contained provided both are rolled-forward together (I assume that we roll both of these libraries together here) |
restoredPlatformLibraryVersion, | ||
expectedPlatformPackageVersion)); | ||
WriteMetadata(MetadataKeys.Severity, nameof(LogLevel.Error)); | ||
} |
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 like to see this refactored a bit so that I can quickly read WriteAdditionalLogMessages and see which issues these are. Right now it's a little buried that all of this is for one specific additional message.
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.
@nguerrera I refactored this:
private void WriteAdditionalLogMessages()
{
WriteUnsupportedRuntimeIdentifierMessageIfNecessary();
WriteMismatchedPlatformPackageVersionMessageIfNecessary();
}
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.
Thanks. 👍
@steveharter This was a self-contained app, but in this scenario it wasn't published, just built and run from the output folder. The output folder ends up with an The issue occurred when running The issue stopped repro-ing when we updated to version 2.1.300-preview3-008414 of the .NET CLI. |
When you <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.0</TargetFramework>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
</PropertyGroup>
</Project> However, the difference here is is we don't use the muxer sdk/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets Lines 408 to 411 in 935ac5f
|
Yes, I banged my head against the wall for a bit trying to figure out why |
@dotnet-bot test Ubuntu16.04 Debug |
@dsplaisted the Mac malloc issue you mentioned is very likely the issue https://github.com/dotnet/corefx/issues/27571 with date-mismatched hostfxr and hostpolicy. More than likely the hostfxr was being loaded locally and hostpolicy loaded globally. In either case, that scenario is supported and now fixed. |
@steveharter Thanks, that sounds like it explains it. |
@MattGertz FYI for tell mode |
…130.1 (#2085) [main] Update dependencies from dotnet/arcade
The project was restored using Microsoft.NETCore.App version 2.0.0, but with current settings, version 2.0.6 would be used instead. To resolve this issue, make sure the same settings are used for restore and for subsequent operations such as build or publish. Typically this issue can occur if the RuntimeIdentifier property is set during build or publish but not during restore.
Related: #1570
@nguerrera @livarcocc @dotnet/dotnet-cli for review