CDN vs. local css and js files

I installed Essential Studio v16.1.0.24 with the v16.1.0.37 service pack. I then copied the syncfusion-javascript folder I found in the node_modules directory to my lib folder in the wwwroot of my ASP.NET Core project. If I reference the files directly in the <link and <script tags in my _Layout.cshtml file I don't get the fully functioning controls I want. If I reference the css and js files using 
<link rel="stylesheet" rel='nofollow' href="https://cdn.syncfusion.com/ej2/material.css" /> 
and 
<script src="https://cdn.syncfusion.com/ej2/dist/ej2.min.js"></script>
then everything works fine.

Where can I get the proper and correct files to use locally? 

5 Replies

MF Mohammed Farook J Syncfusion Team June 18, 2018 09:10 AM UTC

Hi Jlim, 

Thanks for contacting Syncfusion support. 

You can get local Essential JavaScript2 scripts and styles easily via install Syncfusion.EJ2.JavaScript  Nuget package.  Please find the steps for installing Nuget (Syncfusion.EJ2.JavaScript ) package. 
 
  1. To install ‘Syncfusion.EJ2.Javascript’ NuGet package from online
  
   
  
2. After installation, you can find the script and styles from below location  


Scripts installed local location : Application_name-> scripts-> ej2->ej2.min.js  
  
Styles installed local location:  Application_name->content->ej2->material.css  
    

  
3. Add script and style reference in your _Layout.cshmtl.  


  @*syncfusion script and styles*@  
    <script src="~/Scripts/ej2/ej2.min.js"></script>  
    <link rel='nofollow' href="~/Content/ej2/material.css" rel="stylesheet" />  

Regards, 
J Mohammed Farook 
  



JI JimN June 18, 2018 12:09 PM UTC

I followed your example and I still don't have either scripts or content folders in my project. This is the package manager console output:
GET https://www.nuget.org/api/v2/Packages(Id='Syncfusion.EJ2.JavaScript',Version='16.1.0.42')
  GET https://nuget.syncfusion.com/nuget_aspnetcore-js2/nuget/getsyncfusionpackages/aspnetcore-js2/Packages(Id='Syncfusion.EJ2.JavaScript',Version='16.1.0.42')
  InternalServerError https://nuget.syncfusion.com/nuget_aspnetcore-js2/nuget/getsyncfusionpackages/aspnetcore-js2/Packages(Id='Syncfusion.EJ2.JavaScript',Version='16.1.0.42') 352ms
  OK https://www.nuget.org/api/v2/Packages(Id='Syncfusion.EJ2.JavaScript',Version='16.1.0.42') 1049ms
Error finding repository for 'https://nuget.syncfusion.com/nuget_aspnetcore-js2/nuget/getsyncfusionpackages/aspnetcore-js2': An error occurred while retrieving package metadata for 'Syncfusion.EJ2.JavaScript.16.1.0.42' from source 'SyncfusionAspNetCore'.
  Failed to fetch results from V2 feed at 'https://nuget.syncfusion.com/nuget_aspnetcore-js2/nuget/getsyncfusionpackages/aspnetcore-js2/Packages(Id='Syncfusion.EJ2.JavaScript',Version='16.1.0.42')' with following message : Response status code does not indicate success: 500 (Internal Server Error).
  Response status code does not indicate success: 500 (Internal Server Error).
Restoring packages for C:\Users\JNickVA1\Source\Repos\PerShift\Agency\Agency.csproj...
  GET https://www.nuget.org/api/v2/FindPackagesById()?id='Syncfusion.EJ2.JavaScript'&semVerLevel=2.0.0
  GET https://nuget.syncfusion.com/nuget_aspnetcore-js2/nuget/getsyncfusionpackages/aspnetcore-js2/FindPackagesById()?id='Syncfusion.EJ2.JavaScript'&semVerLevel=2.0.0
  OK https://nuget.syncfusion.com/nuget_aspnetcore-js2/nuget/getsyncfusionpackages/aspnetcore-js2/FindPackagesById()?id='Syncfusion.EJ2.JavaScript'&semVerLevel=2.0.0 687ms
  OK https://www.nuget.org/api/v2/FindPackagesById()?id='Syncfusion.EJ2.JavaScript'&semVerLevel=2.0.0 920ms
  GET https://www.nuget.org/api/v2/package/Syncfusion.EJ2.JavaScript/16.1.0.42
  OK https://www.nuget.org/api/v2/package/Syncfusion.EJ2.JavaScript/16.1.0.42 1649ms
Installing Syncfusion.EJ2.JavaScript 16.1.0.42.
Installing NuGet package Syncfusion.EJ2.JavaScript 16.1.0.42.
Committing restore...
Writing lock file to disk. Path: C:\Users\JNickVA1\Source\Repos\PerShift\Agency\obj\project.assets.json
Restore completed in 9.34 sec for C:\Users\JNickVA1\Source\Repos\PerShift\Agency\Agency.csproj.
Successfully installed 'Syncfusion.EJ2.JavaScript 16.1.0.42' to Agency
Executing nuget actions took 1.25 sec
Time Elapsed: 00:00:12.1253777
========== Finished ==========

Time Elapsed: 00:00:00.0948875
========== Finished ==========


MF Mohammed Farook J Syncfusion Team June 19, 2018 12:32 PM UTC

Hi Jlim, 
 
Sorry for inconvenience caused. 
 
Currently Nuget package support is not available in Essential JS2 ASP.NET Core. So You can get the local Essential JS2 scripts and styles from  your installed build (Essential JS2 ASP.NET core build) location. Please find the location 
 
Scripts: 
 
Installed-build-location\Syncfusion\ASP.NET CORE - EJ2\version\wwwroot\scripts 

For example 
 
C:\Users\Public\Documents\Syncfusion\ASP.NET CORE - EJ2\16.1.0.37\wwwroot\scripts  
 
Screenshot :  
 
 
 
 
 
Styles:  
 
Installed-location\Syncfusion\ASP.NET CORE - EJ2\version\wwwroot\styles  
 
For example: 
 
C:\Users\Public\Documents\Syncfusion\ASP.NET CORE - EJ2\16.1.0.37\wwwroot\styles  
 
ScreenShot: 
  
 
   
 
 
Regards, 
J Mohammed Farook 



JI JimN June 24, 2018 03:25 PM UTC

I have tried several ways to try to get the script and style files that I need to reference in my ASP.NET Core 2.1 project. I have installed Essential Studio 16.1.0.37, the ASP.NET Core (Essential JS 2) product, and the plain ASP.NET Core product. NONE of them install anything at "C:\Users\Public\Documents\Syncfusion\ASP.NET CORE - EJ2" or anything like that. I found this folder: C:\Users\Public\Documents\Syncfusion\16.1.0.37\Web (Essential JS 2)\ASP.NET Core, but there are no scripts or styles folders there and I searched for, without finding, material.css or ej2.min.js

I need you to start from telling me which packages, exactly, you are saying I should install and then maybe I can see what you're talking about. This should not be so difficult!


MF Mohammed Farook J Syncfusion Team June 25, 2018 01:56 PM UTC

Hi Jlim, 
 
 We have some doubt in your requirement so we request you to setup a web meeting to look into it and provide the resolution. A support incident has been created under your account to track the status of this requirement. Please log on to our support website to check for further updates.  
 

Regards, 
J Mohammed Farook 


Loader.
Up arrow icon