When creating a new blank ASP.NET Core project and adding the Syncfusion.EJ2.JavaScript NuGet package to it as a PackageReference, the content files are not copied into the project as was the case with projects using the packages.config style.
Would it be possible to update Syncfusion.EJ2.JavaScript NuGet package to include a script that automatically copies the distribution from the global package storage (i.e. C:\Users\USER\.nuget\packages...) to the local project directory for the PackageReference scenario? I would like to avoid having to manually copy the distribution files into the project and to use NuGet package manager for updates. I would like to avoid using CDN as well.
Thank you for your time,
Levie
HI Levie,
The requirement to restore the content to a specific project solution folder seems to be related to default NuGet configuration. We couldn’t configure it on generate the “Syncfusion.EJ2.JavaScript” NuGet.
I came across these settings to achieve your
requirements, but it doesn’t help us.
Could you please try it in your end once? Meanwhile, we will check the possibility of achieving your requirements.
Regards,
Rajendran R.
Hi Rajendran,
Thank you for taking the time to respond to me. I appreciate your help with this!
I took a look at the links you provided, but unfortunately they will not work for my case.
Microsoft has provided documentation on the appropriate nuspec configuration for a PackageReference:
https://docs.microsoft.com/en-us/nuget/reference/nuspec#including-content-files
The documentation specifies the correct behavior of the NuGet package should be to include the content files in /content and /contentFiles within the package.
You could also add a PowerShell script to the /tools directory of the package that copies the scripts into the local project on installation:
Please let me know if there is anything I can do to help the dev team!
Best regards,
Levie
Hi Levie,
Thanks for your suggestions.
Currently, the Microsoft document site is down state. We will check the solution suggested once it is UP.
Most of our customers do not accept this PowerShell script approach since the requirement is more specific and can handle it through from their application-end itself.
Regards,
Rajendran R.