If you are using the pre-built binaries
Unfortunately, due to the current way in which the Templates and Wizards generate plugin projects, upgrading the SDK will cause all these projects to be built against the new SDK. This means that your code might not work without some changes to update it to the new API. As such, we strongly recommend that you make a backup of your code before performing the upgrade and fixing any issues. If you should need to revert to the older version of the SDK, you would only need to uninstall the new SDK and reinstall the older version. There is an open ticket to improve the SDK and make multiple version, side-by-side installations possible.
For now, if you need to maintain and update a version of your code that works with the older SDK alongside a version that works with the newer SDK, you should keep multiple independent Visual Studio solution trees (i.e. the solution, the projects, and their files are all independent of those for another version of the SDK). Then, before upgrading the SDK, you can make a copy of the old SDK binaries, and manually update your project files: change the references to the old SDK copies, and remove the CCDEVCOPY line in the Post Build Event (accessed through the properties of each individual project).
The actual process of upgrading the pre-built binaries is straightforward:
| 1. | Download and install the latest version of ClearCanvas SDK. You will have to uninstall the previous version. |
If you are using the source code (fresh checkout)
Due to the changes in the API, your code might not work without some code changes. As such, you may wish to keep the development trees of each Framework version separate from each other, so that there will always be a working copy with the old version, while the new version contains changes specific to the new API. Rather than upgrading the old source code, you can checkout a fresh copy of the source code to a different location, copy your old project files over, and make any required changes in the new copy without touching the older version.
If your plugin projects are in the ImageViewer.sln solution file, the steps are straightforward:
| 1. | Follow the Getting the code instructions to checkout a new copy of the source code to a new directory. |
| 2. | If you have your solution open in Visual Studio, you should save any changes and close it now. |
| 3. | Make a copy of your project files. We recommend using some sort of naming convention to distinguish the Framework version in the solution filename or path. |
| 4. | Open the new ImageViewer.sln in Visual Studio. |
| 5. | Add the new copies of your projects to the solution. If you added the referenced assemblies using the project names, they should automatically resolve to the new version of the projects. |
If your plugin projects are in your own solution file, there are a few extra steps:
| 1. | Follow the Getting the code instructions to checkout a new copy of the source code to a new directory. |
| 2. | If you have your solution open in Visual Studio, you should save any changes and close it now. |
| 3. | Make a copy of your project files and your solution file. We recommend using some sort of naming convention to distinguish the Framework version in the solution filename or path. |
| 4. | Open the new copy of your solution in Visual Studio. |
| 5. | Remove the old ClearCanvas.* projects and add the same projects from the new source code directory. |
If you are using the source code (in-place update)
Due to the changes in the API, your code might not work without some code changes. As such, we strongly recommend that you make a backup of your code before performing the upgrade and fixing any issues. Once you have performed the update, you cannot build against the older Framework. If you should need to revert to the older version of the Framework, you would have to load your code from backup, and perform this switch again (with the older Framework source code as the target instead).
To perform the source code update using TortoiseSVN, replacing the old Framework code with the new one:
| 1. | In Windows Explorer, right-click on the C:\VSProjects\ClearCanvas directory (or wherever the Framework source code is) and select TortoiseSVN > Switch. |
| 4. | If Tortoise requests authentication, use the following: username = 'opensource', password = 'opensource'. |
| 5. | The source tree contains a number of changed files in addition to some overhead for the upgrade procedure, so be prepared to wait a few minutes, depending on the speed of your Internet connection. |
To perform the source code update using the command line:
| 1. | In a command line window, go to the directory where the source code folder is (such as C:\VSProjects). |
| 2. | Type in the command: svn sw svn://svn.clearcanvas.ca/source/Xian/Tags/RisViewer2.0SP1 ClearCanvas (note the case – it matters). |
| 3. | If prompted for authentication, use the following: username = 'opensource', password = 'opensource'. |
| 4. | The source tree contains a number of changed files in addition to some overhead for the upgrade procedure, so be prepared to wait a few minutes, depending on the speed of your Internet connection. |