Tuesday, March 8, 2011

Issue for Web Edition Projects Going From 2011 R1 back to 2010 R5

If you are creating web applications and are going back and forth between Real Studio 2010 R5 (or R5.1) and 2011 R1, there is the potential for project corruption but there is also a solution.

If you save a project in 2011 R1 then reopen it in 2010 R5, the project will open but it will not run. When you run the project, you will get a fatal error:
Just as Real Studio warns when you opened the project, there is the potential for data loss. In this case, the likelihood is very high. In R1 there is now a TargetWeb constant which you can use to write code in classes and modules you share between your web and desktop projects. This constant can be used to include code in shared classes and modules that should only be compiled into your web projects. Unfortunately in order to support this, the project format is no longer backwards compatible. Again, this is only for web projects. Desktop and console projects are not affected. Once you save a project in R1 it will no longer run in R5.

The good news is that there's a relatively easy way to fix your project should this happen. To fix your project:

1. Using R1, save your project in XML format by choosing Save As from the File menu and then choosing the XML Project option from the Format popup menu.

2. Quit Real Studio and open the XML version of the project in a text editor.

3. Search for 3 and then change the 3 to a 1.

4. Search for True and delete this line.

5. Search for -1 and change the -1 to 9000.

6. Save your project. Now you can reopen it in 2010 R5 and it will run. You will still get the warning when you open it but this will go away once you save the project in R5.

If you are using the Version Control Format for your project, do the following:

1. Open your project in a text editor.

2. Change Type=Web to Type=Console.

3. Change WebLivePort=-1 to WebLivePort=9000.

4. Save your project. It will now open and run in 2010 R5.

Again this particular issue only affects web projects that were saved in R1 and need to be opened and run in R5.

We apologize for this inconvenience. We really try to keep the project format as compatible as possible when you move back and forth between versions but that's not always possible. However, we are going to add something in a future release of Real Studio so that you don't accidentally find yourself in situations like this one.

No comments: