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

Drop netcoreapp3.1, add net7.0 support #32814

Merged
merged 10 commits into from
Jan 13, 2023
Merged

Drop netcoreapp3.1, add net7.0 support #32814

merged 10 commits into from
Jan 13, 2023

Conversation

heaths
Copy link
Member

@heaths heaths commented Dec 1, 2022

Resolves #32596. With netcoreapp3.1 falling out of support soon, we're upgrading to net7.0, net6.0, and, on Windows, net461.

@heaths
Copy link
Member Author

heaths commented Dec 2, 2022

If I downgrade global.json and our RequiredTargetFrameworks to just "net6.0" (drop "net7.0"), Microsoft.Build.Traversal works correctly. Under net7.0,

  1. It doesn't pass the -bl switch to inner builds.
  2. It's not passing other properties because it's discovering all track 2 packages to restore and build.
  3. Given that, it must clearly not be passing EnableSourceLink=true to inner builds. Hard to say for sure since I can't get a decent log.

@ericstj
Copy link

ericstj commented Dec 2, 2022

I found the error comes from here:
https://github.com/dotnet/sourcelink/blob/48e002e14a97800c0d6acf24a55357699c9d72a4/src/Microsoft.Build.Tasks.Git/GitDataReader/GitRepository.cs#L121-L125

Just a brief look at where repositoryformatversion comes from, it seems to come from .git/config file, so might be specific to what version of GIT you use to clone the repo and that might be disagreeing with what version of microsoft.build.tasks.git package you are using. That's the only lead I have. @tmat might have some better ideas.

@heaths
Copy link
Member Author

heaths commented Dec 2, 2022

@ericstj, thanks, but that's only a manifestation of the actual problem: microsoft/MSBuildSdks#412

We've been using sparse checkouts for a while but were passing /p:EnableSourceLink=false wherever we did and had no issues. Seems under net7.0, Microsoft.Build.Traversal is not passing properties (or loggers, however that works) to inner builds when calling dotnet test (dotnet build works as it did before). It's being looked into.

@heaths
Copy link
Member Author

heaths commented Dec 2, 2022

@rainersigwald found this was caused by microsoft/vstest#4014

Copy link
Member

@jsquire jsquire left a comment

Choose a reason for hiding this comment

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

Changes themselves look good to me.

@heaths
Copy link
Member Author

heaths commented Dec 5, 2022

Per offline discussion, we're going to wait until microsoft/vstest#4014 is released.

Resolves Azure#32596. With netcoreapp3.1 falling out of support soon, we're upgrading to net7.0, net6.0, and, on Windows, net461.
@dw511214992
Copy link
Member

dw511214992 commented Jan 16, 2023

Hi @heaths This PR breaks the command dotnet new azsdkdpg --name Azure.XXX.Contosoz --clientName Contosoz --groupName XXX --serviceDirectory contoso --force to generate a valid template. For example, there is a generated file named Azure.XXX..csproj with two dots. It blocks all sdk automation pipeline for cadl. I think we need a fix in the tool dotnet new azsdkdpg.

I have created an issue to track it: #33515

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move required TFMs to net7.0, net6.0
9 participants