Closed AArnott closed 2 years ago
Confirmed repro on main
as of 750da0c1701f69cf0345f0eb95db4750727eb7b1 on VS 2022 17.3 internal + net6.0.400-pre
csproj has only been changed to SDK style w/ a Target Framework of net472 at the point of the exception. Debugging now.
@AArnott appears to be coming from Nerdbank.GitVersioning. I had to decompile & get sourcelink PDBs to follow it down, but eventually landed at this parsing:
is it possible we could simply update the version of this dependency and get rid of this issue? I'm betting the targets are incompatible with new Nuget.Versioning schemes as of 6.x and that's what we're hitting.
I think trying to build the proj in VS 2022 confirms this:
Running with -v
option gives us this; looks like the problem might actually be ReadOnlySourceTree
nupkg?
@mjrousos, @twsouthwick, @sunandabalu any suggestions here?
ReadOnlySourceTree is very old and deprecated. Removing our use of it is part of the overall upgrade plan for this repo as well. But I wonder how net-cf
is considered invalid. AFAIK it was a legit and existing TFM at the time I wrote that package.
If I had to bet, Nuget.Frameworks
evolved and at some point stopped supporting it outright; since it's the pkg that's throwing the exception. Additionally, it's not listed in either the current or deprecated frameworks list for nuget 🤷🏻♂️
I also found this very old issue (2015) that calls out the same failure but has PRs "fixing" it
Ok. It sounds like 'fixing' this would be complex, and can be avoided by removing this old dependency instead. Thanks for investigating.
upgrade-assistant.clef
that is produced in the working directory upgrade-assistant.zipDescribe the bug
The tool apparently cannot handle the
net-cf
target framework. I'm not even quite sure where it gets the problematic string from, sincenet-cf
doesn't appear anywhere in the repo. Maybe in a nuget package dependency?To Reproduce
Select "src\Microsoft.VisualStudio.ProjectServices.Tests\Microsoft.VisualStudio.ProjectServices.Tests.csproj" as the entrypoint. After upgrading it to SDK style, the tool exits with an exception as specified below.
Exceptions (if any)
Further technical details
dotnet --list-sdks
upgrade-assistant --version