简体   繁体   English

如何恢复.NET升级助手创建的备份

[英]How to restore a backup created by .NET upgrade assistant

So I tried upgrading a WPF solution with two projects ( production and unit-tests) that was in .NET Framework 4.7.2.因此,我尝试使用 .NET Framework 4.7.2 中的两个项目(生产和单元测试)升级 WPF 解决方案。

I made sure to install try convert initially and tested the upgrade tool with a smaller solution and everything worked properly.我确保最初安装了 try convert 并使用较小的解决方案测试了升级工具,一切正常。 But upon use, I encountered some errors and decided that I would rather roll back and start afresh.但是在使用中,我遇到了一些错误,我决定宁愿回滚并重新开始。 I explicitly made sure that it made a backup before doing the upgrade.我明确确保它在升级之前进行了备份。 But now I have no idea how to restore the stored local backup.但是现在我不知道如何恢复存储的本地备份。

With what I have searched, there is no documentation at all on the matter.根据我的搜索,根本没有关于此事的文档。 Is the answer so trivial and I'm just missing it?答案是如此微不足道,我只是想念它吗? Help me out here.帮我出去。

I had the same issue and found no documentation, either online or from the command line in the update-assistant utility itself, that mentioned restoring the backup.我遇到了同样的问题,但没有发现任何文档,无论是在线文档还是从更新助手实用程序本身的命令行中,都提到了恢复备份。

If the backup succeeded you could remove the '.backup' from the backup artifact and delete the upgrade, however I found that in my case the upgrade-assistant utility didn't save the old code accurately, so this didn't work for me.如果备份成功,您可以从备份工件中删除“.backup”并删除升级,但是我发现在我的情况下升级助手实用程序没有准确保存旧代码,所以这对我不起作用.

If your code was in a Git repository you could get it back following the instrucations here:如果您的代码位于 Git 存储库中,您可以按照此处的说明取回它:

Git - How to revert entire directory to specific commit (removing any added files) Git - 如何将整个目录恢复到特定提交(删除任何添加的文件)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM