Skip to content

Default web templates to net5.0 #19860

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

Closed

Conversation

ViktorHofer
Copy link
Member

@ViktorHofer ViktorHofer commented Mar 14, 2020

Updating the web templates to default to net5.0 instead of netcoreapp5.0.
Contributes towards dotnet/sdk#10756.

cc @anurse @Pilchie

This is required for preview2 which closes down EOW.

@ViktorHofer ViktorHofer force-pushed the TemplateNet50Update branch 2 times, most recently from 2193024 to 0860039 Compare March 15, 2020 12:07
@ViktorHofer ViktorHofer mentioned this pull request Mar 15, 2020
10 tasks
@ViktorHofer ViktorHofer force-pushed the TemplateNet50Update branch from 0860039 to f45f4e3 Compare March 15, 2020 13:23
@mkArtakMSFT mkArtakMSFT requested a review from pranavkm March 15, 2020 18:41
@mkArtakMSFT mkArtakMSFT added the area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates label Mar 15, 2020
@mkArtakMSFT
Copy link
Contributor

@pranavkm can you please review this early in the week (Monday, Tuesday)? We need to get this in early in the week.

Copy link
Contributor

@pranavkm pranavkm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The template change looks alright to me, but I'd prefer if someone from @dotnet/aspnet-build signs off on the other changes in the PR

@ViktorHofer
Copy link
Member Author

I don't understand why builds are failing with requiring a newer msbuild even though I didn't update the global.json's sdk value. Just updating the dotnet value should only impact which version is bootstrapped but not which minimum version is required by desktop msbuild...

@ViktorHofer ViktorHofer force-pushed the TemplateNet50Update branch from a8f6f61 to 4472da1 Compare March 16, 2020 14:50
@@ -1,3 +1,3 @@
@ECHO OFF
SET RepoRoot=%~dp0..\..
%RepoRoot%\build.cmd -projects %~dp0*\*.*proj "/p:EnforceE2ETestPrerequisites=true" %*
%RepoRoot%\build.cmd -projects %~dp0*\*.*proj -ForceCoreMsbuild "/p:EnforceE2ETestPrerequisites=true" %*
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is -ForceCoreMsbuild needed?

@ViktorHofer
Copy link
Member Author

@dougbu thanks for reviewing this. It would great if you can help me with #19860 (comment).

Copy link
Contributor

@dougbu dougbu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just updating the dotnet value should only impact which version is bootstrapped but not which minimum version is required by desktop msbuild...

But the CI build will use the bootstrapped SDK and that requires a newer version of VS.

What surprises me is the lack of 16.5 on the Windows agents. @MattGal shouldn't the BuildPool.Server.Amd64.VS2019.BT.Open agents be more up-to-date?

@MattGal
Copy link
Member

MattGal commented Mar 16, 2020

Just updating the dotnet value should only impact which version is bootstrapped but not which minimum version is required by desktop msbuild...

But the CI build will use the bootstrapped SDK and that requires a newer version of VS.

What surprises me is the lack of 16.5 on the Windows agents. @MattGal shouldn't the BuildPool.Server.Amd64.VS2019.BT.Open agents be more up-to-date?

Latest public version of VS 2019 is 16.4.6. The VS 2019 BT queues currently have 16.4.3. Since that's not a preview queue, until some time after that's publicly released I don't think they should be more up-to-date as that would require running a Preview SKU.

(2019 "Pre" queues have 16.5.0 Preview 2.0)

@ViktorHofer
Copy link
Member Author

Thanks Matt for the infos. I pinged @jaredpar who will update the RoslynTools.MSBuild package (which contains an xcopyable verison of MSBuild) to 16.5.0 preview. This will allow us to require a newer vs version in global.json which will fix the current failures.

@dougbu
Copy link
Contributor

dougbu commented Mar 16, 2020

