v2.0 Preview 0.2

JS-Support @Userware
Site Admin
Posts: 1142
Joined: Tue Apr 08, 2014 3:42 pm

v2.0 Preview 0.2

Postby JS-Support @Userware » Sat Apr 06, 2019 3:22 am

Dear CSHTML5 users,

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?

  1. Install the VSIX above (for VS 2015 or newer)
  2. It will add a new category to the "New Project" dialog named "CSHTML5 v2"
  3. Create a new project using one of those new project templates (see screenshot below)
  4. Build the project
  5. Go to the "bin/Debug/Output/" folder and launch "index.html"
Note: lots of errors are expected in the Simulator at this time, but the browser version should run decently well in this Preview build.

To update an existing project from CSHTML5 version 1.x to version 2.x:
  1. 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.
  2. 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.
UPDATE: If you get an error that says "The 'AssemblyAttributesGenerator' task was not given a value for the required parameter 'OutputRootPath'" or "BeforeXamlProcessor (pass1) failed: System.IO.FileNotFoundException", please close and relaunch Visual Studio, and try again. Alternatively, killing all the running 'msbuild.exe' processes (via the Task Manager) can fix the issue too.


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:
New Project v2.png
New Project v2.png (32.81 KiB) Viewed 19577 times

Nick
Posts: 84
Joined: Tue May 30, 2017 9:44 am
Contact:

Re: v2.0 Preview 0.2 RELEASED!

Postby Nick » Sat Apr 06, 2019 10:54 am

No metter what I do I obtain next error:

Severity Code Description Project File Line Suppression State
Error C#/XAML for HTML5: AssemblyReferenceValidator failed: System.IO.FileNotFoundException: The system cannot find the file specified. (Exception from HRESULT: 0x80070002)

