Published asp.net site back to solution - c#

I have a published asp.net website on a server and I need to get this back into a solution for editing etc. Are there any tools out there which would give me back the solution?
Ilspy did not do this for me,
Thanks in advance

You should look for .Net Decompiler tools.
Decompiler tools for .NET Framework
Some of the popular tools are:
.NET Reflector
JustDecompile (free)

I've had good experience with dotPeek

Assuming you only have the compiled versions of the pages, this can get really tricky.
You will need to use a decompiler on each assembly. Easy decompilers to use are, like Habib already suggested, .NET Reflector and JustDecompile. If you are already using ReSharper, the current version has a decompiler (dotPeek) built-in and you can also download that separately, for free, at http://www.jetbrains.com/decompiler.
The problem is that decompilers don't really reconstruct your code exactly as it was originally, and you may still have to modify things by hand. This is especially true if the code was compiled with the "Optimize code" setting set to true.
Good luck!

Related

Mono GTK Plot library?

I tried to google but hardly find any result.
Is there any Library that are cross-platform, useable in Mono and GTK2 support?
Thank you
Have a look at NPlot. There are (a bit older) versions for Gtk#, see http://www.mono-project.com/Libraries#NPlot_Gtk and http://www.mono-project.com/GtkSharpDetails#NPlot_Gtk
GtkExtra I think might work.
Sourceforge link

How do you determine which libraries are not being used

In developing a test project I've tried a lot of things which includes declaring an enormous amount of references/libraries. As a result I have a ton of declared libraries that are not being used in my project and would like to flush them out. Is there a way to know which libraries are not in use by the end product's code? I'm hoping there is some kind of visual studio function that can tell me this.
Thanks!
Solution is handy. Just follow the link
How to: Remove Unused References
EDITED:
Since the above option is available only in VB.NET, you can go for some Visual Studio 2010 plug ins. Looks like Resharper does it. Please refer to Visual Studio: Detecting unneeded Assemblies
for more detail.
Coderush is similar to Resharper, but they offer a free Xpress version on their website. You can go download that and it should show you which are unused (although I'm not 100% the Xpress version has this ability).
You can only easily find out what assemblies are used. Easy enough to invert the list. Look at the .assembly directives that the compiler put in the assembly manifest with ildasm.exe or Reflector. The compiler whittles down the list to assemblies that contains types that it encountered while compiling the code. Watch out for assemblies you load yourself.
In Visual Studio 2019 starting from the latest versions and Visual Studio 2022 you can remove unused packages, but only for SDK style projects.
If you try on old projects, like .Net Framework, you won't see this option.
As workaround, to verify, you can create two simply console apps: one using .Net Core or later, and one .Net Framework 4.7 or 4.8.
Just right-click on project name and select Remove Unused References
Please refer to: Remove Unused References

How to get source code of .NET libraries to VS

I was told that Microsoft has released reference source code for some .NET libraries (I'm especially interested in C# libraries). If it is true, I would like to download that code and use it with my VS, so I can browse the code by selecting
Go to Declaration
and
Go to Implementation
from context menu. It would be much better then just to see documentation in object browser.
So how do I get VS to work with it? Thank you.
Up-to-Date answer
All you need is this: http://referencesource.microsoft.com/
Here's an article on MSDN and you may also checkout the following article and this blog post also. This allows you to step through the framework source code while debugging your applications. Reflector is also a good tool for browsing through the compiled assemblies.
Here is reference source code for.NET from Microsoft that available for download.
Here is how to set up VS for debuging.
Darin said nearly everything. The only hint that is missing is the NetMassDownloader to get the whole source once if needed.
here you go: .net source code download link
good luck in compiling it so you can debug through it like it was one of your own projects. I don't know how big a project you've ever worked on, but this one's a big one and its not as simple as you would imagine...
The .net core, .net 5 and .net 6 runtime code can be found here:
https://github.com/dotnet/runtime
This repo contains the code to build the .NET runtime, libraries and shared host (dotnet) installers for all supported platforms, as well as the sources to .NET runtime and libraries.

Missing System.Scripting in VS.Net 2010-Where can I find it?

I installed VS.Net 2010 to play around with some of the new C# features and I'm trying to use the IDynamicObject interface but I can't because it can't find the System.Scripting namespace. What do I need to install to get this?
Thanks!
I think possibly this has been renamed:
http://msdn.microsoft.com/en-us/library/system.dynamic.idynamicmetaobjectprovider(VS.100).aspx
but perhaps someone more in tune with this knows for sure. Just sharing in case it helps unblock you.
(I know the DLR is in .Net 4.0 and VS2010-Beta2, since they just release matching updates of Iron Python/Ruby that run atop it.)
You can download the DLR libraries from codeplex. I believe they were supposed to be built into .NET 4.0, I'm not sure why they aren't in VS2010, perhaps they are not in the beta. In any case, I have been using the codeplex libraries for my experimentation, they are supposed to be the same as the .NET 4.0 version (plus some extra hosting features). They also have some reasonably good documentation on how to use it.
Edit:
Additionally, you can use the codeplex libraries with VS2008.

how to transform CLR to EXE

when we create an application in VC#, talking about .net 3.5 in particular, the are comipled to CLR, what i want is that they should be compiled to EXE executable code that doesn't require .NET Framework Environment for them to run. Is it possible
I guess you're asking how to statically link the parts of the framework your application needs. Please see this link from Jon Skeet for info on how to do that: http://www.yoda.arachsys.com/csharp/faq/#framework.required
There are 3rd party products that do this. I know of no free ones.
Even if you get a third party product, I think it just packages the .NET runtime in there somehow. I don't know how else it would run.
Why don't you just create an installer that has the .NET framework as a requirement? It should check for it and install it if the user doesn't have it already.
you can use MONO's ahead of time compiler

Categories

Resources