-
Notifications
You must be signed in to change notification settings - Fork 432
Minimal repro: unable to upgrade solution to 4.7.2 #895
Comments
Note: This repro has ~170 dependencies and is based off of a legacy .csproj template from a real project; however, it is extremely difficult to generate a reproducible failure condition from a 'fresh' branch new project. I've done the best I can here, hopefully it is enough to help identify some kind of root cause. |
That might be because you have to delete the bin and obj folders:
Fyi, my central list of workarounds has grown a bit with new ideas. |
We have many issues related to this problem in the repro, I'm consolidating them into #936 |
This relates to #481
Here is a minimal example that run successfully on .Net 4.6, and fails to run after upgrading to .Net 4.7.2
https://github.com/wokwokwok1/dotnet-46-project-upgrade-repro
You can view the various steps taken and the snapshot of the broken project as various phases through-out the upgrade attempt:
Re-targeting to 4.7.2
project snapshot:
https://github.com/wokwokwok1/dotnet-46-project-upgrade-repro/tree/net472_001_retarget
detail:
https://raw.githubusercontent.com/wokwokwok1/dotnet-46-project-upgrade-repro/net472_001_retarget/DemoApp/README.md
summary:
This does not work.
upgrading to package reference, as suggested in #481
project snapshot:
https://github.com/wokwokwok1/dotnet-46-project-upgrade-repro/tree/net472_002_migratePackages
detail:
https://raw.githubusercontent.com/wokwokwok1/dotnet-46-project-upgrade-repro/net472_002_migratePackages/DemoApp/README.md
summary:
This does not work.
attempting to manually pin dependency versions
project snapshot:
https://github.com/wokwokwok1/dotnet-46-project-upgrade-repro/tree/net472_003_manualDependencyResolution
detail:
https://raw.githubusercontent.com/wokwokwok1/dotnet-46-project-upgrade-repro/net472_003_manualDependencyResolution/DemoApp/README.md
summary:
This does not work, but a new error is seen.
upgrading the project dependencies and applying 'magic' web.config fix
project snapshot:
https://github.com/wokwokwok1/dotnet-46-project-upgrade-repro/tree/net472_004_upgradeEverything
detail:
https://raw.githubusercontent.com/wokwokwok1/dotnet-46-project-upgrade-repro/net472_004_upgradeEverything/DemoApp/README.md
summary:
This resolved the issue and application now functions correctly.
The key to resolving this issue is from #542, where it was suggested to add assembly references directly to the web.config, like this:
However, this was only a partial fix, and the complete fix required the addition of
System.Runtime
as well, like this:This appears to full resolve the issue.
However, it is unclear why this is required, and is simply a random lucky guess that putting the dependency here will resolve the issue.
I leave this repro here, because I believe this is a bug.
The text was updated successfully, but these errors were encountered: