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

[Bug]: Net472 Service Fabric project with .Net 8 project reference broken in latest msbuild #10290

Closed
johnthcall opened this issue Jun 24, 2024 · 2 comments
Labels
author-responded Author responded, needs response from dev team. bug

Comments

@johnthcall
Copy link

Issue Description

With the latest visuals studio update and the latest accompanying msbuild our Azure service fabric packaing has started to fail with the following error:
"E:\One\Mgmt\Governance\Notifications\src\Notifications\Notifications\Notifications.sfproj" (Restore target) (1) -> (Restore target) -> D:\msbuild\17.10.0-dev-24324-01+c6bee852d\Common7\IDE\CommonExtensions\Microsoft\NuGet\NuGet.targets(169,5): error : Invalid restore input. Invalid target framework 'unsupported'. Input files: E:\One\Mgmt\Governance\Notifications\src\Notifications\Notifications\Notifications.sfproj.

I have checked out this repo and binary searched the commits to find where the issue appears. Strangely the first commit to fail is #9722 c6bee85 and the PR before it #9644 a4ecab3 successfully builds. Attached are the two binary logs for successful and failed build with msbuild created from these commits.
binlog.zip

Steps to Reproduce

msbuild src\Notifications\Notifications /t:Package /p:BuildProjectReferences=false /p:Configuration="Release"

Service fabric projects (.sfproj) are .Net 472 and we have package.config file along with project references to csproj which are using central package reference and are .Net 8 runtime.

Happy to work with MSFT employees to share internal setup.

Expected Behavior

Build succeeds and service fabric is properly packaged.

Actual Behavior

Msbuild gets to project restore phase and fails to restore for the sfproj file which is packageconfig restoration.

Analysis

I diffed the detailed logs of the two builds and it appears that this service fabric project switched it's restore project style of PackagesConfig to PackageReference.

Versions & Configurations

No response

@johnthcall johnthcall added the bug label Jun 24, 2024
@rainersigwald
Copy link
Member

Spoke to @johnthcall briefly offline. GitHub's linearized repo history puts those commits together but by commit parent order they're pretty far apart, so that commit had more content. Next actions are to try to narrow it down further (maybe with formal git bisect). I suspect a NuGet change.

@rainersigwald rainersigwald added the needs-more-info Issues that need more info to continue investigation. label Jun 24, 2024
@johnthcall
Copy link
Author

Root cause of the issue is NuGet/NuGet.Client#3276. After explicitly setting ManagePackageVersionsCentrally to false for service fabric projects it was able to build successfully.

@dotnet-policy-service dotnet-policy-service bot added author-responded Author responded, needs response from dev team. and removed triaged needs-more-info Issues that need more info to continue investigation. labels Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author-responded Author responded, needs response from dev team. bug
Projects
None yet
Development

No branches or pull requests

2 participants