-
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
Breaking change inside v7.0.200 - MSBuild Preview version used !? #30624
Comments
@KalleOlaviNiemitalo |
still a breaking change you have not write in the release note |
I'm not sure whether there even are any release notes for differences between .NET SDK feature bands. If this breaking change were listed in https://github.com/dotnet/core/blob/main/release-notes/7.0/7.0.3/7.0.3.md#notable-changes, developers might notice it from there. But you can also target .NET 7.0.3 using .NET SDK 7.0.103, which does not include this breaking change. |
Sorry Kalle, dotnet 7.0 is a released product. Yes: you CAN implement breaking changes, but then they must be: a) documented (release notes) We can bet, that this change may be reverted ASAP a soon as Microsoft recognizes the mistake ;-) This fix can be a nice improvement on .Net 8 |
.NET SDK is not doing semver -- see https://learn.microsoft.com/en-us/dotnet/core/versions/#versioning-details. |
No Semver? That's crazy! Do I have to pin to a patch version and avoid security patches just so that I can avoid breaking the build? All the heat the sdk team are going to get for this, and it's only been out for a few hours, is a direct consequence of all consumers of the SDK (for me it is my reference to SemVer aside: which versioning system actually specifies a breaking change as the most minor possible change? |
all in all... we will see how many build pipelines worldwide are broken... 🍿 🍿 🍿 |
So if my runtime is |
One reason why my team stopped using Microsoft docker images (MS is too slow to role out security updates of the base image). As a work around you can switch to a OS base image, and install the sdk/runtime using its package manager.
|
I was thinking about sdk security patches, not OS, but that's a new sadness. Pinning If the sdk and runtime are truly a monorepo, then breaking changes should update the minor version for both of them. |
Ubuntu's own dotnet-sdk-7.0 package is still at version 7.0.102-0ubuntu1~22.10.1, doesn't have 7.0.103 yet. I think it's using source-build so it will remain in 7.0.1xx and never upgrade to any higher feature band. .NET SDK 7.0.200 is not part of the source-build release for .NET 7.0.3 (dotnet/source-build#3247). |
No, it seems it is the install-scripts. I couldn't repro directly on sdk:7.0. Here's what leads to the error for me:
|
In the meantime I'm working on some "forward" fix for my projects. UseCasebuild + pack + push (Github-Action) Old version:Option "-o" used to locate the resulting *.nupkg files for push: New versionfor SDK 7.0.200:
|
I don't want to derail this topic here, @GregorLamche, would you care to start a discussion topic on your experience? I'd like to know details and try to improve our .NET Docker offering if we are not meeting your needs. TIA. |
It's very disturbing to see
And, I was also hit by the breaking change, quite involutarily, as my global.json says 7.0.100 but |
We've been discussing the introduction of the new error and will be taking the following actions based on everyone's feedback in this (and other!) threads - THANK YOU for making your feedback known, please keep it up in the future. a) We'll downgrade the error to a warning - we think this usage pattern is harmful and can lead to builds that are harder to debug, especially when projects are multi-targeted or have differing sets of PackageReference versions. We will put this up for inclusion into next month's servicing release of the .NET SDK, which is the soonest possible ship vehicle we have for this kind of change. In the meantime, you can restore the previous behavior by changing the use of
|
We just hit this today as well. It appears to be an issue with 6.0.406 too (using MSBuild 17.5.0-preview-23061-01+040e2a90e). We were targeting 6.0.x and went to this version after it was released automatically. We've now pinned our version to 6.0.405 and we're back to using a non-prerelease version of MSBuild on our build agents. We have dozens of pipelines that will be affected by this and will need to update all of them. We had no errors at all. It was just that ViewComponents were simply not compiling, and that's how it was brought to our attention. |
Hello folks, wanted to give you all an update on the situation. Last night, 7.0.201 was released through all the various channels. It should already be available on GitHub Actions and AzDO runners, and of course for local installation. This hotfix contained the changes to the The other problem logged in this issue, MSBuild logging a prerelease version string, will be handled in the normal servicing schedule - likely with next month's expected release of 7.0.202. Thank you all for the feedback and discussion on this issue. |
@baronfel Just a heads up, 7.0.200 was pushed to our Microsoft Hosted Azure Dev Ops build agents yesterday and broke |
@Astrophizz do you have any details on that? maybe a binlog? paging @nkolev92 in case he's seen this reported elsewhere already. |
@Astrophizz Are you using CPM? We haven't heard anything about lock file discrepancies yet. It'd be great if you can get us a repro and file an issue at https://github.com/nuget/home/issues |
@baronfel It's difficult to provide more info right now because my employer doesn't allow me to sign in to GitHub (posting from phone!) but I'll see if I can get a minimal reproduction. The issue was that |
@nkolev92 What is CPM? I'll follow up with any reproduction at the NuGet GitHub. |
CPM is central package management, https://learn.microsoft.com/en-us/nuget/consume-packages/central-package-management. Looking forward to your repro! |
@nkolev92 No, we aren't using that. It sounds cool though! It occurred to me that we are using Azure pipeline caching on the NuGet package cache (keyed to a hash of the lock file) and I suppose that could introduce an extra wrinkle, though I'm not sure how or why it would fail when no changes were made to package refs between the good and bad build... 🤔 |
The error message, NU1004 should hopefully contain some details about what changed. |
@nkolev92 It doesn't have a NuGet error. It completes the package restore but with different packages than those specified by the lock file. |
Are you running with If you do that, it'll enforce the lock file. Without it, changes in references will be processed. |
@nkolev92 Yes, I'm running it with |
@nkolev92 After some further investigation, this looks like a matter of an Azure DevOps task restoring multiple projects ( It sounds like CPM might be the solution to my problem at the same time since my reading of the docs is that I can get consistent transitive package versions across multiple solutions/root projects 😁👍. Does it support a package lock file? I'm guessing I would have a lock for each root project. |
I wouldn't expect that to be the case. Most of the work in CPM is on transitive pinning, so stomping shouldn't be something that happens.
Note that you'll only get that for transitive versions you decide to pin and if you enable transitive pinning. CPM is excellent for large repos, as you'll never accidentally direct reference different versions of packages.
Yes, they're separate features that can work together. |
This reverts commit 13f701e.
@baronfel re this:
Can't we do that for the publish command as well? Since it also turns the specified |
@ericsampson the problem is how that shared I'd love to change the meaning of |
thanks @baronfel. I'd much much rather it to be opt-in for .NET 8, and then defaulted on for .NET 9 |
@ericsampson don't worry - on by default is not in the cards currently. Details in this section, but everything will be opt in at least for .NET 8 - we recognize that there are huge compat concerns with silently changing output paths! |
Describe the bug
"dotnet build -o " feature (output folder for entire solution build)
To Reproduce
use "dotnet build -o " with sdk 7.0.200 from today
Exceptions (if any)
error NETSDK1194: The "--output" option isn't supported when building a solution.
Further technical details
You can see in the screenshot that a preview version of MSBuild is used/delivered (7.5.0-preview....".
Maybe this is the root cause of the issue!
Because with the SDK from last week (7.0.100) i can workaround the exception!
I hope that helps - assuming this issue may cause a lot of problems...
BR
Werner
The text was updated successfully, but these errors were encountered: