Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot find Moment JS Scripts after install via Nuget Package on Visual Studio 2017 #4705

Closed
portal7 opened this issue Jul 17, 2018 · 7 comments

Comments

@portal7
Copy link

portal7 commented Jul 17, 2018

Description of the Issue and Steps to Reproduce:

  • Create a new Project "Web Application ASP.NET Core 2"
  • Open Nuget Package Console and run
    Install-Package Moment.js
    try to find Moment Script File on ASP.NET Core 2 Project after successfully installation

Result:
No package or file found on "Content/Scripts" or wwwroot/Content/Scripts or any location

Environment:
Chrome (Not matter) Windows 10 x64, Node v6.9.5

@jcardus
Copy link

jcardus commented Dec 13, 2018

Same problem here...

@waseemahmad31
Copy link

When you run Install-Package Moment.js, js is being saved at the path C:\Users\waseemahmad\.nuget\packages\moment.js\\2.23.0\Content\Scripts. Not sure why not saved in the solution directory.

@paul-green
Copy link

I've had a look at this and it works with 'full-cream' .Net projects but simply doesn't work with .net core projects. The moment.nuspec and generated .nupkg are fine. As mentioned by @waseemahmad31 the scripts end up in the user's packages folder and would need to be copied (i.e. not a great solution).

@ndreisg
Copy link

ndreisg commented Nov 4, 2019

According to this issue you have to use the <contentFiles> tag in the .nuspec

@marwahaha
Copy link
Member

I'm not sure what else we can do here.

@chull434
Copy link

Hi, this is still an issue with VS2019 and a asp.net core project. Installing moment via nuget doesn't copy the files into the wwwroot/lib location like it does for other js libraries like jquery and bootstrap

how are you meant to include the moment script on a view if theres no file in the project?

@andrerav
Copy link

andrerav commented Nov 8, 2020

Seeing the same problem in VS2019 and .NET Core 3.1 with a ASP.NET Core project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants