如何获取源代码? [英] How to get Source Code?

查看:222
本文介绍了如何获取源代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个在MVC 5中开发并部署到azure web app的Web应用程序。但遗憾的是我的硬盘损坏,数据恢复无法进行,我的源代码就在那个驱动器中。

I have a web application developed in MVC 5 and deployed to azure web app. But unfortunately my hard-disk is damaged and data recovery is not possible and my source code is in that drive.

任何人都可以告诉我有没有办法从azure Web应用程序获取源代码,因为它是一个非常广泛的Web应用程序,具有大量的功能。如果我们无法恢复源
代码,我的团队和我必须重新完成开发过程。请帮助。



最好的问候,

Can anybody please tell me is there a way to get source code from azure web app as it's a very extensive web application with tons of features. My team and me have to go through the development process all over again if we aren't able to recovery source code. Kindly please help.

Best Regards,

Muhammad Asad

Muhammad Asad

Asad

推荐答案

希望你使用像Git或TFS这样的源代码控制,这样你就可以从那里获得它。如果你不能那么你将不得不将一些东西重新组合在一起。包括HTML,CSS,图像和脚本在内的内容文件将与.asax和
配置文件一起位于服务器上。您可以将它们带回来。 

Hopefully you were using source control like Git or TFS so you can get it from there. If you cannot then you'll have to piecemeal things back together. The content files including HTML, CSS, images and scripts will be on the server along with the .asax and config files. You can bring those back. 

原始代码不可用,但您可以带回bin文件夹,然后通过反编译器运行程序集以获取代码。我建议使用Telerik的JustDecompile,因为它也可以生成项目文件。您将丢失注释
,并且生成的代码将与原始代码不同,因为编译器将在编译期间变形代码。但它会给你一个恢复的起点。

The original code isn't available but you can bring back the bin folder and then run your assemblies through a decompiler to get the code out. I would recommend JustDecompile from Telerik as it can generate the project file as well. You'll lose the comments and the generated code won't be identical to what you original had because the compiler will morph the code during compilation. But it'll give you a starting point to restore.

一旦你设置了基础项目,我强烈建议你把它放到源代码管理中,这样你就可以开始做出改变了。如果出现问题,或者硬盘崩溃,请恢复原状。确保使用不在本地驱动器上的SCC。对于小型团队(< = 5个用户),TFS
是免费的,所以这是一个开始。 Git也是免费的,但如果你不想让别人看到你的代码那么你需要付钱。

Once you have the base project set back up I'd strongly recommend putting it into source control so you can then begin making changes and revert back if things go wrong, or the hard drive crashes. Ensure you use an SCC that isn't on your local drive. TFS is free for small teams (<= 5 users) so that is a start. Git is free as well but if you don't want people to see your code then you need to pay money.

Michael Taylor

http:// www .michaeltaylorp3.net

Michael Taylor
http://www.michaeltaylorp3.net


这篇关于如何获取源代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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