I think another option may be to change the .azure/pipelines/jobs/default-build.yaml file to switch the pools to BuildPool.Server.Amd64.VS2019.BT.Pre.Open and BuildPool.Server.Amd64.VS2019.BT.Pre. (Did I get those names right @MattGal?)

@MattGal
Copy link
Member

MattGal commented Mar 16, 2020

I think another option may be to change the .azure/pipelines/jobs/default-build.yaml file to switch the pools to BuildPool.Server.Amd64.VS2019.BT.Pre.Open and BuildPool.Server.Amd64.VS2019.BT.Pre. (Did I get those names right @MattGal?)

Neither of those queues exist. Basically we only started having these before we'd figured out how to properly automatically activate VS on our machines, and the time-bomb prompts were causing some builds to hang. We've solved the activation issue for some time, so the only preview VSes we have are Enterprise Preview.

You could try these two:

buildpool.server.amd64.vs2019.pre
buildpool.server.amd64.vs2019.pre.open

But if it's at all possible (we recognize that it isn't always) you should bootstrap such pre-release dependencies as part of your builds as Viktor mentions. There are other benefits to this as well, such as making OSS contributors able to build and run without having to install prerelease VS themselves.

@ViktorHofer
Copy link
Member Author

Unfortunately that didn't solve the issue as the RoslynTools.MSBuild package doesn't contain VC++ assets. @MattGal 16.5 was released yesterday, when will the queues be updated? Regarding the Pre queues, I don't see a BT one for pre.

@MattGal
Copy link
Member

MattGal commented Mar 17, 2020

Unfortunately that didn't solve the issue as the RoslynTools.MSBuild package doesn't contain VC++ assets. @MattGal 16.5 was released yesterday, when will the queues be updated? Regarding the Pre queues, I don't see a BT one for pre.

I'm checking in with DDFUN folks; there's a PR out that updates these images right now but I'm uncertain whether it picks up the latest VSes. (We do not, and have not had preview queues for buildtools sku. Not sure why people are suddenly asking for it?)

@jaredpar
Copy link
Member

@MattGal is this also going to silently roll runtime repositories native toolset forward again? If we're just updating the images in place it seems like we're going to be doing this.

@MattGal
Copy link
Member

MattGal commented Mar 17, 2020

@MattGal is this also going to silently roll runtime repositories native toolset forward again? If we're just updating the images in place it seems like we're going to be doing this.

Yes, except for the silent part (there will be a partners mail before such a rollout). I believe this will also bring the updated CMake that doesn't produce the warnings that were causing issues. There are options to the buildpool.windows machines; you can also use the (silently upgraded whenever they want as well) hosted-build machines, or bootstrap all your build dependencies at your discretion.

@jaredpar
Copy link
Member

@MattGal

bootstrap all your build dependencies at your discretion.

This has been discussed endlessly and every time the conclusion is that this is not a viable option for native toolsets.

Yes, except for the silent part (there will be a partners mail before such a rollout).

Are we testing it? The official builds for dotnet/runtime have been on the floor for almost a week now due to an untested arcade publishing changes. Just now as we're getting past that we're going to get another untested change to the infrastructure. The expectation here, given the history, should be that this will cause further instability.

We've proposed solutions to this problem, specifically dotnet/arcade#5018, but we're getting no traction on the discussion.

@jkotas, @jkoritzinsky as FYI that this is likely coming our way.

@MattGal
Copy link
Member

MattGal commented Mar 17, 2020

Are we testing it? The official builds for dotnet/runtime have been on the floor for almost a week now due to an untested arcade publishing changes.

Yes, we can absolutely run a set of your builds through the staging environment before this rolls out. I'll coordinate it with @ilyas1974 once the changes are made and in (hopefully tomorrow)

@v-joshli
Copy link

Hello,

Casey has completed the VS2019 images. The names are:
Helix-Client-Enterprise-RS5-VS2019BuildTools-03-17-2020
Helix-Client-Enterprise-RS5-VS2019Enterprise-03-17-2020
Helix-Server-DataCenter-RS5-VS2019BuildTools-03-17-2020
Helix-Server-Datacenter-RS5-VS2019Enterprise-03-17-2020

