- NOTE: The source code above corresponds to CSHTML5 version 2.x,
- which is currently in the "Technology Preview" phase. You can
- download the VSIX of the version 2.x Preview at:
- http://forums.cshtml5.com/viewforum.php?f=6
CSHTML5 – also called 'C#/XAML for HTML5' – is the first production-ready solution to make web apps in C# and XAML. It is also the only tool that enables to port existing Silverlight and WPF applications to the web, by compiling C# and XAML files to HTML and JavaScript.
Further information can be found at: http://cshtml5.com/
CSHTML5 version 2.x is powered by Bridge.NET
- Clone this repository locally or download it as a ZIP archive and extract it on your machine
- Execute the file "restore-packages.bat" (by double-clicking on it in Windows Explorer)
- Open the solution file "CSHTML5.sln" (located in the "src" folder) with Visual Studio 2017 or newer
- Build either the "Debug" configuration or the "Migration" configuration, depending on whether you want to use the "CSHTML5" NuGet package (recommended for creating new apps) or the "CSHTML5.Migration" package (recommended for migrating existing Silverlight or WPF applications). This will generate the assembly "CSHTML5.dll" in the "bin/Debug/" folder, or the assembly "CSHTML5.Migration.dll" in the "bin/Migration/" folder.
- Create a new Visual Studio project of type CSHTML5 version 2.x. To do so, you can install the VSIX available at http://forums.cshtml5.com/viewforum.php?f=6 (look for the latest version 2.x), which will add new project templates to the Visual Studio "New Project" dialog.
- Build the CSHTML5 source code (cf. previous question)
- Copy the file "CSHTML5.dll" from the "bin/Debug/" folder of the CSHTML5 source code (ie. the source code in this repository) into the "packages/CSHTML5(...)/lib/net40/" folder of the project that you created at step 1, overwriting the existing file
- Build and run the project that you created at step 1
The full source code of the CSHTML5 runtime has now been published to GitHub. You should be able to view and modify the source code of all the .NET types, the C# types, and the XAML types. Many low-level types are located in the Bridge.NET repository, which is located here. Any remaining parts will be published to GitHub as soon as possible.
The CSHTML5 source code is dual-licensed:
- GNU General Public License (GPLv3). Please note that this license does not permit incorporating the code into proprietary programs nor into programs that are distributed under a license other than GPLv3. More information can be found in the LICENSE.txt file.
- Commercial licenses. They can be obtained from: http://cshtml5.com