Converting from VB.NET to Mercury
Mercury provides the option to easily convert an existing
.vbproj (and also
.csproj) for use with Elements.
There are three main ways to trigger a conversion:
When opening a
slnfile that contains one or more
.vbprojprojects in Fire or Water, these projects will show in the project tree, but grayed out as "unsupported". You can right-click an individual project and choose "Convert to Elements" from the context menu. This will convert the project in place, create a new
.elmemetsfile, and replace it in the solution.
You can use the "File|Import|Visual C# or Visual Basic.NET Project" menu item in Fire or Water to open and convert a
.vbprojdirectly. This will automatically create a new
.elementsfile based on the original project file. If a
.slnwith a matching name already exists in the same folder, it will be preserved, and a second Silution will be created for the new project.
You can use the
EBuildcommand line tool with the
--convertto convert convert projects from the Terminal/Command Line or from a batch script. On Mac, you will need to install the External Compiler to use the command line tool.
All three paths lead to the same conversion logic. The
.vbproj will be read and analyzed, and a new
.elements project will be created based on its contents. The
.vbproj will not be changed.
When converting projects within an open solution, as an added benefit, the IDE will also try to adjust any project references from existing Elements projects to the project being converted.
The conversion performs a number of steps to try and bring most settings and features over. This includes but might extend beyond:
- Removing legacy and unsupported settings.
- Adjusting settings that use different names in Elements, such as
Linq to SQL" (see here).
Please let us know if you encounter any problems converting projects, of have suggestions for more derails that should be carried over.