Moving from Visual Studio 2005 to 2008 and .NET 2.0 - c#

I'm currently using VS2005 Profesional and .NET 2.0, and since our project is rather large (25 projects in the solution), I'd like to try VS 2008, since its theoretically faster with larger projects.
Before doing such thing, i'd like to know if what I've read is true: can I use VS2008 in ".net 2.0" mode? I don't want my customers to install .net 3.0 or .3.5, I just want to install VS2008, open my solution and start working from there.
Is this possible?
P.D.: the solution is a c# Window Forms project.

Yes it's possible. In the project properties you can target different versions of the .Net Framework going back to .NET 2.0.
Upgrading to VS 2008 will upgrade your Solution file and you won't be able to go back to VS 2005 unless you have backed up your solution

yes, vs2008 can "target" a framework, but i think by default, if converting from vs2005 - vs2008 it just keeps it at framework 2.0

It is possible to have a 2.0 project in VS 2008. You would just target .NET Framework 2.0 under the project properties.
Your solution will have to be converted to a VS9 solution however.

Yes you can run 2.0 with VS2008. Be sure to select that when you convert, however. When converting a project, I mistakenly left in the ASP.NET 3.5 conversion, and then all new files contained references to Linq, so it was a little bit of a pain to switch back to 2.0 when I realized the mistake.

Yes, the feature that enables this is Visual Studio 2008 is called multi-targeting. See this link for more information. To use it you simply open the Properties for your Project, and select the Target Framework you want from the drop-down list on that page.

And bear in mind that all this stuff about the projects being compatible between 2005 and 2008 is NOT true for C/C++ projects.

I had absolutely no problems switching to VS2008. :) Multi-targeting worked without a hitch.

Related

Using SSH.NET on C# Console application in Visual Studio 2008 and .NET Framework 3.5

I have a Visual Studio 2008 project in C# with .NET Framework 3.5 and I would like to use SSH.NET library but I see no binaries there for last stable release 2016.0.0.
Also in home page says it has been moved to here. Once I go to this page, I see three branches, develop, master and sftpfilestream, so which one I have to take which is compatible with .NET Framework 3.5 (My project uses .NET Framework 3.5 on Visual Studio 2008)?
Also If I downloaded any of them, once unzipped I do not see any DLL, only projects. Well, in fact, I prefer to reference a project within mine in order to use it, but by curiosity, where are the binaries (DLLs)? and which project is the correct I have to add to mine for .NET Framework 3.5?

Can't use task.delay feature

I want to use the Task.Delay feature to set a delay in my program. I read and found out it's only in .NET Framework 4.5+. So I went ahead and downloaded .NET Framework 4.5. Well I still can't use this bit of code.
I'm not sure why. Any thoughts? I'm new to this so sorry if this is a dumb question. I'm using Visual Studios 2010 Express C#. Thank you for any help offered! Much appreciated!
Visual Studio 2010 Express can only target .NET 4. Download the latest edition and you should be set.
This could be a variety of things, but it sounds like you need to target .NET 4.5. Simply downloading .NET 4.5 doesn't tell your particular application that is should target that framework. You'll need to right-click on your solution and click properties, and then choose .NET Framework 4.5 as your Target Framework.
Edit: Asik beat me to it and was correct, I didn't even think about that. Once you download the latest version, you'll still need to change your target framework.

How to create .NET2 compatible app in VS2010?

I'm using Microsoft Visual Studio 2010 and .NET4, but I would like to create application(Windows Form Application) that can be also run in .NET2. The reason is that I want it to be very easy to use and portable across many machines and not everybody has .NET4 installed.
Can I do it or do I need to install older version of Visual Studio? Is so what version is the best for most portable .NET app.
You can modify the target framework in the properties of the project:
You can select which .NET Framework version you want to target when you create a new project. If you want to change the framework of an existing project, do what Darin has illustrated.
Just modify the target framework by looking at the propeties of the solution you are working on.
I would highly advise you to target .NET 3.5 just based on the age of .NET 2.0.
.NET Framework 2.0 was attached to Visual Studio 2005.
By modifying the target framework is the way, but if you are thinking of portable maybe what you need is some kind of native code that works in every and/or most windows version.
Don't forget to delete redundant namespaces from your namespace list. For example LINQ...

