如何通过 gmail 将整个 .Net 项目作为附件发送?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/4091592/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-03 14:52:43  来源:igfitidea点击:

How can I send a whole .Net project as attachment via gmail?

.netzipgmailexecutable

提问by morphatic

I'm frequently working with students on their .Net coding assignments. I'd like to email the code to them when we're done. The easiest thing would be just to zip the project folder and send the whole thing, but gmail always strips out my attachments because they contain executables. Generally it's just the myproject.vshost.exe or something innocuous like that, but it's a pain to have to find an alternative upload location and then email the link to that. Has anyone been able to find a workaround that would allow me to send attachments like this via gmail?

我经常与学生一起完成 .Net 编码作业。完成后我想通过电子邮件将代码发送给他们。最简单的方法就是压缩项目文件夹并发送整个文件,但 gmail 总是删除我的附件,因为它们包含可执行文件。通常它只是 myproject.vshost.exe 或类似无害的东西,但必须找到替代上传位置然后通过电子邮件发送链接到该位置是很痛苦的。有没有人能够找到一种解决方法,允许我通过 gmail 发送这样的附件?

I suspect the answer to this is "nope, it's not possible," but I'll ask anyway

我怀疑这个问题的答案是“不,这是不可能的”,但我还是会问

采纳答案by Brian Smith

Another answer is to encrypt the zip file or rar file. If you use winrar you can setup a password and choose "encrypt file names". This will bypass the gmail filter.

另一个答案是加密 zip 文件或 rar 文件。如果您使用 winrar,您可以设置密码并选择“加密文件名”。这将绕过 gmail 过滤器。

回答by Dillie-O

If you zip up everything in your project except the /bin and the /obj folders, you should be okay sending the project to them. When they get the project, they simply need to compile it again to get the executable, but all the code will already be there.

如果您压缩项目中除 /bin 和 /obj 文件夹之外的所有内容,您应该可以将项目发送给他们。当他们获得项目时,他们只需要再次编译它以获得可执行文件,但所有代码都已经存在。

回答by Maria

Rename the file extension e.g project.zip to project.zub This trick worked for me...

将文件扩展名例如 project.zip 重命名为 project.zub 这个技巧对我有用......

回答by DevelopingChris

Gmail will allow you to send a zip file as long as its not named zip. so if you name it .zop and tell them to rename it then unzip it, it has worked for me in the past.

只要未命名为 zip,Gmail 将允许您发送 zip 文件。所以如果你将它命名为 .zop 并告诉他们重命名它然后解压缩它,它过去对我有用。

回答by Paritosh Pandey

Just zip your whole project and upload it to the google drive. After uploading it into the drive you will get an option of sharing setting and through that you can feed the email id of the person whom you want to send it.. That link will be sent to that person and he/she can download it easily...

只需压缩整个项目并将其上传到谷歌驱动器。将其上传到驱动器后,您将获得共享设置选项,通过该选项,您可以提供要发送它的人的电子邮件 ID。该链接将发送给该​​人,他/她可以轻松下载...

Enjoy!

享受!

回答by Colin Pickard

I assume you're using some flavour of of Visual Studio - does Visual Studio's clean commanddo what you want?

我假设您正在使用某种风格的 Visual Studio - Visual Studio 的 clean 命令是否满足您的要求?

回答by DMSQLO

take a look on this
http://visualstudiogallery.msdn.microsoft.com/en-us/c736dedf-bbed-454a-8073-89993ca46902

That tool allows you to create Backups (zip files) from solutions or projects automatically and you can also send code chunk directly from VS to any Email Client, it's pretty neat.

看看这个
http://visualstudiogallery.msdn.microsoft.com/en-us/c736dedf-bbed-454a-8073-89993ca46902

该工具允许您自动从解决方案或项目创建备份(zip 文件),您也可以将代码块直接从 VS 发送到任何电子邮件客户端,非常简洁。

回答by gaurav

very simple. you can zip the project , change the file extension to " .txt " and send it happily! just tell your students to change the file extension again to ".zip"and then unzip it! :) works with yahoo mail. never used gmail though. please try and let us know the results.

很简单。您可以将项目压缩,将文件扩展名更改为“.txt”,然后愉快地发送!只需告诉您的学生再次将文件扩展名更改为“.zip”,然后解压缩即可!:) 适用于雅虎邮件。虽然从未使用过 gmail。请尝试让我们知道结果。