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

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.

Related

Published asp.net site back to solution

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!

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.

ORM that supports Mono?

I'm starting up a rather large-scale open source server project written in C# which targets both the MS.NET and Mono platforms. However, I realized that Mono only has limited support for LINQ to SQL, and no support for the Entity Framework at all.
Two ORMs I have considered are NHibernate and SubSonic. However, I have no idea how either will operate on Mono 2.8 (which is what I'm targeting).
So, can anyone recommend an ORM that will run on Mono 2.8, or happen to have used some of the aforementioned ORMs successfully under Mono?
Thanks in advance.
Mono supports:
NHibernate - Free, open source, proven and tested. Easy to configure. My personal favorite.
db4o - Free if you open-source your own project. You have to license it for commercial apps. Much less well-known than NHibernate.
siaqodb - Available for Mono 2.4 and up. You have to pay $185 for a license, but the redistributable engine is royalty-free.
In choosing from this list, I'd suggest NHibernate. Lots of help is available out there for it and it works fabulously.
Another very interesting one I have come across recently is Vici CoolStorage. It even supports Mono (MonoTouch specifically) on the iPhone.
You sure NHibernate doesn't work on Mono? You should be able to use the same Assemblies at Mono. Another option is to download it's source and compiling it. Check this page https://forum.hibernate.org/viewtopic.php?f=25&t=951909&start=0

Feasibility of C# development with Mono

Recently, I came across Mono and MonoDevelop packages in Ubuntu linux. They claim to have a .NET runtime in accordance with CLI. Before installing the packages myself, I would like to know the following:
How powerful is Mono?
Can I develop GUI application for
linux like developing WinForm
applications for Windows.
Is MonoDevelop IDE compatible with Visual Studio IDE. Can I import VS 2008 solutions to MonoDevelop and work?
Does it support .NET 2.0 and above?
EDIT: Adding one more doubt
Is there any way to run the .NET exe (of a winform app) in Linux without building the cod e in linux? In fact I don't have the code for some of the small utilities I developed earlier and would like to run them in linux.
(Strange, markdown starts the enumeration with one, even though I began with 2...)
Yes, you can, but you're limited with 3rd-party components, because the internal implementation is different, and last time I checked (not very long ago), the Mono WinForms implementation made my test app look rather strange (owner-drawn list view). It is not really recommended, though Mono claims that it's now completely WinForms-2.0-compatible.
MonoDevelop is/was a SharpDevelop branch, with the latter having solution support. I don't know if MonoDevelop has. But the cool thing is, you can just develop with Visual Studio and run your compiled apps on Mono. And Mono is, by the way, also available for Windows.
Yes, it does, as far as the CLR goes. As Marc Gravell already wrote, the Windows Foundation libraries are missing, as are a few other (System.Management, for example). But things should mostly work, including ASP.NET 2.0. Mono's application portability guidelines are a good read on this.
1: pretty good, actually. Not all the full framework is there, so if you are writing code that should build on both MS .NET and mono, you need to build and test early against both platforms
4: yes - although things like WPF/WCF/WF (3.0) are missing or slimmed down
I don't know much about the development environment, since I use VSTS (on Windows) and just use a NANT script to do the build on mono...
Define "powerful".
Mono has a WinForms implementation to allow for some level of source compatibility. However, depending on your needs, you might want to use one of the Mono bindings for a Linux native framework, like Gtk# or Qyoto
Wouldn't know.
Depends on what parts of .NET you mean. C# the language seems to be pretty current, things get fuzzier the closer you get to the enterprisey features as was already mentioned.
To sum things up, if you'll be using Mono as a separate target platform, you're likely to have good results. If you want a no-code-changes-required .NET compatibility layer, less so.
Very powerful. There are no major bugs in the core implementation. It is not a science project. The deficiencies are mostly where you would expect, the newest APIs (Microsoft inherently has a first-mover advantage there).
Yes. We just finished a project where most of the GUI code was developed in WinForms on Windows. I was able to work on it using Ubuntu without major headaches. That said, this is one of the hardest parts of the API, and there are still issues. See http://mono-project.com/WinForms for details.
Don't know, as I don't use it.
Yes, though again, there may be some missing APIs in the runtime.
Note, I use Ubuntu Hardy (8.04).
Mono is mighty powerful. It has all the .Net muscle on a very strong open source skeleton.
When you say "develop GUI application for linux like developing WinForm applications for Windows" I understand that you are asking about a visual designer that will allow you to quickly create the UI. Yes, it is possible. MonoDevelop has Stetic - a built-in visual designer for Gtk#. There is also QyotoDevelop which enables QT support in MonoDevelop.
Yes, MonoDevelop natively supports VS project/solution file format. You can use the same code base to compile your app with VS in .Net on Windows and win MD in Mono on Linux.
Currently Mono supports C# 3.0 with some stuff beyond that already implemented and a lot in the pipeline.
Yes, in many cases it is possible to run a .Net compiled app in Mono, however with MonoDevelop's support for VS solutions it doesn't really matter. It takes as much as pressing F7 to rebuild the whole project, so the effort is really negligible. The best tool for checking if your application can run in Mono is MoMA.
Mono is very powerfull, sometimes even more powerfull than Microsoft's implementation. link text
Yes you can. Winforms 2.0 is supported
I believe so.
Yes it does. C# 3 is supported and just look at winforms and the asp.net implementation to see how much is supported from each of the projects. Look at http://mono-project.com
I use WinForms in mono. The 2.x releases are very good.
I develop forms in visual-studio on windows, and run them in Linux, with zero code changes. Yes, forms look a little different than on XP, but then again, an XP-themed GUI would look kind of strange in GNOME.
If you are just getting started, stick with WinForms, while you get comfortable with Mono/Linux. However at some point you might want to investigate GTK.

Differences between .NET versions (predominantly c#)

Ive recently been asked to recommend a .NET framework version to use in a (GUI based) project for an XP machine.
Can anyone explain the differences between all the .NET versions?
OR,
Does anyone have a good reference to a site that details (briefly) the differences?
Jon Skeet's book C# In Depth has one section describing versions of .NET in details.
The only reason to not go for the latest version is that it can complicate deployment.
.NET 2.0 is installed automatically via Windows Update, so you can expect it to be on the target computer when your deploy your application. .NET 3.5 is not being pushed automatically yet, so you need to distribute the framework with your application. This will probably change in the near future.
If you are not concerned about deployment, then go for the latest version. The fact that you target the .NET 3.5 framework, does not mean that you have to use all the new technology. For instance you can still use Windows Forms instead of WPF, but that is another question.
The short answer is that it depends.
.NET 2.0 is the oldest version you should be considering.
.NET 3.0 is an easy upgrade path from 2.0, not the same amount of breaking changes as from 1.1 to 2.0. However it is more of an extension, horizontally of functionality, and you would not see a huge shift in graphical options.
.NET 3.5 should be looked at if you are interested in much more sophisticated gui such as sliverlight. It has a lot more new technologies and options to offer including WPF, a new IDE in Expression and much more. http://www.asp.net would not be a bad start.
This page is good for a list of changes:
http://en.wikipedia.org/wiki/Microsoft_.NET
As someone has already mentioned, .NET 2.0 is the minimum version you need to look at. Things like Generics make it a must have.
.NET 3.5 is the other version you should consider. It depends on how you want to design your projects, .NET 2.0 is very developer central, whereas .net 3.5 has a good split between designer and developer.
It doesn't really matter much. .NET 2.0, 3.0 and 3.5 all use the exact same CLR and base classes. Each version just adds a set of new assemblies. For GUI development, you're fine with 2.0 if you use Windows Forms, you'll need 3.0 for WPF. Since they are otherwise essentially identical, there is no good reason to not just install 3.5 SP1.

Categories

Resources