Thanks,
Josh

@wtgodbe
Copy link
Member

wtgodbe commented Apr 8, 2020

Would be because we reference that project directly, and it targets netcoreapp5.0:

<ProjectReference Include="$(RepoRoot)src\Hosting\Server.IntegrationTesting\src\Microsoft.AspNetCore.Server.IntegrationTesting.csproj" />

Can we get away with multitargeting either the projectTemplate test project, or Microsoft.AspNetCore.Server.IntegrationTesting?

@wtgodbe
Copy link
Member

wtgodbe commented Apr 8, 2020

@dougbu am I reading this thread correctly, that the issue I mentioned in the comment above was supposed to be fixed by updating the machine pool to one w/ a VS new enough to have a Nuget that knows about net50?

@Pilchie
Copy link
Member

Pilchie commented Apr 8, 2020

fixed by updating the machine pool to one w/ a VS new enough to have a Nuget that knows about net50?

Actually, an SDK with a new enough NuGet, but that SDK required a newer desktop msbuild (which comes with VS). The updated machine pool that was rolled out yesterday was supposed to unblock this.

@wtgodbe
Copy link
Member

wtgodbe commented Apr 8, 2020

The updated machine pool that was rolled out yesterday was supposed to unblock this.

Was there a thread/issue about that pool? Want to make sure we're using the right one(s) in this PR

@wtgodbe
Copy link
Member

wtgodbe commented Apr 8, 2020

Hmm, we are definitely using the machines that have been updated to VS 16.5.1:

${{ if eq(parameters.agentOs, 'Windows') }}:
${{ if eq(variables['System.TeamProject'], 'public') }}:
name: NetCorePublic-Pool
${{ if ne(parameters.isTestingJob, true) }}:
# Visual Studio Build Tools
queue: BuildPool.Server.Amd64.VS2019.BT.Open
${{ if eq(parameters.isTestingJob, true) }}:
# Visual Studio Enterprise - contains some stuff, like SQL Server and IIS Express, that we use for testing
queue: BuildPool.Server.Amd64.VS2019.Open
${{ if eq(variables['System.TeamProject'], 'internal') }}:
name: NetCoreInternal-Pool
# Visual Studio Enterprise - contains some stuff, like SQL Server and IIS Express, that we use for testing
queue: BuildPool.Server.Amd64.VS2019

@Pilchie
Copy link
Member

Pilchie commented Apr 8, 2020

@markwilkie @jaredpar any ideas?

@MattGal
Copy link
Member

MattGal commented Apr 8, 2020

@markwilkie @jaredpar any ideas?

I'll take a look too just in case those guys are busy

@markwilkie
Copy link
Member

Sorry, beyond confirming that the following queues have been updated to 16.5.1 on Monday, I don't have much insight.

BuildPool.Server.Amd64.VS2019.BT.Open
BuildPool.Server.Amd64.VS2019.Open
BuildPool.Server.Amd64.VS2019
Windows.Server.Amd64.VS2019.BT.Open
BuildPool.Server.Amd64.VS2019.BT

@wtgodbe
Copy link
Member

wtgodbe commented Apr 8, 2020

Do we know what version of Nuget.Client first knew about the net50 TFM? I'm trying to confirm that the SDK we're using actually does have a new enough Nuget

@MattGal
Copy link
Member

MattGal commented Apr 8, 2020

I confirmed the builds are running on agents using the BuildPool.Server.Amd64.VS2019.BT.Open/versions/2020.0403.135905 image; whatever version came with 16.5.1 buildtools is on the machine. I'll poke about a bit more but I think this may just be expecting VS 16.5.1 to have something it might not have in box.

@wtgodbe
Copy link
Member

wtgodbe commented Apr 8, 2020

