We are excited to inform you that the second public Preview release of CSHTML5 2.0 - now powered by Bridge.NET - is available for download!
IMPORTANT: Before updating any of your existing v1.x projects to v2.x, be sure to make a backup copy first.
Where can I download it from?
UPDATE: More recent versions are now available at: http://forums.cshtml5.com/viewforum.php?f=6
How to try it out?
- Install the VSIX above (for VS 2015 or newer)
- It will add a new category to the "New Project" dialog named "CSHTML5 v2"
- Create a new project using one of those new project templates (see screenshot below)
- Build the project
- Go to the "bin/Debug/Output/" folder and launch "index.html"
To update an existing project from CSHTML5 version 1.x to version 2.x:
- Please be aware that this action cannot be reverted easily. Therefore, we strongly recommend you to make a BACKUP copy of your project before updating it to v2.x.
- Go to the NuGet package manager, and add a reference to the latest version of the NuGet package named "CSHTML5". Note: if you don't see it in the list of available packages, it's because you must check the option "include prerelease" next to the search field.
What's new since the Preview 0.1?
- Fixed compilation issue when a project referenced another project (compilation error "Type not found: "XmlnsDefinitionAttribute"...") (see this post)
- Much improved Simulator support. Now WCF works properly in the Simulator, even though some JS errors are still displayed.
- Added support for "ServiceReferences.ClientConfig" files
- Made it so that a resource in a MergedDictionary can reference a resource defined in another MergedDictionary (note: only in App.xaml)
- Fixes an issue where "mailto:..." was considered a relative Uri
- Fixed an issue on templated TextBoxes that had IsReadOnly set to true
- Fixed an issue with ComboBox where it would not go to the different states when templated
What are the benefits of the 2.0 version?
- Whole new engine to convert C# to JS: now based on Bridge.NET instead of JSIL
- Better performance; Much faster load times; Smaller footprint; Minification
- Source maps (to debug in C# while running in the browser)
- Support for build servers and VSTS (Azure DevOps) for continuous delivery
- Support for newer C# versions (up to C# 7.2)
- Distributed as a NuGet package (and a .VSIX setup for project templates and design-time VS integration)
- Improved Mscorlib support, and errors are now also reported at Design-Time rather than Compile-Time
- Easier interop with JS frameworks (Angular, React, Vue...)
- Better leveraging of the browser cache
- Lots of bug fixes (support for "Post Build" event, support for the "dynamic" keyword...)
What are the known issues?
- Simulator support is currently limited. To test in the browser instead, please Build your project, and then manually go to the "bin/Debug/Output" folder with Windows Explorer and open "index.html". Please expect improvement of Simulator support in the coming weeks (wcf, serialization...).
- The XAML Editor being used is the one from CSHTML5 v1.x
- ResX files are not fully functional yet
- The "Showcase" project template has not been migrated yet - please expect it to be available very soon.
(The "Calculator" project template does work properly though)
Some regressions compared to v1.2 are expected while we are in this Preview phase.
Please report any issues as separate forum threads, so that we can easily track them and mark them as pending/solved.
We hope that you will enjoy this release and we thank all the people and companies that have helped us to make it possible.
Regards,
The CSHTML5 Team
Attachment - the "New Project" dialog: