visual studio 2017 spa templates vue js missing - visual-studio

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.

Related

Signalr for DotNetCore 2 packages missing all JavaScript

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.

Dealing with Dual TypeScript installs

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.

Typescript version conflict in Visual Studio Code

I have an Angular2 project created with the angular-cli project templates in Visual Studio Code. Also, I installed the latest version of Typescript (2.0.3) via npm as well as via the Microsoft link (https://www.microsoft.com/en-us/download/details.aspx?id=48593) because I also use Visual Studio 2015. However, for some reason the I still get an error message when I start my Angular2 project. Note that even with a standard command prompt running tsc -v will still return 1.0.0.0.
How does tsc -v determine the version of typescript?
How do I get rid of this message in my Angular project and ensure
it will be using the latest version of Typescript?
What am I missing here? Appreciate your help.
If you only need the last version of TypeScript, on both Visual Studios, then you can
delete all previous installations which are located in: C:\Program Files (x86)\Microsoft SDKs\TypeScript.
reinstall the latest TypeScript version.
Hopefully everything will work.
Did you install TypeScript via NPM? If this is the case, try uninstalling it via npm uninstall -g typescript. Now reinstall it via npm install -g typescript and check if the problem is solved.
The best way is to allow VScode to only use the version of typescript installed locally.
Drop this in your .vscode/.settings file.
"typescript.tsdk": "./node_modules/typescript/lib"

Is it possible to restore Nuget packages with a Xamarin.iOS build using TFS online?

I am trying to automate my build process for my Xamarin.iOS application. I have managed to get a Xamarin.Android and UWP build working find on my on site Windows build agent.
I am now trying to build a Xamarin.iOS application using my On Site Mac build agent.
I have added the Restore Nuget packages as the first step in this build definition but keep getting the error:
MSBuild auto-detection: using msbuild version '4.0' from
'/Library/Frameworks/Mono.framework/Versions/4.2.3/lib/mono/4.5'.
MsBuild.exe does not exist at
'/Library/Frameworks/Mono.framework/Versions/4.2.3/lib/mono/4.5/msbuild.exe'.
Error: /usr/local/bin/nuget failed with return code: 1 Return code: 1
But I'm not sure what it's trying to do here at the nuget installer stage.
So is this possible to do?
There is a known issue with nuget restore command on non-Windows operating systems:
Restore - Restore works with packages.config and project.json files
but will not yet work with *.sln solution files
So you can try to update the "Restore Nuget Packages" step to restore the packages.config file instead of solution file. If it still does not work, then try to change the "Installation type" from "Restore" to "Install".
NuGet 3.2
With NuGet 3.2, the following commands have been tested to work:
Config
Delete
Help
Install
List
Push
SetApiKey
Sources
Spec
Refer to this link for details: NuGet Compatibility.
I was having a similar issue. My log said:
Unable to find version '2.1.0' of package 'Acr.Support'.
[error]Error: /usr/local/bin/nuget failed with return code: 1
After some digging in the logs I tried to restore the nuget packages on my local mac. I opened the terminal and typed :
sudo cd /usr/local/bin
[enter password]
Your nuget executable should be located there.
I executed:
nuget
To see my nuget version, which was 2.12.0.0
I noticed that this is an old version so I updated it by:
sudo su
[enter password]
nuget update -self
I noticed that it updated to 3.4.4 rtm final, I started my Visual Studio Online flow again and it worked! Hopefully this helps anyone.

unable to install xamarin from vs 2015 setup

I have vs 2015 upgrade 1 installed and I try to install Xamrin from the setup, but when I try to install it, at the end receive this error message:
C#/.Net Xamarin
The installer has encountered an unexpected error installing this package. This may indicate a problem with package. The error code is 2711.
how can I solve this?
I had the same error. The error is due to old Xamarin installer files in the cache.
C#/.Net Xamarin The installer has encountered an unexpected error installing this package. This may indicate a problem with package. The error code is 2711.
I did the following steps to fix it:
Note: a folder could be hidden, so enable show hidden items in the windows explorer.
Delete any Xamarin related folders from
"C:\ProgramData\Microsoft\VisualStudioSecondaryInstaller\14.0\installers" folder.
For example:
C:\ProgramData\Microsoft\VisualStudioSecondaryInstaller\14.0\installers\XamarinVS
C:\ProgramData\Microsoft\VisualStudioSecondaryInstaller\14.0\installers\XamarinVSV1
If the first step doesn't help then try to do the following below.
Delete all Xamarin related folders or files from windows temprorary folders TMP and TEMP.
You could find the temprorary folders in the Windows/Control Panel/ System/Advanced/Enviroment variables
I found that solution in comments section here:
https://blogs.msdn.microsoft.com/visualstudio/2016/03/31/mobile-app-development-made-easy-with-visual-studio-and-xamarin/#comment-142062
You can try a manual install by downloading and installing the following:
http://download.xamarin.com/XamarinforVisualStudio/Windows/Xamarin.VisualStudio_4.0.1.147.msi

Resources