I have been called in to "clean up" and get started again in a .NET environment where the developers left quite a tangled mess. The developer is still available to me and he is/was able to pull up the solution on his machine, but when I attempt to use this is on my machine it creates a mess.
我被要求“清理”并在.NET环境中重新开始,开发人员在这种情况下留下了相当混乱。我仍然可以使用开发人员,并且他能够在他的机器上提取解决方案,但是当我尝试使用它时,我的机器上会出现问题。
What I would like to do is to have an "Export Solution" that would pull all the various dependencies out and combine them in to a single Directory that reflects the solution layout.
我想要做的是拥有一个“导出解决方案”,它将所有各种依赖项拉出来并将它们组合到一个反映解决方案布局的目录中。
If copying the files out is impossible (for exmaples, references to items in the GAC) is there any utility or way to get a full report of where everything actually is, the physical and virtual paths for both Debug and Release configurations. Also post-build tasks, etc. With a ton of projects of different types and various config screens, just manually trying to document it is possible, but has proved very error-prone, even for one very determine man.
如果无法复制文件(对于exmaples,对GAC中项目的引用),可以使用任何实用程序或方法来获取实际所在位置的完整报告,即Debug和Release配置的物理和虚拟路径。还有后期构建任务等。随着大量不同类型和各种配置屏幕的项目,只需手动尝试记录它是可能的,但事实证明非常容易出错,即使对于一个非常确定的人。
I have tried just parsing the Solution file since its just text, but it doesn't tell the whole story. Also part of that story is where the files are in Visual Source Safe, since when I have been able to pull together a working solution, VSS "corrects" me by randomly bring files in that then reference non-existing locations. It's been a treat and VSS is a virus.
我尝试解析解决方案文件,因为它只是文本,但它并不能说明整个故事。此故事的一部分是文件在Visual Source Safe中的位置,因为当我能够将工作解决方案整合在一起时,VSS通过随机引入文件来“纠正”我,然后引用不存在的位置。这是一种享受,VSS是一种病毒。
Any suggestions for extracting this from the only machine on the planet that will build this (and only in Release) so someone else could work on it?
有任何关于从地球上唯一可以构建此机器(并且只在发布中)中提取此功能的建议,以便其他人可以使用它吗?
Once I get it on my machine I am going to restructure it, but without a clear picture of how it "did" work that would be shooting in the dark.
一旦我把它放在我的机器上,我就会对它进行重组,但是没有一个清晰的图片说明它是如何工作的,它会在黑暗中拍摄。
2 个解决方案
#1
I don't know a way to export and I can't guarantee anything b/c it sounds pretty messed up, but here's what I would do. First, I would ask the guy to zip up his solution folder and send it to you. Then, I would create the same directory structure on my computer (so if he had the solution at s:\ ... \solution\, I would do the same. Use subst to make the drive letter if necessary). Then, I would unzip the solution to the new directory root and open it with visual studio. Now is where the fun part begins. I would then try and re-do the bindings for VSS.
我不知道出口的方式,我不能保证任何事情它听起来很混乱,但这就是我要做的。首先,我会要求那个人拉上他的解决方案文件夹并发送给你。然后,我会在我的计算机上创建相同的目录结构(所以如果他在s:\ ... \ solution \中有解决方案,我会这样做。如果需要,使用subst来制作驱动器号)。然后,我将解压缩到新目录root并使用visual studio打开它。现在是有趣的部分开始的地方。然后我会尝试重新为VSS做绑定。
Once I had all that in place, I would ask the guy to tell me what 3rd party assemblies I need, if any. (Remember the GAC is not an issue as that is a run-time reference to assemblies and not a compile-time reference. Unless he did something crazy like reference physical GAC file locations. Ugh.) And ask him what the correct build order is. That is what are the projects that have no dependency on other projects.
一旦我掌握了所有这些,我会要求那个人告诉我我需要的第三方组件,如果有的话。 (请记住,GAC不是问题,因为它是对程序集的运行时引用而不是编译时引用。除非他做了像引用物理GAC文件位置那样疯狂的事情。呃。)并问他正确的构建顺序是什么。那就是那些不依赖于其他项目的项目。
Then, you need to try and build the lowest level projects one by one and correct build errors. Then move up one level to projects that depend on the projects you just compiled and so on until you have done the whole solution. Start by getting one project to build, then two, then three, until you have them all fixing the problems along the way.
然后,您需要尝试逐个构建最低级别的项目并更正构建错误。然后向上移动一级到依赖于刚编译的项目的项目,依此类推,直到完成整个解决方案。首先要建立一个项目,然后是两个,然后是三个,直到你让他们全部解决问题。
Once you have a solution that builds, you can clean it up. Then, RUN don't walk to replace VSS as your source repository.
一旦你有一个构建的解决方案,你可以清理它。然后,RUN不会步行将VSS替换为源存储库。
GL. :)
#2
There is no Export capability.
没有导出功能。
Since you still have access to the old developer, see if you can get him to re-setup the solution. Relative file paths, linkage and not all files being checked in is usually the problem. Which can be a big mystery for you if you don't have the whole story. (his files not checked in)
由于您仍然可以访问旧开发人员,因此请查看是否可以让他重新设置解决方案。相关文件路径,链接而不是所有正在检入的文件通常都是问题。如果你没有完整的故事,这对你来说可能是个大谜。 (他的文件未签入)
I think it's also perfectly reasonable to require the old developer to hand off a working solution ... or else.
我认为要求老开发人员交付有效的解决方案也是完全合理的......否则。
Solution.sln
[Project1]
[Project2]
#1
I don't know a way to export and I can't guarantee anything b/c it sounds pretty messed up, but here's what I would do. First, I would ask the guy to zip up his solution folder and send it to you. Then, I would create the same directory structure on my computer (so if he had the solution at s:\ ... \solution\, I would do the same. Use subst to make the drive letter if necessary). Then, I would unzip the solution to the new directory root and open it with visual studio. Now is where the fun part begins. I would then try and re-do the bindings for VSS.
我不知道出口的方式,我不能保证任何事情它听起来很混乱,但这就是我要做的。首先,我会要求那个人拉上他的解决方案文件夹并发送给你。然后,我会在我的计算机上创建相同的目录结构(所以如果他在s:\ ... \ solution \中有解决方案,我会这样做。如果需要,使用subst来制作驱动器号)。然后,我将解压缩到新目录root并使用visual studio打开它。现在是有趣的部分开始的地方。然后我会尝试重新为VSS做绑定。
Once I had all that in place, I would ask the guy to tell me what 3rd party assemblies I need, if any. (Remember the GAC is not an issue as that is a run-time reference to assemblies and not a compile-time reference. Unless he did something crazy like reference physical GAC file locations. Ugh.) And ask him what the correct build order is. That is what are the projects that have no dependency on other projects.
一旦我掌握了所有这些,我会要求那个人告诉我我需要的第三方组件,如果有的话。 (请记住,GAC不是问题,因为它是对程序集的运行时引用而不是编译时引用。除非他做了像引用物理GAC文件位置那样疯狂的事情。呃。)并问他正确的构建顺序是什么。那就是那些不依赖于其他项目的项目。
Then, you need to try and build the lowest level projects one by one and correct build errors. Then move up one level to projects that depend on the projects you just compiled and so on until you have done the whole solution. Start by getting one project to build, then two, then three, until you have them all fixing the problems along the way.
然后,您需要尝试逐个构建最低级别的项目并更正构建错误。然后向上移动一级到依赖于刚编译的项目的项目,依此类推,直到完成整个解决方案。首先要建立一个项目,然后是两个,然后是三个,直到你让他们全部解决问题。
Once you have a solution that builds, you can clean it up. Then, RUN don't walk to replace VSS as your source repository.
一旦你有一个构建的解决方案,你可以清理它。然后,RUN不会步行将VSS替换为源存储库。
GL. :)
#2
There is no Export capability.
没有导出功能。
Since you still have access to the old developer, see if you can get him to re-setup the solution. Relative file paths, linkage and not all files being checked in is usually the problem. Which can be a big mystery for you if you don't have the whole story. (his files not checked in)
由于您仍然可以访问旧开发人员,因此请查看是否可以让他重新设置解决方案。相关文件路径,链接而不是所有正在检入的文件通常都是问题。如果你没有完整的故事,这对你来说可能是个大谜。 (他的文件未签入)
I think it's also perfectly reasonable to require the old developer to hand off a working solution ... or else.
我认为要求老开发人员交付有效的解决方案也是完全合理的......否则。
Solution.sln
[Project1]
[Project2]