-
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
Update to a version of NuGet that understand .NET Standard and .NET Core 2.0 #935
Conversation
build/DependencyVersions.props
Outdated
@@ -6,7 +6,8 @@ | |||
<MsBuildPackagesVersion>0.1.0-preview-00028-160627</MsBuildPackagesVersion> | |||
<DependencyModelVersion>1.0.3</DependencyModelVersion> | |||
<PlatformAbstractionsVersion>1.0.3</PlatformAbstractionsVersion> | |||
<NuGetVersion>4.0.0-rtm-2323</NuGetVersion> | |||
<!-- non-official NuGet build taken from https://github.com/nuget/nuget.client/tree/release-4.1.0-netstandard2.0 to contain "2.0" TFMs --> |
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.
Do we need this comment? It is bound to get out of date as this version is bumped. What is non-official about it?
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.
This build is from a branch that isn't an official NuGet dev branch. It is branched off of the official branch and then @ericstj made a change do do the netcoreapp2.0 => netstandard2.0 mapping.
The point of the comment is to tell people that we are using basically a "private" NuGet build and to not take a new NuGet build that doesn't have the netstandard2.0 mapping.
Maybe we could add a test that restoring a netcoreapp2.0 app that references netstandard2.0 works? That would ensure we don't take a "bad" NuGet build.
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.
OK, please help me keep an eye on future updates so that when this version becomes official, we remove the comment.
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.
When are we getting off a "private" branch and on to a proper vNext branch for nuget?
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.
And, yes, please add a test.
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 asked the NuGet team multiple times.
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 think we can remove the comment. @emgarten is getting the nuget changes merged into the 15.3 VS branch today
There are assembly loading failures on core. I think you may need to update the CLI we use to build and test as well. |
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.
Waiting for tests to pass
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.
There is an official build now with netstandard2.0 support. Use 4.3.0-beta1-2342
:) You probably have to put that in CLI first, then integrate CLI version bump here because the issue with tasks loading different nuget than CLI is still not fixed in CLI. |
@nguerrera alright, I'll work on integrating it there also. Can we update this PR to target the new version? I'm trying to make sure this all goes in today. |
CLI PR is here dotnet/cli#5912 for reference |
@livarcocc @piotrpMSFT It looks like this is failing because the master branch of the CLI doesn't have the 1.1.1 shared framework. Can you update it to include 1.1.1? |
2.0.0-alpha-5212 |
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.
@livarcocc @piotrpMSFT - looks like we got a bad change in the CLI. We are no longer padding our commit counts. We should fix that.
…, as the 2.0 CLI no longer does this
It looks like the Ubuntu builds are failing due to NuGet/Home#4424. @eerhardt, is there any workaround we can apply? |
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.
NuGet version looks good
…d as executable See NuGet/Home#4424
string selfContainedExecutableFullPath = Path.Combine(outputDirectory.FullName, selfContainedExecutable); | ||
|
||
// Workaround for https://github.com/NuGet/Home/issues/4424 | ||
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) |
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.
Can we put this in a common spot in the test 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.
Done, thanks
@@ -131,6 +131,9 @@ Copyright (c) .NET Foundation. All rights reserved. | |||
|
|||
<Message Text="CrossgenCommandline: $(CrossgenCommandline)"/> | |||
|
|||
<!-- Workaround for https://github.com/NuGet/Home/issues/4424 --> | |||
<Exec Command="chmod 755 $(CrossgenExe)" Condition="'$(OS)' != 'Windows_NT'"/> |
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.
Can we log a tracking bug to take this out when the underlying issue is fixed? That way we remember to remove it.
In general, this is bad in our product because we don't know if we have access to do this or not.
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.
@@ -0,0 +1,26 @@ | |||
using FluentAssertions; |
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.
(nit) copyright.
FYI, this breaks the build on RHEL:
|
@omajid and @dsplaisted, The CLI's RHEL has been broken for a while now. @piotrpMSFT has a PR out to fix it dotnet/cli#5945. The issue is there is no RHEL CLI build for version When the CLI fixes the RHEL problem and has a new build out, we should update the version number here to a fully completed CLI build. BTW - @omajid, maybe you know why this is happening. On our RHEL docker container (and only in the RHEL container), we are seeing
The docker container we are using is: |
The Dockerfile is in an private repo. FWIW we have plans to move this to the open. |
Here's the dockerfile:
|
@ellismg - I see you added the last line in that dockerfile:
Do you know why executing
|
@eerhardt I understand the context, I'll take a look. I would have expected this would have fixed it... |
I just built/tested the dockerfile and I can not reproduce this with plain git:
When I run the above, I just get "1" as the output and no error messages.
I also tried with |
The problem is something specific to how MSBuild Exec stuff worked inside the container (which sort of meshes with what I remember from back when I added that line in the to the dockerfile). Like @omajid I don't repo the issue inside the container when running straight git commands, but I do see it when I invoke MSBuild. I'm continuing to investigate and hope to have a resolution later today. |
MSBuild essentially generates a file that looks like this, which it then invokes with #!/bin/sh (the logic is a little more convoluted): #!/bin/sh
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
git rev-list --count HEAD If you run that inside the container, you see the output you might expect:
Interestingly enough, in the container I see this:
Once I run Maybe the image we have on docker hub doesn't match that Dockerfile for some reason? @MichaelSimons |
Note that previously we we were managing this stuff without @MichaelSimons's oversite we didn't have great operational hygine on ensuring the dockerfiles were always checked in somewhere sane and published from that location. So I could totally imagine that the image that made it's way to dockerhub did not match what we have in the dockerfile today. |
@ellismg Should we (MSBuild) do something else in this situation? We were trying to approximate our Windows behavior (to allow commands with high Unicode characters) but I'd totally believe we're doing it wrong . . . |
@ellismg, @eerhardt - I think I see what is happening. @eerhardt stated here that FYI the
You can clearly see the V2 version of the image added the |
Thanks so much for tracking this issue down, @ellismg @MichaelSimons.
I can update our VSTS build def. |
…906.2 (dotnet#935) - Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19456.2
This mirrors the version of NuGet that the CLI is currently using: https://github.com/dotnet/cli/blob/4a0724e13641521ed0cf39ac0b72c6d7db666795/build/DependencyVersions.props#L8-L9