I'm trying to get Signalr from Nuget and have installed every package I can find, but can't seem to find the client JavaScript files that should be included. I've run the command from the package manager (in Visual Studio 2017)
npm install #aspnet/signalr
But alas, there is no /lib/signalr/signalr.js file anywhere. The Client stuff should be there. Where can I download this?
Found it! What the docs do not tell you is that the scripts are dumped into the following folder in the solution folder
node_modules\#aspnet\signalr\dist\browser
and there it was signalr.js (and the minimized version as well)
You create a folder called signalr under wwwroot/lib and place it there.
Related
I am working on a project in VS 2019 and am trying to use the latest winrt/c++ machine learning api. Therefore I conducted the following steps:
Install Microsoft.AI.MachineLearning 1.4.0 NuGet package for specific project
Build the project
Add #include "winrt/Microsoft.AI.MachineLearning.h"
Unfortunately, the header source file is not found. What am I doing wrong?
Cannot open microsoft.ai.machinelearning.h from NuGet package
When you install the nuget package Microsoft.AI.MachineLearning 1.4.0, you should use this
#include "abi/Microsoft.AI.MachineLearning.h"
Actually, Microsoft.AI.MachineLearning.h file exists under the abi folder from your nuget package.
================
Update 1
I have reproduced your issue in my side. And it seems that there is no such error in my side. I just create such project followed by the above document, then install that nuget package-->build the project and after that, I can call
`winrt/Microsoft.AI.MachineLearning.h.
And the winrt c++ project just puts such file into Generated Files folder during build process based on the function of the project.
So it is a quite strange behavior, and I suggest you could follow these steps to troubleshoot it:
Before all, you could check this document first.
1) First, close your Windows Console Application (C++/WinRT) project, delete .vs hidden folder, any output folders like Debug or Release under the solution folder and project folder.
2) Then restart your project and make sure that Microsoft.AI.MachineLearning 1.4.0 NuGet package is installed.
Then rebuild your project and make sure that build process is successful.
3) Then I can call #include "winrt/Microsoft.AI.MachineLearning.h".
If these steps do not help, I think VS or your current project itself has something wrong.
please try to disable any other third party extensions under Extensions-->Manage Extensions and then restart VS to test it.
Or just create a new WinRT C++ project to test whether the issue happens in the new project.
I'm trying to do some TypeScript tutorials but I'm hitting a weird problem. A while back I installed TypeScript 1.0.3.0 through Visual Studio here:
C:\Program Files (x86)\Microsoft SDKs\TypeScript
On the command line, when I check the TypeScript version it references that. I wanted to do some Angular (Angular version 2/4) so I loaded Node Package Manager and installed TypeScript through NPM. NPM loaded a newer version of TypeScript in another place on my computer. When I create Angular projects using Angular's CLI tool it somehow uses the NPM install. When I want to do simple, bare-bones TypeScript tutorials it uses the older version 1.0.3.0.
I lost my MSDN license so I can't run Visual Studio anymore. How do I update TypeScript that is in the Microsoft SDKs folder? Every Web site I check on installing or updating TypeScript tells me to use NPM.
If you don't plan to use it uninstall it, if you check Window uninstall software console panel page, you should find an item relating to that install.
If it's not there the simplest way would be to remove the old Typescript folder from your path variable (see here how to edit if you are not familiar). Look for the C:\Program Files (x86)\Microsoft SDKs\TypeScript folder and just remove it.
Then install the latest Typescript from npm.
I can see that lot of examples of Spa templates
dotnet new --install Microsoft.AspNetCore.SpaTemplates::*
does have VueJs but when I install it I can't seem to see it on the list even with -l parameter.
does anyone know what is up with this ? or alternatively a full working SPA seed project? almost every project I tried, has some issues.
Thanks
Nero
Are you getting an error message when running the install?
I was having the same issue, and it turned out to be an invalid NuGet package source. The installer fails to get the latest templates if it cannot access any of your package sources.
When I ran PS C:\Users\me> dotnet new --install Microsoft.AspNetCore.SpaTemplates::*
I would see an error in the terminal
Restoring packages for C:\Users\wacht\.templateengine\dotnetcli\v2.1.4\scratch\restore.csproj...
C:\Program Files\dotnet\sdk\2.1.4\NuGet.targets(103,5): error : The local source '\\privateserver\NuGet' doesn't exist. [C:\Users\wacht\.templateengine\dotnetcli\v2.1.4\scratch\restore.csproj]
After I removed the inaccessible package source, the installed updated my local SPA templates and installed the Vue template.
Ok, this has happened before, I'm not sure what the deal is.
I go to install this nuget package-
Microsoft.jQuery.Unobtrusive.Ajax
the package is installed "correctly" both using the command line and the GUI. But there is no scripts added to my project?
I had the same problem with MVC6 Grid. At least there I could hack the scripts in.
I found the actual script on Microsoft's CDN page so I can work around this...just wondering if I'm missing something.
Using Visual Studio 2017 and the Project is a Core 2.0 MVC project if that helps. Thanks.
the package is installed "correctly" both using the command line and the GUI. But there is no scripts added to my project?
Since the usage of NuGet for css/javascript libraries is discouraged. You should use Bower or the npm (Node Package Manager) to add the JavaScript libraries instead of using NuGet. The newer project file formats, PackageReferences, only supports files that are in a contentFiles directory inside the NuGet package.
To use the package Microsoft.jQuery.Unobtrusive.Ajax to the .net core project, you need to select your MVC project and add a new file to the project root. While in the template manager (Add->New Item...), search for "Bower Configuration File" or "npm Configuration file".
Then edit the file and add your dependency, i.e.
package.json (npm) or bower.json:
"dependencies": {
"jquery-ajax-unobtrusive": "3.2.4"
}
Note: For package.json (npm), once you save, the file will be downloaded in a directory named "node_modules`. This alone won't be enough, as the required files need to be copied over to wwwroot folder, where they can be accessed when the application runs.
For the detailed info, see NPM, BOWER, NUGET, GULP – The Four Horsemen of ASP.NET CORE Apps.
I suddenly get this error on every package I try to update/reinstall in my project.. How can I start to debug this problem? Does the package manager create a log file with more details than this? Where is the manifest that it does not find?
Same package in different project but same solution works fine.
I m having the same issue.I think it might be a nuget version issue.I tried to install the package at my visual studio 2013, with nuget version is 2.12.0.817 and i got the same error. Then i tried installing the same package at my visual studio 2015, running nuget version 3.4.4.1321 and the package got installed successfully. So if i were you i would check my nuget version.
I faced two different problems:
the tool used to compress the folder (like Compress-Archive)
adds the root folder name inside the compressed file
https://github.com/PowerShell/PowerShell/issues/14312
the tool used to compress the folder has a compression method incompatible
with the client trying to unzip the .nupkg file.
For example, in my case the System.IO.Compression.ZipFile class used to compress the content of the folder was incompatible with the client extraction capabilities.
However, when I manually compressed the same folder content
with Right-click\Send To\Compressed (Zipped) Folder, it was working fine.