We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Asp.Net Core Mvc on Mac

Hi
Can some body explanation detail about use Asp.Net Core MVC use Visual Studio Code for Mac,
I study on-line documentation very careful , some content and step seems error or older.
for example, the newest vs code use xxxx.csproj not project.json to config reference DLL.
So, I can not finish complete all step by the documentation.
Any one have experience ?
The attach file is my sample file.
When I run the sample, it will return

Cannot resolve TagHelper containing assembly 'Syncfusion.EJ'. Error: Could not load file or assembly 'Syncfusion.EJ, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.


Attachment: Sample4_8335f3df.zip

1 Reply

SA Shameer Ali Baig Sulaiman Ali Baig Syncfusion Team July 10, 2017 12:50 PM UTC

Hi Liutzuyi, 
Thanks for contacting Syncfusion support. 
We have checked with your query. We need to update the documentation content for rendering EJ components in ASP.NET Core in MAC device. We will modify our online documentation content and update it soon. For your convenience, we have listed steps to follow to successfully render EJ controls with latest version of VS Code using sample.csproj. 
·       Please, visit https://www.microsoft.com/net/core#macros to install the ASP.Net Core in your machine. 
·       Create a new folder(Sample) in your disk to create a project within it. 
·       Now, open your Terminal window and navigate to the folder created for project. 
·       Create new project by using command dotnet new mvc , .Net core project will be created in that folder. 
·       Now, open the folder in VS code. 
·       Open bower.json file and add the Syncfusion JavaScript version. 
 
 
 
·       Then open quick window to enter the >bower command and press ‘Enter’ key, from the below list of suggestions select the bower install option to restored our scripts and CSS into your application wwwroot -> lib folder. 
 
·       Refer our Syncfusion package Syncfusion.EJ.AspNet.Core into your application to render our components. Please,visit the below link for details. 
 
 
 
 
·       Open the Sample.csproj file and include the Syncfusion.EJ.AspNet.Core assembly as depicted below in the code sample. 
 
 
 
 
 
·       Open _viewimports.cshtml file from view folder and add the following namespace for components references and Tag Helper support. 
@addTagHelper *,Syncfusion.EJ 
                          @using Syncfusion.JavaScript 
 
·       Open Terminal window and navigate to your project folder then execute the following command to restore the packages which are all specified in your Sample.csproj file. 
dotnet restore 
 
  
·       Now refer the necessary scripts and CSS files in your _layout.cshtml page as mentioned below link. 
·       Add ScriptManager to the bottom of the layout.cshtml page. The ScriptManager used to place our control initialization script in the page. 
<ej-script-manager></ej-script-manager> 
 
 
·       Now, you can render our Syncfusion components in any view Page. For example, 
[Index.cshtml] 
 
<ej-date-picker id="datepicker" value="@DateTime.Now"></ej-date-picker> 
  
 
·       Finally, Run the project by execute below command and paste localhost:5000 in browser to view our rendered control. 
 
dotnet run 
 
We have also, attached the sample project below for your better understanding. 
Regards, 
Shameer Ali Baig S. 
 
 


Loader.
Live Chat Icon For mobile
Up arrow icon