简体   繁体   English

共享Visual Studio 2010代码

[英]Sharing Visual Studio 2010 Code

Firstly, sorry if it has been asked before or seems a stupid question. 首先,很抱歉,如果以前有人问过这个问题,或者这似乎是一个愚蠢的问题。 But I have played around with visual studio 2010, making a few forms click and handle together to do a function I desire, and now I have finished it, I need to take all that code and give it to someone. 但是我在Visual Studio 2010中玩过,通过单击和处理一些表单来完成我想要的功能,现在我完成了,我需要拿走所有代码并将其提供给某人。 How do I do this? 我该怎么做呢? I even had a stab at writing the code manually in notepad, but then it wouldnt run how it did in the visual studio. 我什至在用记事本手动编写代码时也遇到了麻烦,但是随后它无法像在Visual Studio中那样运行。

Thanks in advance 提前致谢

Share for which purpose? 分享目的何在?

To publish on a website? 要在网站上发布? Use code highligthers/formatters available online. 使用在线提供的代码highligthers / formatter。

To demonstrate a concept - a simple copy/paste into email may be enough. 为了演示一个概念-将简单的复制/粘贴到电子邮件中就足够了。

To let other person run your app, the general approach is to delete obj and bin folders from all your project folders within a solution, and pack the rest into a zip archive. 为了让其他人运行您的应用程序,通常的方法是从解决方案中的所有项目文件夹中删除objbin文件夹,并将其余文件打包到zip存档中。

Now that may not work, if you used any 3rd party libraries and another person does not have them. 现在,如果您使用了任何第三方库,而另一个人没有它们,则可能无法使用。 If you want a more specific answer, please narrow the scope of your question. 如果您想要更具体的答案,请缩小问题范围。

I copy the form.designer.vb and the form.vb and paste them into notepad (plus) and save them as a text file, zip them and email them. 我复制form.designer.vb和form.vb并将它们粘贴到记事本中(另加),并将它们另存为文本文件,将其压缩并通过电子邮件发送。

The receiver can then copy and paste them into a new project and it will build as the same project. 然后,接收者可以将它们复制并粘贴到新项目中,并且它将作为同一项目进行构建。

This is for simple for projects. 这是简单的项目。

Some people prefer to change the file extensions (the executable files usually won't pass email scans), I, personally don't like this. 有些人喜欢更改文件扩展名(可执行文件通常不会通过电子邮件扫描),我个人不喜欢这样。

I also do this with all my code and email it to myself as an extra back up procedure. 我还使用所有代码进行此操作,并将其作为额外的备份过程通过电子邮件发送给自己。

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

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