Server stack trace:
at System.Reflection.RuntimeAssembly.nLoadFile(String path, Evidence evidence)
at System.Reflection.Assembly.LoadFile(String path)
at DotNetForHtml5.Compiler.ReflectionOnSeparateAppDomainHandler.MarshalledObject.LoadAndProcessAssemblyFromPath(String assemblyPath, Boolean isBridgeBasedVersion, Boolean isCoreAssembly)
at DotNetForHtml5.Compiler.ReflectionOnSeparateAppDomainHandler.MarshalledObject.LoadAssembly(String assemblyPath, Boolean loadReferencedAssembliesToo, Boolean isBridgeBasedVersion, Boolean isCoreAssembly, String nameOfAssembliesThatDoNotContainUserCode)
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)

Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at DotNetForHtml5.Compiler.Common.IMarshalledObject.LoadAssembly(String assemblyPath, Boolean loadReferencedAssembliesToo, Boolean isBridgeBasedVersion, Boolean isCoreAssembly, String nameOfAssembliesThatDoNotContainUserCode)
at DotNetForHtml5.Compiler.ReflectionOnSeparateAppDomainHandler.LoadAssembly(String assemblyPath, Boolean loadReferencedAssembliesToo, Boolean isBridgeBasedVersion, Boolean isCoreAssembly, String nameOfAssembliesThatDoNotContainUserCode)
at DotNetForHtml5.Compiler.CheckingThatAssembliesCanBeReferenced.IsReferenceAcceptable(String referenceName, String referenceHintPath, String allowedAssemblies, HashSet`1 flags, Boolean isBridgeBasedVersion, String nameOfAssembliesThatDoNotContainUserCode, String projectDir, String referencesPaths, String typeForwardingAssemblyPath, ResultEnum& result, String& minimumRequiredCompilerVersionFriendlyNameIfAny)
at DotNetForHtml5.Compiler.CheckingThatAssembliesCanBeReferenced.Check(ITaskItem[] references, String allowedReferencesAsString, String activationAppPath, String flagsString, ILogger logger, Boolean isBridgeBasedVersion, String nameOfAssembliesThatDoNotContainUserCode, String projectDir, String referencesPaths, String typeForwardingAssemblyPath)
at DotNetForHtml5.Compiler.AssemblyReferenceValidator.Execute() AppSections (AppSections\AppSections)

JS-Support @Userware
Site Admin
Posts: 1142
Joined: Tue Apr 08, 2014 3:42 pm

Re: v2.0 Preview 0.2 RELEASED!

Postby JS-Support @Userware » Mon Apr 08, 2019 7:22 am

@Nick: does the error still happen after closing and relaunching Visual Studio?

Nick
Posts: 84
Joined: Tue May 30, 2017 9:44 am
Contact:

Re: v2.0 Preview 0.2 RELEASED!

Postby Nick » Mon Apr 08, 2019 3:25 pm

Problem flund.
You must specify in download file that files created with CSHTML5 1.x dosen't work in version 2.02 or more!
in my case was a wron path to package CSHTML5 and resource file constructor. Problem found, now compile test solution.

JS-Support @Userware
Site Admin
Posts: 1142
Joined: Tue Apr 08, 2014 3:42 pm

Re: v2.0 Preview 0.2 RELEASED!

Postby JS-Support @Userware » Tue Apr 09, 2019 12:02 am

@Nick: when you say "files created with CSHTML5 1.x", you mean assembly files (.DLL), is this correct?

Nick
Posts: 84
Joined: Tue May 30, 2017 9:44 am
Contact:

Re: v2.0 Preview 0.2 RELEASED!

Postby Nick » Tue Apr 09, 2019 4:46 am

I version 1.x I try to use Resource.resx files but, an error occure when try to create one, so I used standarc c# Resource.resx file and work ok in Version 1.x. Now in version 2.x Constructor for resx file dosen't have any parameters. (Maybe was corrected in 2.x, I will verify).
But I find another BUG in 2.x related to compile solution

Sreps:
First compile work OK
Second compile generate this error: (see attached image)

NOTE:
TT3 is the main application
AllInOne is a library (that use many others libraries) used by TT3
Attachments
err.png
err.png (41.01 KiB) Viewed 19599 times

JS-Support @Userware
Site Admin
Posts: 1142
Joined: Tue Apr 08, 2014 3:42 pm

Re: v2.0 Preview 0.2 RELEASED!

Postby JS-Support @Userware » Wed Apr 10, 2019 4:29 am

@Nick: RESX files are not supported in v2.0 Preview 0.2 yet. We are working on it.

As far as the second issue is concerned, could you please upload a small test project where we can reproduce the issue?
Thanks

Black-Byte
Posts: 17
Joined: Fri Jan 29, 2016 2:05 am

Re: v2.0 Preview 0.2 RELEASED!

Postby Black-Byte » Wed Apr 10, 2019 5:00 am

Hi,

i'm testing with the V2.0 P0.1 and have some issues. Something would be the support for JSON. With the Extension from https://gist.github.com/cshtml5/2446871 ... 448b6aca54 it doesn't works well with enums with a numeric replace.
The Bridge.NET has a JsonConvert that has no problem with that, you are allready using Bridge.NET could be a way to solve the Issue.
Here is an example https://deck.net/c46e881a5c0bc31d123664793cdd3b19

Other are performance things but i will convert my objects to native objects and test further.

Nick
Posts: 84
Joined: Tue May 30, 2017 9:44 am
Contact:

Re: v2.0 Preview 0.2

Postby Nick » Sun Apr 14, 2019 8:05 am

Error from above dosen't appear on new version V2.03! Was corrected!

JS-Support @Userware
Site Admin
Posts: 1142
Joined: Tue Apr 08, 2014 3:42 pm

Re: v2.0 Preview 0.2

Postby JS-Support @Userware » Mon Apr 15, 2019 4:02 am

Nick wrote:Error from above dosen't appear on new version V2.03! Was corrected!

Thanks


Return to “Pre-Releases, Downloads and Announcements”

Who is online

Users browsing this forum: No registered users and 38 guests

 

 

cron