使用保存到其他文件夹的项目进行编译的问题 [英] Issues compiling with projects saved to a different folder

查看:57
本文介绍了使用保存到其他文件夹的项目进行编译的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

过去几天我一直在努力弄清楚为什么当我直接从Bin目录执行程序时我的程序无法正常运行,但在VS2010中使用调试模式时工作正常。



我决定回到我写的原始项目文件夹,并将新的代码添加到其中,现在它有效吗?



我希望每个版本的构建都能有不同的文件夹,但它似乎不喜欢这样做?任何人都可以解释原因吗?



而且,如果我无法将原始源文件复制并粘贴到新目录中,并且在单独的项目上工作,怎么能我将新版本保存在不同的目录中?

I'd been struggling the past couple of days trying to figure out why my program wouldn't run correctly when I executed the program direct from the Bin directory, but worked fine while with debug mode in VS2010.

I decided to go back to the original project folder I'd written it from and added the new bits of code into that and now it works?

I wanted to be able to have different folders for each version of the build, but it doesn't seem to like doing this? Could anyone explain why?

And also, if I am unable to copy and paste the original source files into a new directory, and work on a separate project, how can I keep new versions in separate directories?

推荐答案

为什么?因为你没有使用源控制系统,比如Team Foundation Server,Subversion,Git等等。



如果你想保留不同版本的源代码和/或可执行文件,您必须将这些文件复制到某个位置的备份位置,或者您必须使用版本控制系统。
Why? Because you're not using a source control system, like Team Foundation Server, Subversion, Git, or whatever.

If you wanted to keep different versions of the source code and/or executable, you either have to copy those files off to a backup location somewhere or you have to use a version control system.


我不能确切地说明您的意思



通常,调试exe将转到bin \ debug,而release exe将转到bin \ release - 所有这些都可以在项目的构建设置中自定义



>>
Im not exactely sure what you mean

usually, a debug exe will go to bin\debug while a release exe will go to bin\release - all this is customisable in the build settings for a project

>>
Quote:

而且,如果我无法将原始源文件复制并粘贴到新目录中,并处理单独的项目,我可以将新版本保存在不同的目录中吗?

And also, if I am unable to copy and paste the original source files into a new directory, and work on a separate project, how can I keep new versions in separate directories?





ok,我会做什么(取决于我为什么这样做)



a)在我的解决方案中添加一个新项目,并在那里处理文件的副本 - 注意它们现在完全与原始文件分开,没有回头 - 除非你做了手动过程,因为你可以使用'差异'工具 - 我使用Scooter软件的'Beyond Compare'







b)使用源代码控制,并分支我的更改,以及我可能会在稍后阶段将代码合并回主线的视图



你有没有提供足够的信息,说明你为什么这样做



ok, what I would do is (depending on why Im doing this)

a) add a new project to my solution, and work on a copy of the files there - note that they are now completly separate from the original files, there's no going back - unless you do a manual process, for that you could use a 'difference' tool - I use 'Beyond Compare' from Scooter Software

OR

b) use source control, and 'branch' my changes, with a view that I might merge the code back into the mainline at some later stage

You havnt provided enough info on why you are doing this

Quote:

而且,如果我无法复制并将原始源文件粘贴到一个新目录中,并在一个单独的项目上工作,如何将新版本保存在不同的目录中?

And also, if I am unable to copy and paste the original source files into a new directory, and work on a separate project, how can I keep new versions in separate directories?

所以有点难以建议你(我会倾向于源代码控制个人...如果你不喜欢命令行的东西,得到Atlassian SourceTree的(免费: - ))副本并使用它)

so its a bit hard to advise you further (I'd be leaning towards source control personally... if you dont like command-line stuff, get a (free :-) ) copy of Atlassian SourceTree and use that)


这篇关于使用保存到其他文件夹的项目进行编译的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