What software do i need to install to use WPF in VS2005

I have VS2005 and .net 3.5 installed on my machine I have heard of WPF and want to practice WPF solutions what other software should I install to write WPF program in VS2005 as it does not show any option for the same by default.
Also any link for some cool stuff for beginners on WPF will be very helpful.
Please help
You can get them from here: http://download.cnet.com/The-Visual-Studio-2005-extensions-for-NET-Framework-3-0-WCF-WPF-November-2006-CTP/3000-10250_4-10727672.html.
This was the last version Microsoft released before telling everyone to go with VS2008. If you can't do VS2008, this is an ok solution. We used it for a year and a half and have production UIs running based on it. The problems are that the designer is basically non-existent (so be ready to code XAML by hand), it can be a bit slow, and there's some bugs.
Re: 3.5, VS 2005 is incapable of handling 3.5 projects, linq, etc. If you really want, you can work outside of VS and just use msbuild 3.5. An interesting fact: .Net 3.5 replaces, among some libraries, the PresentationFramework assembly. The new version of this assembly includes additional methods and method signatures that are not included in .Net 3.0. This means that these new 3.5 methods will be accessible in VS2005.
Vinay,
i don't think 2005 can do WPF and it definitely cannot handle .Net 3.5. VS2005 is 2.0.
Start with downloading VS2008 Express. It's free and will have the tools you need to get started with WPF.
http://www.microsoft.com/express/download/
Microsoft had release a extension called "VS 2005 Extensions for .NET Framework 3.0 (WPF & WCF)" but it is not longer available and supported and Microsoft recommends that you upgrade to Visual Studio 2008.
I believe you'll need Visual Studio 2008 in order to do WPF (Windows Presentation Foundation) development, however, there is a way to do some Silverlight (which is a subset of the "full" WPF technology) using Visual Studio 2005. See here:
Silverlight with Visual Studio .NET 2005
You'll need the .NET Framework 3.0 at least, as well as the Silverlight Developer Runtime
Don't forget, though, that you can effectively get a "free" version of Visual Studio (via the Visual Web Developer Express 2008 version) which, I think, will allow "full" WPF development.
Building the Perfect Developer Workstation for WPF by Tim Sneath should answer your question

Converting Visual Studio 2008 project to 2003

Very blunt and to the point, but does anyone know how to convert a visual studio 2008 project to visual studio 2003, I'm meant to be delivering some stuff to a client and they only work in 2003.
Sorry someone makes a very good point, what language, C# is the answer.
I've done a bunch of searches on Google and tend to only come up with 2003->2008 and not visa versa, I would very much appreciate any help.
It cannot be done in the general case, as the VS2008 project may use .NET 3.5 features that don't exist in .NET 1.1 used in VS2003.
If you only have .NET 1.1 features in your VS2008 project, you could conceivably just copy the files, create a VS2003 project, then use "Add Existing Item" to get those items into the VS2003 project.
2008 has more settings than 2003. So if the project has some special settings your screwed.
Else create a new 2003 project and copy all the source files? (and use the same configuration)
It is going to be very difficult because VS2003 projects use .NET 1.1 and VS2008 use .NET 2.0, 3.0 or 3.5 (depending on the configuration of the project). The problem will be that there are features that have been to each version of the framework, and it is likely the code will use features that do not exist in .NET 1.1
There were converters to go from the old VS2003 project format to the MSBuild format used by 2005/2008, but I don't think any exist to go backward. Keep in mind that any non-trivial project in VS2008 might be challenging to move to VS2003 -- especially for an automated tool. For example, WinForms went through massive changes between VS2003 and VS2005.
Please correct me if I'm wrong, but doesn't Visual Studio 2003 only support .net 1.1? That means that if you have a .net 2.0 or 3.5 Application you have a problem. For C++ I guess it's a similar issue due to the old compiler.
Means: I believe it's borderline-impossible.

Categories