Click here to Skip to main content
15,888,069 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
Hi,

I am developing a windows application on Visual Studio 2008.if i can run this project
on Visual Studio 2005?

Thanks,
Balu
Posted
Comments
BillWoodruff 7-Dec-11 0:03am    
Please clarify:

1. do you have the souce code for the application, or, only an executable, or dll's ?

2. do you mean ... if you have the source code ... can you open the project in VS 2005 ... and, if you are making use of .NET FrameWorks > 2.0, can you then use those FrameWorks in VS 2005.

Please keep in mind that "run," for most of us, refers to executing the program, not building/compiling.

There is no such concept as "run" for projects. You can run the application obtained from the project build, but it has nothing to do with Visual Studio at all. The compatibility of an application depends on its target platform version, and CPU instruction-set architecture and the platform used to load it: installed .NET Framework version and CPU.

No, you cannot open VS 2008 project with VS 2005.

You can only try to re-create a project as a VS 2005 project using original project as a sample. There are downgrade conversion tools, you can find some in CodeProject articles. However, it may or may not be successful because 1) a 2008 project can use C# 3 features not supported by VS 2005 which supports C# 2.0; 2) a 2008 project can use .NET Framework 3.5 features not supported by VS 2005 which is targeted to v.2.0 only. You can try to see compilation errors and find some work-around…

In some cases such work-around will be impossible from all practical points of view. For example, you hardly can do much if original project uses WPF. :-)

—SA
 
Share this answer
 
v4
Comments
Manoj K Bhoir 7-Dec-11 1:46am    
Excellent answer!My 5!
Sergey Alexandrovich Kryukov 7-Dec-11 1:49am    
Thank you, Manoj.
--SA
BillWoodruff 7-Dec-11 3:11am    
This answer seems a little "quick on the trigger:"

We don't know if by "run" he means open for development in VS 2005, although that is most likely that is what he means.

It is possible this user has a VS 2008 project set to compile against FrameWork 2.0, and that makes use of no advanced features of later versions of the FrameWork.

That's why I asked the clarifying questions I did in the comments.

See my answer below for a fuller consideration.
Sergey Alexandrovich Kryukov 7-Dec-11 8:55am    
This is a different thing also covered by my answer, as a special case. The project still won't be opened and will need downgrade conversion, which will always be successful.
--SA
BillWoodruff 7-Dec-11 14:31pm    
In a comment to my answer below, SAK wrote: "if the original solution is targeted to the .NET Framework v.2.0, it's likely can be downward-converted from to 2005 solution by just changing *.*proj (and *.sln) files not touching other source files because no incompatible .NET v.3.0-3.5 features are used."

Now that's valuable, specific, information: if you had removed the opening aria-rant-tirade about the use of the word "run," and included that information in your answer, and made the writing about language/FrameWork versioning issues a little more clear:

You'd have my #5 :)
One of the world's possibly most expert programmers in C# and .NET, Jon Skeet, the author of "C# in Depth," (imho a "masterpiece" of technical writing) discusses a similar situation here, where a user wants to open a VS 2010 project in VS 2008:[^].

Visual Studio has been, so far, backwards compatible between versions: you can open a VS 2005 solution in VS 2008, for example, and there have been automatic converters that start-up when opening a solution created in an older VS in a newer one that take care of adjusting project structure, report incompatibility errors, etc.

However, if you start a new solution/project in VS 2005 of the same type (WinForm, Wpf), and import the project files from the VS 2008 solution, under the following conditions you may get the VS 2008 solution to open and build with some fiddling:

1. don't move over the 'bin or 'object folders from the VS 2008. (obvious, huh)

2. the solution in VS 2008 should have been set to compile against the FrameWork version you can compile against in VS 2005.

3.the code in the VS 2008 solution must make no use of any newer features of the FrameWork than those supported by VS 2005.

However, the fact you could do this, doesn't mean you should do this !
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 7-Dec-11 9:37am    
Well, the clarifications are probably useful, but they don't add anything to what I've written, but your answer itself has some unclear points. When you say "under the following conditions you may get the VS 2008 solution to open" you should make it clear that a project file won't open automatically anyway, even under conditions you list. I explained it in my comment to your comment to your answer. You also did not explain your own "almost correct" statement you made there. The statement is not correct; read below:

So now I will need to clarify it: if the original solution is targeted to the .NET Framework v.2.0, it's likely can be downward-converted from to 2005 solution by just changing *.*proj (and *.sln) files not touching other source files because no incompatible .NET v.3.0-3.5 features are used. As say "likely" because another source of possible incompatibility is language: a project can be written in C# 3 still targeting .NET Framework 2.0. In your comment to my answer you did not take into account the language which makes your statement incorrect.

#1 us not clear. Those folders are not part of the source code at all, they are generated in the build and cannot be taken into account. When you deliver a project (for revision control system, for example) you should never include them. Most likely this item is irrelevant. If did not understand you, please explain.

So, I did not vote. Anyway, I think at this point OP should have correct picture.
--SA
BillWoodruff 7-Dec-11 14:15pm    
SAK: "When you say:

'under the following conditions you may get the VS 2008 solution to open'

you should make it clear that a project file won't open automatically anyway, even under conditions you list."

My statement you quote, written in the context of clear instructions to create a new VS 2005 project and import the files from VS 2008, a scenario where it is clear that you are re-creating the 2008 version in 2005: may be unclear to you, but my guess is would perfectly clear to almost everyone else.

My writing, on QA, for people who are obvious newcomers, tries to focus on the essentials of the question, and tries to involve, as possible, the OP in a dialogue.

I often give warnings, like the one about not moving the bin and obj files given above, because many beginners may well think that moving the files implies moving everything in the solution. Yet, even that comment, was indicated to be probably not required, by my statement in parens at the end of it: :(obvious huh ?)"

My only goal here is to help the OP in a clear and respectful manner. I take care to caution the OP, as I think appropriate, about the inherent difficulties in such a scenario. And, particularly if I believe they are not native-English speakers, I try to give wide latitude to the semantics of their question.

This gives me pleasure :) As much pleasure as when I can take an answer from you which is as esoteric as a Tibetan Tantra, separate out the fervid oratorical parts, the digressions, etc., and make sense of it :)

But, the best pleasure is feeling that the OP has been really helped towards a greater understanding, not just received a quick-bandage over a wound incurred in their "homework wars."

There's a beautiful word in Theravadan Buddhism for this "inner" feeling/state: "mudita:" spontaneous joy in the happiness, good fortune, and accomplishments of others.

To counter-act any impression I may give here that I am advocating some "New Age Disneyland" philosophy, I think it's also quite appropriate at times to directly confront an obviously lazy poster. Or, to tell someone bluntly that the level of confusion they exhibit in their question really means they need to get a good book, or mentor, and work on "fundamentals."

For myself, before "picking up the sword" in these cases, I first examine whether my intention is "clouded" by anger or some other negative "state:" only if I feel I am "detached" from any possible "rapture" of sword-play, do I then use that sword.

And, of course, I fail to meet my own standards regularly :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900