v2.0 Preview 0.1

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

v2.0 Preview 0.1

Postby JS-Support @Userware » Sun Feb 24, 2019 5:22 pm

Dear CSHTML5 users,

We are excited to inform you that the very first 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:
  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', 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 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 24147 times

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

Re: v2.0 Preview 0.1 RELEASED!

Postby Nick » Mon Feb 25, 2019 1:47 am

Installer work OK,
Compile speed improve (more faster for c# code)
In my case, "dynamic" still not work,
Form on multiples open still lose size and display as maximize, (except first time, ViewBox size problems ?)

Compiled code (js files) my impresion is they have ~ the same sizes as before used version 1.2.x and have format of JSIL compiler, open js code from simulator is posible (But I use CHSTML5 pamaters in .proj files for*.js generated files in custom directories)
(Look like old version of CSHTML5)

Now install last version of CSHTML5 from NuGet, in main project (packages instalation OK)

App not compile!

Error:
Severity Code Description Project File Line Suppression State
Error The "AssemblyAttributesGenerator" task was not given a value for the required parameter "OutputRootPath". testAA0

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

Re: v2.0 Preview 0.1 RELEASED!

Postby JS-Support @Userware » Mon Feb 25, 2019 6:06 am

Thanks for your feedback!

Nick wrote:Error The "AssemblyAttributesGenerator" task was not given a value for the required parameter "OutputRootPath". testAA0

To fix this error, please try to relaunch Visual Studio and to force a manual rebuild of the project (not a rebuild of the solution but each single project by right-clicking on the project name in the Solution Explorer). Please let us know if it fixes this issue.
Thanks!

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

Re: v2.0 Preview 0.1 RELEASED!

Postby Nick » Mon Feb 25, 2019 5:38 pm

If you get a project created with version 1.x, and install NuGet package,
then try to compile the project this error occure:

Error:
Severity Code Description Project File Line Suppression State
Error The "AssemblyAttributesGenerator" task was not given a value for the required parameter "OutputRootPath". AppEntities

Close Solution, Close Visual Studio 2017 (I need to use VS 2019 ? just ask for 2019)

Open again VS 2017, Open Solution, The lower project dosen't have NuGet Referenced assemblies with yellow icon, and compile. (but this is a trick!)

Note,
I have a App that create solutions for CSHTML5 from an app (custom designer) and compile the generated projects (using cmd and msbuild.exe) and at the end expose the js files, if this error occure in the process then the js files will not be created! (Do you will correct this error to complete the VS flow ?)

from cmd using msbuild.exe I receive this error:
C:\.....\GeneratedCode\Application\AppEntities\AppEntities.csproj : error MSB4057: The target "Build" does not exist in the project.

NOTE:
This errors dosen't exist on CSHTML versions 1.x any x

My review on project templates conduct at (missing) <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> in csproj files, but maybe is a mistake

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

Re: v2.0 Preview 0.1 RELEASED!

Postby JS-Support @Userware » Tue Feb 26, 2019 2:22 am

Nick wrote:Open again VS 2017, Open Solution, The lower project dosen't have NuGet Referenced assemblies with yellow icon, and compile. (but this is a trick!)

I am glad to know that restarting Visual Studio fixed the compilation problem. Thanks. We are going to see if we can improve the experience.

Nick wrote:I have a App that create solutions for CSHTML5 from an app (custom designer) and compile the generated projects
[...]
C:\.....\GeneratedCode\Application\AppEntities\AppEntities.csproj : error MSB4057: The target "Build" does not exist in the project.

This error happens when the "CSHTML5.targets" file was not properly imported.

It can be one of the two following possible causes:

1. First possible cause: wrong CSPROJ file. At the end of your CSPROJ you need the following lines:

Code: Select all

  <Import Project="..\packages\CSHTML5.2.0.0-alpha23-036\build\CSHTML5.targets" Condition="Exists('..\packages\CSHTML5.2.0.0-alpha23-036\build\CSHTML5.targets')" />
  <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
    <PropertyGroup>
      <ErrorText>Ce projet fait référence à des packages NuGet qui sont manquants sur cet ordinateur. Utilisez l'option de restauration des packages NuGet pour les télécharger. Pour plus d'informations, consultez http://go.microsoft.com/fwlink/?LinkID=322105. Le fichier manquant est : {0}.</ErrorText>
    </PropertyGroup>
    <Error Condition="!Exists('..\packages\CSHTML5.2.0.0-alpha23-036\build\CSHTML5.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\CSHTML5.2.0.0-alpha23-036\build\CSHTML5.targets'))" />
  </Target>


Those lines are automatically added by the NuGet package when you install it using the NuGet Package Manager (either the GUI or the command line).

1. Second possible cause: missing package in the "packages" folder. The file "..\packages\CSHTML5.2.0.0-alpha23-036\build\CSHTML5.targets" must exist. It is located in the "packages" folder and it is automatically put there when the NuGet package is restored, which happens automatically when you build using the VS GUI. Since you are using the command line "msbuild.exe", it is possible that the packages are not automatically restored. In that case, you can either copy the folder there manually, or use the "nuget.exe restore" command to create the folder for you, based on the "packages.config" file.

Regards

Mark Stega
Posts: 12
Joined: Wed Oct 07, 2015 2:10 pm

Re: v2.0 Preview 0.1 RELEASED!

Postby Mark Stega » Thu Mar 14, 2019 3:14 am

VS2019 RC.2

After creating an solution of the Showcase I get the following error when trying to build:

Code: Select all

Severity   Code   Description   Project   File   Line   Suppression State
Error      The target "Build" does not exist in the project.   CSHTML-Showcase1   C:\Solutions\TemporarySolutions\CSHTML-Showcase1\CSHTML-Showcase1\CSHTML-Showcase1.csproj      


[Edit] Same error with a calculator project

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

Re: v2.0 Preview 0.1 RELEASED!

Postby JS-Support @Userware » Thu Mar 14, 2019 4:57 am

@Mark Stega: thanks. We haven't tested with VS 2019 yet. We will do very soon and we'll keep you updated.

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

Re: v2.0 Preview 0.1 RELEASED!

Postby Nick » Thu Mar 14, 2019 8:07 am

NOTE:
I install V2, and after find the breking point see my last error, I install version 1.2, BUT Application references appear like Version 2.0

(see attached image)



On my computer with (Calculator sample work OK)
Microsoft Visual Studio Community 2019 Preview
Version 16.0.0 Preview 4.2
VisualStudio.16.Preview/16.0.0-pre.4.2+28711.60
Microsoft .NET Framework
Version 4.8.03646

Installed Version: Community

Visual C++ 2019 00435-60000-00000-AA596
Microsoft Visual C++ 2019

Application Insights Tools for Visual Studio Package 9.0.20215.1
Application Insights Tools for Visual Studio

ASP.NET and Web Tools 2019 16.0.12283.38043
ASP.NET and Web Tools 2019

ASP.NET Web Frameworks and Tools 2019 16.0.12283.38043
For additional information, visit https://www.asp.net/

Azure App Service Tools v3.0.0 16.0.12283.38043
Azure App Service Tools v3.0.0

Azure Functions and Web Jobs Tools 16.0.12283.38043
Azure Functions and Web Jobs Tools

C# Tools 3.0.0-beta4-19156-04+7d31dd6ee3fdc2c556345d36a5ab4fd6f9318803
C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Common Azure Tools 1.10
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

Microsoft Azure Tools 2.9
Microsoft Azure Tools for Microsoft Visual Studio 0x10 - v2.9.0.0

Microsoft Continuous Delivery Tools for Visual Studio 0.4
Simplifying the configuration of Azure DevOps pipelines from within the Visual Studio IDE.

Microsoft JVM Debugger 1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

Microsoft Library Manager 1.0
Install client-side libraries easily to any web project

Microsoft MI-Based Debugger 1.0
Provides support for connecting Visual Studio to MI compatible debuggers

Microsoft Visual C++ Wizards 1.0
Microsoft Visual C++ Wizards

Microsoft Visual Studio Tools for Containers 1.1
Develop, run, validate your ASP.NET Core applications in the target environment. F5 your application directly into a container with debugging, or CTRL + F5 to edit & refresh your app without having to rebuild the container.

Microsoft Visual Studio VC Package 1.0
Microsoft Visual Studio VC Package

NuGet Package Manager 5.0.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

ProjectServicesPackage Extension 1.0
ProjectServicesPackage Visual Studio Extension Detailed Info

ResourcePackage Extension 1.0
ResourcePackage Visual Studio Extension Detailed Info

ResourcePackage Extension 1.0
ResourcePackage Visual Studio Extension Detailed Info

SQL Server Data Tools 16.0.61902.28060
Microsoft SQL Server Data Tools

TypeScript Tools 16.0.10306.2001
TypeScript Tools for Microsoft Visual Studio

Visual Basic Tools 3.0.0-beta4-19156-04+7d31dd6ee3fdc2c556345d36a5ab4fd6f9318803
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Visual F# Tools 10.4 for F# 4.6 16.0.0.0. Commit Hash: 7f10e5b7082fe6e9c50e6b40282575572a26ca31.
Microsoft Visual F# Tools 10.4 for F# 4.6

Visual Studio Code Debug Adapter Host Package 1.0
Interop layer for hosting Visual Studio Code debug adapters in Visual Studio

Visual Studio Tools for Containers 1.0
Visual Studio Tools for Containers
Attachments
pre1.png
pre1.png (213.97 KiB) Viewed 23831 times


Return to “Pre-Releases, Downloads and Announcements”

Who is online

Users browsing this forum: No registered users and 30 guests

 

 

cron