Export (0) Print
Expand All

Common Issues in Upgrading Projects from Visual J++ 6.0

Visual Studio 2005

In general, you should ensure that a project in Visual J++ 6.0 is able to build and run in that environment before attempting to upgrade it to Visual J#. If a project has build errors in Visual J++ 6.0, it is likely that the upgrade analysis will be incomplete and will fail to detect some or all of the upgrade issues.

There are a number of differences between Visual J# projects and Visual J++ 6.0 projects. Some of the issues related to upgrading projects are the following:

  • CLASSPATH is a feature in Visual J++ 6.0 that allows the user to specify the locations to look for additional references. This setting is not supported in Visual J#. To add additional references, create a library of the files in the CLASSPATH and add that library as a reference to the Visual J# project. See Adding and Removing Project References for more information. See Visual J# Binary Converter Tool for information on how to convert libraries and applications available only as bytecode (.class) files to MSIL assemblies.

  • Output packaging is now done using Setup Projects in Visual Studio. Packaging format information, such as packaging of the project as a CAB, ZIP, or self-extracting executable file, is not upgraded to the new project.

  • Deployment information like company name and product version, which is stored in the packaged executable, is upgraded as assembly properties in Visual J#. See Setting Assembly Attributes to learn more about assembly attributes and how to use them.

  • Pre-build and post-build settings are not supported in Visual J#. These settings from the Visual J++ 6.0 project are not upgraded to Visual J#. If you want a custom build step on a Visual J# project, add a C++ Makefile project (see Creating a Makefile Project) to your solution and change the Configuration Type property to Utility (see General Property Page (Project) for more information). See Understanding Custom Build Steps and Build Events for more information.

  • Source control settings from the Visual J++ 6.0 project solution are not upgraded to the Visual J# solution file. The new Visual J# solution file and project file (.sln and .vjsproj) have to be added to source control. Use the Change Source Control command on the Source Control menu to rebind the projects to their server locations.

  • In Visual J++ 6.0, one project can access the classes defined in another project. If such a project is opened in the Visual J# development environment, it will not compile. You need to add a project reference, as follows:

    1. Open the Visual J++ 6.0 solution in Visual J# and, when prompted, upgrade each project in the solution.

    2. If necessary, add a reference to the vjswfc.dll and vjswfchtml.dll. See Add Reference Dialog Box for more information.

    3. Make sure the Output Type property of the project whose class is being referenced is a Class Library project. Build the project.

    4. Make a reference to the project that contains the class from the project that uses the class.

  • In a Visual J++ 6.0 solution that contains multiple projects, if one or more projects are not upgraded the first time you upgrade the solution, the remaining projects are marked as non-buildable. The next time you open the upgraded solution, you are prompted to upgrade the remaining projects. Even after upgrading them, they continue to be marked as non-buildable in the solution. This means that when you build the solution, these projects are skipped.

    To include these in the solution build, do the following:

    1. Right-click the solution node in Solution Explorer, and choose Properties.

    2. In the Solution Property Pages dialog box, select the Configuration subfolder of the Configuration Properties folder.

    3. In the Configuration combo box at the top of the dialog box, choose All Configurations.

    4. For each project, ensure that the check box in the Build column is selected.

  • Visual J# supports the Visual J++ 6.0 extensions that are listed in Support for Visual J++ 6.0. Note that the @conditional attribute works only for methods and callers in the same compiled unit. See Conditional Debugging Support for more information.

  • A Visual J++ 6.0 solution containing multiple projects and one or more circular dependencies cannot be upgraded to Visual J#. For example, if a Visual J++ 6.0 solution contains projects A and B, A can use classes in B and B can use classes in A if the Merge all Project-specific Classpaths in solution property is set (it is set by default for all projects).

    In Visual J#, this solution would be upgraded so that project A adds a reference to project B and project B adds a reference to project A, so long as both projects were class library projects. However, circular references are not allowed in Visual J#. Thus, you need to combine both the projects into a single assembly in Visual J#.

Community Additions

ADD
Show:
© 2014 Microsoft