Newer SDK didn't help. I don't know exactly what the requirements are here - a specific version of Nuget/Msbuild/something else on the machine/in the SDK? It appears some combination of those things is required to allow us to reference a netcoreapp5.0 project from a net50 project - @jaredpar do you know?

@Pilchie
Copy link
Member

Pilchie commented Apr 8, 2020

Also tagging @ericstj.

@ericstj
Copy link
Member

ericstj commented Apr 9, 2020

So I believe this failure is in nuget restore. From the logs it appears to be using desktop MSBuild from VS. I believe you need to update the version of VS on the build machine to have a new nuget that understands the TFM. Has that been done?

@dougbu
Copy link
Contributor

dougbu commented Apr 9, 2020

I believe you need to update the version of VS on the build machine to have a new nuget that understands the TFM. Has that been done?

Well, we thought so… 😈

I would add that from what @wtgodbe and @MattGal are seeing / saying, VS 16.5.1 isn't new enough ☹️

@ericstj
Copy link
Member

ericstj commented Apr 9, 2020

You need the VS that has our preview2 bits inserted i think.

@Pilchie
Copy link
Member

Pilchie commented Apr 9, 2020 via email

@dougbu
Copy link
Contributor

dougbu commented Apr 9, 2020

I think our main option here is to confirm 6.5.1 has an older msbuild or nuget than we need then switch to BuildPool.Server.Amd64.VS2019.Pre queues and similar.

@MattGal is there an updated list of queues available somewhere? If not, are these the correct names of preview queues that are similar to what we tend to use?

  • BuildPool.Server.Amd64.VS2019.BT.Pre
  • BuildPool.Server.Amd64.VS2019.BT.Pre.Open
  • BuildPool.Server.Amd64.VS2019.Pre
  • BuildPool.Server.Amd64.VS2019.Pre.Open

@MattGal
Copy link
Member

MattGal commented Apr 9, 2020

I think our main option here is to confirm 6.5.1 has an older msbuild or nuget than we need then switch to BuildPool.Server.Amd64.VS2019.Pre queues and similar.

@MattGal is there an updated list of queues available somewhere? If not, are these the correct names of preview queues that are similar to what we tend to use?

  • BuildPool.Server.Amd64.VS2019.BT.Pre
  • BuildPool.Server.Amd64.VS2019.BT.Pre.Open
  • BuildPool.Server.Amd64.VS2019.Pre
  • BuildPool.Server.Amd64.VS2019.Pre.Open

Some notes:

@wtgodbe
Copy link
Member

wtgodbe commented Apr 9, 2020

To reiterate, these PR builds are running on BuildPool.Server.Amd64.VS2019.BT.Open and BuildPool.Server.Amd64.VS2019.Open

@dougbu
Copy link
Contributor

dougbu commented Apr 9, 2020

Correct @wtgodbe and those queues use VS 16.5.1. Unfortunately, if we switched to use BuildPool.Server.Amd64.VS2019.Pre and BuildPool.Server.Amd64.VS2019.Pre.Open for all Windows jobs i.e. ignored BuildTools options, we'd be moving to a version of VS from February. Unless there's a hack we haven't tried that works around the msbuild / nuget gaps, we need newer .Pre agents.

@markwilkie
Copy link
Member

We're hoping to get the .pre queues updated with latest by a week from Wednesday. (the 22nd) From then on, we'll be keeping more up to date, as well as providing a scouting queue.

@Pilchie
Copy link
Member

Pilchie commented Apr 10, 2020

Why closed?

@dougbu
Copy link
Contributor

dougbu commented Apr 10, 2020

Sorry I missed your question @Pilchie. Closing this was a side-effect of removing the underlying (dead) preview2 branch. I'll move it to target 'master' soon.

@Pilchie
Copy link
Member

Pilchie commented Apr 10, 2020

Let's rather make it Preview3 as that's what we're targeting for the change

@dougbu
Copy link
Contributor

dougbu commented Apr 11, 2020

See #20748 for the future of this work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates
Projects
None yet
Development

Successfully merging this pull request may close these issues.