我試過使用NuGet,但它不工作。使用Bower或NPM(我不知道在VS 2015中使用npm命令的位置,沒有GUI)也不起作用。我仍然在努力適應新的結構等。我猜這是正常的,NuGet不工作?!如何在ASP.NET Core MVC中添加DefinitelyTyped
輸出的NuGet的:
Retrieving package 'jquery.TypeScript.DefinitelyTyped 3.1.1' from 'nuget.org'.
GET https://api.nuget.org/v3-flatcontainer/jquery.typescript.definitelytyped/3.1.1/jquery.typescript.definitelytyped.3.1.1.nupkg
OK https://api.nuget.org/v3-flatcontainer/jquery.typescript.definitelytyped/3.1.1/jquery.typescript.definitelytyped.3.1.1.nupkg 458ms
Installing jquery.TypeScript.DefinitelyTyped 3.1.1.
Installing NuGet package jquery.TypeScript.DefinitelyTyped.3.1.1.
Successfully installed 'jquery.TypeScript.DefinitelyTyped 3.1.1' to NewWebProject
Executing nuget actions took 704,97 ms
========== Finished ==========
Time Elapsed: 00:00:03.0703945
PATH=.\node_modules\.bin;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Web\External;%PATH%;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Web\External\git
C:\Program Files\dotnet\dotnet.exe restore "C:\Users\Marcel\documents\visual studio 2015\Projects\NewWebProject\.vs\restore.dg"
log : Restoring packages for C:\Users\Marcel\documents\visual studio 2015\Projects\NewWebProject\src\NewWebProject\project.json...
log : Restoring packages for tool 'BundlerMinifier.Core' in C:\Users\Marcel\documents\visual studio 2015\Projects\NewWebProject\src\NewWebProject\project.json...
log : Restoring packages for tool 'Microsoft.AspNetCore.Razor.Tools' in C:\Users\Marcel\documents\visual studio 2015\Projects\NewWebProject\src\NewWebProject\project.json...
log : Restoring packages for tool 'Microsoft.AspNetCore.Server.IISIntegration.Tools' in C:\Users\Marcel\documents\visual studio 2015\Projects\NewWebProject\src\NewWebProject\project.json...
log : Restoring packages for tool 'Microsoft.EntityFrameworkCore.Tools' in C:\Users\Grief\documents\visual studio 2015\Projects\NewWebProject\src\NewWebProject\project.json...
log : Restoring packages for tool 'Microsoft.Extensions.SecretManager.Tools' in C:\Users\Grief\documents\visual studio 2015\Projects\NewWebProject\src\NewWebProject\project.json...
log : Restoring packages for tool 'Microsoft.VisualStudio.Web.CodeGeneration.Tools' in C:\Users\Grief\documents\visual studio 2015\Projects\NewWebProject\src\NewWebProject\project.json...
log : Writing lock file to disk. Path: C:\Users\Grief\documents\visual studio 2015\Projects\NewWebProject\src\NewWebProject\project.lock.json
log : C:\Users\Grief\documents\visual studio 2015\Projects\NewWebProject\src\NewWebProject\NewWebProject.xproj
log : Restore completed in 10497ms.
PATH=.\node_modules\.bin;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Web\External;%PATH%;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Web\External\git
C:\Program Files\dotnet\dotnet.exe restore "C:\Users\Marcel\documents\visual studio 2015\Projects\NewWebProject\.vs\restore.dg"
log : Restoring packages for C:\Users\Marcel\documents\visual studio 2015\Projects\NewWebProject\src\NewWebProject\project.json...
log : Restoring packages for tool 'BundlerMinifier.Core' in C:\Users\Marcel\documents\visual studio 2015\Projects\NewWebProject\src\NewWebProject\project.json...
log : Restoring packages for tool 'Microsoft.AspNetCore.Razor.Tools' in C:\Users\Marcel\documents\visual studio 2015\Projects\NewWebProject\src\NewWebProject\project.json...
log : Restoring packages for tool 'Microsoft.AspNetCore.Server.IISIntegration.Tools' in C:\Users\Marcel\documents\visual studio 2015\Projects\NewWebProject\src\NewWebProject\project.json...
log : Restoring packages for tool 'Microsoft.EntityFrameworkCore.Tools' in C:\Users\Marcel\documents\visual studio 2015\Projects\NewWebProject\src\NewWebProject\project.json...
log : Restoring packages for tool 'Microsoft.Extensions.SecretManager.Tools' in C:\Users\Marcel\documents\visual studio 2015\Projects\NewWebProject\src\NewWebProject\project.json...
log : Restoring packages for tool 'Microsoft.VisualStudio.Web.CodeGeneration.Tools' in C:\Users\Marcel\documents\visual studio 2015\Projects\NewWebProject\src\NewWebProject\project.json...
log : Lock file has not changed. Skipping lock file write. Path: C:\Users\Marcel\documents\visual studio 2015\Projects\NewWebProject\src\NewWebProject\project.lock.json
log : C:\Users\Marcel\documents\visual studio 2015\Projects\NewWebProject\src\NewWebProject\NewWebProject.xproj
log : Restore completed in 10674ms.
對不起,但不是DefinitelyTyped TypeScript的東西? – Fylax
是的,我使用的是TypeScript,並且想爲jquery添加D.ts – DoubleVoid