converting java projects to c# with visual studio 2010 - c#

i remember that previous versions of visual studio contained a converter, that automatically attempt to convert java projects to the corresponding c# code.
however in visual studio 2010 beta 2 i cant find this anymore?
has it been removed?
thanks!

The Java Language Conversion Assistant has been removed from Visual Studio 2008 and future versions. You have few options:
Install VS 2003/2005 and run the assistant
Purchase a commercial solution
Do the conversion by hand
Use ikvmc to compile jar files into managed .NET assemblies (personally I've done this with success)

I think that was visual studio 2005 , as far as i know it doesn't exist on 2008 or 2010

Related

open visual studio 2012 projects in visual studio 2008

Im writing an applcation with C# in visual studio 2012 but i want to open that project in another place in visualstudio 2008. How i can do this? in saving i have to do something? Or in oening in visualstudio 2008?
Since I am stuck with VS 2008 in my home computer, I regularly have to do this.
You can modify your solution file (*.sln) manually. Most of the time you just have to change the first two lines that define the VS version of the solution.
From this link:
You can edit the sln and csproj/vbproj files by hand and try that way, I've used this method with no side effects. In the sln file the first lines for VS2010 will say
Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
and for a VS2008 solution:
Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Also, in a 2010 project file you may find a section like
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
which will need to be modified as
<Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v9.0\WebApplications\Microsoft.WebApplication.targets" />
With only these 2 types of changes I was able to open the solution & projects with VS 2008.
It's not possible.
Visual Studio generally doesn't support forward compatibility -- that is, opening a newer project in an older version of Visual Studio. It generally supports backward compatibility -- opening an older solution in a newer Visual Studio.
Your only real option here is to retain it as a 2008 solution; even then, when you open it in 2012, it may ask you to convert it to a 2012 solution format, which will make it unusable in 2008.
I have found this while I was Googleing. It may be useful in your case:
Visual Studio Project Converter
Disclaimer: I have not personally tried this program.
I had the same need basically because I wanted to keep the compatibility with .net 3.5.
Although VS2010 and VS2012 support projects running on this FW version, many users are still forced by their companies to use VS2008 or 2010.
I could also develop in 2008 but as a geek that I am I dind't even consider it! :)
So, my solution was to create separate *.sln and *.csproj files for each VS version.
This way you guarantee that everything will work out of the box for each VS version.
The easier and faster way I found to do this was to open eash VS version and create empty solution and projects, with the same structure as the original but with the vs version on the name like:
my.solution.sln
my.project.csproj
...
my.solution.vs2008.sln
my.project.vs2008.csproj
...
my.solution.vs2010.sln
my.project.vs2010.csproj
...
Keep in mind that you have to manually open all the versions and add the new files and so on... they won't be automatically synchronized but it pretty much works.
Hope this helps,
Cheers!

Opening Visual Studio 2005 C# project with CrystalDecisions

First I'm sorry for my bad english it's not my native language.
I'm new to my entreprise and I have to re-code a C# application. This application is in relation with CrystalReport and uses many references called "CrystalDecisions.blabla".
My problem is: by default the project opens with Microsoft Visual C# 2008 but the references to CrystalDecisions are missing. The guy that first developped the app was working on Microsoft Visual Studio 2005 but the one installed on my computer doesn't support C#, only sql server.
What am i supposed to do? Is there some libs i can download to use on Visual C# 2008? Do I have to reinstall Visual Studio 2005 to have C# supported?
Thanks in advance :)
Edit: I actually had a file called "CRRedist2005_x86.msi" which I never noticed. After installing those redist the references worked. Thank you guys for your fast answers.
I wouldn't download a new binaries for VS 2008, as considering that previous version was on VS 2005, means that it compiles against .NET 2.0, so for supporting original CrystlReport binaries its enough for you to set target framework of your project to version 2.0
It's (I think) almost impossible that you install VS 2008 and don't have a support for C#. I suppose you're talking about ExpressEditions which are free of charge. Can have a look here for downloading C# for 2008. If you wan that. I would suggest, at this point download immidiately the Visual C# 2010 Express.
Hope this helps.
The Crystal Reports references are linking to files Visual Studio can't find. Copy tese DLL files to your computer en relink the references.

Visual Studio version-agnostic projects/solutions: is it possible?

I remember seeing an open source project within the last year that I was able to open in both VS 2008 and VS 2010 without an upgrade wizard popping up. I think...
Is it possible to create a project/solution that will open up in any version of Visual Studio without prompting me to run the upgrade wizard? If so, how do I do this?
Information for both C++ and C# projects would be most helpful.
You can, use CMake and generate VSx solution.
I think the project that you have seen had 2 visual studio solutions for different visual studio versions.
Update:
Also, you can use http://sourceforge.net/projects/vspc/
or see http://www.emmet-gray.com/Articles/ProjectConverter.htm
The solution format hasn't changed significantly over the visual studio versions except the version number.
If the code itself is generic enough (not using linq, etc) then you can edit the first line of the solution file to "downgrade" the version.
VS2005 uses:
Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005
You can give the Prebuild project a try to generate needed solution files on the fly.
Prebuild is a cross-platform XML-driven pre-build tool which allows
developers to easily generate project files for major IDE's and .NET
development tools including: Visual Studio .NET 2002, 2003, 2005, 2008, 2010
SharpDevelop, MonoDevelop, NAnt and Autotools.
May be it is not what you ask about, but you can convert you project into nmake target
The only way to do this is to create separate solutions (for 2010 and 2008), and include existing projects to different solutions. Create new projects in VS2008, and then add them to VS2010 solution.
You may need something like round-tripping
Round-tripping is the ability to use a current or previous version of Visual Studio to target a platform that is supported by both versions of VS. For example, with round-tripping, you can open projects from a previous version of VS in a newer IDE without the need for conversion, thus allowing you to work side-by-side on old and upgraded projects.
Read more

Can other version of Microsoft Visual Studio be opened with Microsoft Visual Studio 2005 C#?

Can other version of Microsoft Visual Studio be opened with Microsoft Visual Studio 2005 C#?
Projects created with previous versions can, and will invoke a project conversion wizard. Projects created with later versions cannot, generally. I found a downgrade utility on, of all places, Mises.org. I didn't write it, and haven't even tried it, so your mileage may vary.
You can open projects created with older releases of Visual Studio 2005, like 2002. A migration assistent will help you to update the project files.
If you're asking if you can run, say, an instance of Visual Studio 2008 next to 2005, then yes. I've done it many times. When you double-click on a .sln file, what actually runs is a little stub program that examines the .sln and decides which is the best version of Visual Studio to launch it in.
If you're asking whether you can open a solution created in VS 2005 in another version of VS, then the only restriction is that it has to be more recent than VS 2005. EG: you can't open a Visual Studio 2008 solution in VS 2005.
Sometimes you can change the version of the solution file manualy. Open it in text editor and manually change the line "Microsoft Visual Studio Solution File, Format Version 11.00" to earlier. Sometimes can help :).

Visual Studio 2005 Add-in Project Template

I am trying to find a way to develop my own Add-in in C# for Visual Studio 2005 at home, but I don't have the template that comes in the full version of the VS2005.
If I get the template, can I compile it on the Express edition?
Does anyone have it? Where can I find it?
I can't comment specifically on the Add-in Project template, but I know that the Express version of Visual Studio doesn't have the template for Windows Services, but also doesn't have the required libraries (System.ServiceProcess) to be able to compile a Windows Service project.
A trial of VS 2005 might be hard to come by these days, but have you tried downloading a trial of VS 2010 and, if you need to, targeting the .NET 2.0 framework?

Categories