"The build task could not find node.exe which is required to run the TypeScript compiler." occurred after update Boostrap - asp.net-mvc

I developed an ASP.Net MVC web application and It's almost completed. After That, I updated Bootstrap through NuGet package manager to Bootstrap latest stable version 4.3.1 Update was successfully completed. But after the migration following errors are occurred.
Error Build:Cannot find name 'Record'.
Error Build:Cannot find name 'undefined'.
To solve that I installed TypeScript for Visual Studio 2015. Then the above error solved and the following error occurred.
Severity Code Description Project File Line Suppression State
Error The build task could not find node.exe which is required to run
the TypeScript compiler. Please install Node and ensure that the
system path contains its location. ABH.SW.HotelManagement
How can I solve this? I tried to google it for the past 2 days but I wasn't able to find any solution

This is the only post for this problem, so I'll do my bit for those who use Bootstrap 4.3.1, TypeScript, and VS2015.
First, once you create the project and are about to install Bootstrap 4.3.1 through NuGet, don't let Visual Studio manage TypeScript Typings for you. Check no.
Once Bootstrap and stuff is installed, clean the solution: right click on your solution -> clean solution
Next, open NuGet console (Tools → NuGet Package Manager → Package Manager Console), and install TypeScript 3.0 using this command:
Install-Package Microsoft.TypeScript.MSBuild -Version 3.0.0
Close Visual Studio, open it again, and that's it. Took for me a lot of research to find out that several TypeScript versions cause a lot of conflicts and 3.0 is one of those that actually work.

I had the same issue while trying to update to Bootstrap 4 from Visual Studio 2015. What fixed it for me was installing Typescript 2.2 for Visual Studio 2015 (https://marketplace.visualstudio.com/items?itemName=TypeScriptTeam.TypeScript22forVisualStudio2015). You may need to uninstall previous versions of Typescript Tools for VS2015 from Programs and Features.

I think Bootstrap 4.3.1 , Typescript , VS2015 has some issues with each other.
[e.g.
Compilation error from Angular and typescript in VS 2015 MVC project
]
My scenario in my project got this error
Error The build task could not find node.exe which is required to run
the TypeScript compiler. Please install Node and ensure that the
system path contains its location. ACC_Cor...
I'm using VS2017 while other team member that has problem using VS2015 with TypeScript Tools for Microsoft Visual Studio 2015 3.2.2.0 installed
He told me that after map project from source control there is and alert message of something like his typescript version is newer. So after some googling I think you should look in to this link for more information
https://github.com/Microsoft/TypeScript/issues/17136
VS2015 - Change TypeScript Version
How to run TypeScript in Visual Studio 2015 without require() or requireJS
tldr;
For Vs2015 + Bootstrap 4.3.1 I solved my issue by
Check project property
Uninstall Typescript
Install Typescript version 3.0 https://www.microsoft.com/en-us/download/details.aspx?id=48593

Related

EntityFramework.Core.Tools nuget package installation error: "The process cannot access the file ef.exe because it is being used by another process"

While installing the package Microsoft.EntityFrameworkCore.Tools for using EF in my project using Nuget, I'm persistently running into the below error. Notice I didn't get any error while installing other related packages used for EF core
Microsoft.EntityFrameworkCore
Microsoft.EntityFrameworkCore.Relational
Microsoft.EntityFrameworkCore.SqlServer
Here is the location of the file ef.exe
Basically the intention behind installing this package is to use EF command-line tools. I'm currently on Windows 10 and the .NET SDK installed on my machine is 3.1. I had previously 2 SDK's installed on my system(3.1 & 5.0). As per microsoft's documentaion, "The .NET CLI must choose an SDK version for every dotnet command. It uses the latest SDK installed on the machine by default." Therefore I went ahead and uninstalled .NET 5.0 SDK
Here are some of the solutions that I tried:
Deleting the package folder from '.nuget/packages/microsoft.entityframeworkcore.tools' & thereby the executable i.e. 'ef.exe' and reinstalling the same.
Installing the same package using dotnet cli.
Running Visual Studio 2019 as admin.
Deleted the folder "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions"
I have also tried some of the steps mentioned here on github: https://github.com/NuGet/Home/issues/1138
. Any kind of help would be really appreciated.
I have answered the detailed description of the solution here on microsoft's .NET Q&A platform.
'EntityFramework.Core.Tools' nuget package installation error

Package installation error when new blank application in nanoframework is created

When i try create new blank application in nanoframework, i get package installation error.
error message
It seems some problem in nanoframework visual studio extension, my version is NET nanoFramework VS2019 Extension v2019.5.0.8.vsix, but i also tried another versions with same problem.
I have visual studio 2019 community edition and i have installed almost all components.
When i press ok, project is loaded, but is not possible compile it, because there are missing all assemblies. When i try add assembly, theres nothing to add and add nuget packages from nanoframework store leads to error.
when i try this:
pm> Install-Package nanoFramework.CoreLibrary.NoReflection -Version
1.10.1-preview.9
I get this error:
NU1202: Package nanoFramework.CoreLibrary.NoReflection
1.10.1-preview.9 is not compatible with netnanoframework10 (.NETna noFramework,Version=v1.0). Package
nanoFramework.CoreLibrary.NoReflection 1.10.1-preview.9 supports: net
(.NETFramework,Version=v0.0)
similiar when i try another package versions.
So the extensions is installed incorectly, but i cant find why. i tried it more times. uninstall and install again. from extenstion store, and from disc. nothing successfull.
The webserver NuGet released today fixes the issues with the version mismatches.
The issue with VS2019 16.9 remains. Reported to VS Developer Community here. Please up vote to help increase priority.
What is the Community version you're using?
After a little test, there seems to be an issue with the latest release of VS2019. A work around would be to:
Use V16.8.X
or
use an already created solution that you can edit.
or
add the required nuget to the project once it has been loaded (after the error):
Update: now fixed! it was due to a change to fix nuget, but caused an unintended consequence with nanoFramework.

MS Visual Studio 2019 - CRASH when Adding a new Scaffolding item

I'm trying to build an ASP.NET Core Web application .NET Core 3.1.
I run MS Visual Studio 2019, latest build.
I created the "Controllers" folder, an error occurs when trying to add Controller:
Error: there was an error running the selected code generator package restore failed
API Controller empty.
To resolve the issue, I tried the following to no avail:
Delete folders .vs, bin, obj
Clean and Rebuild project
Clear all NuGet caches
Restart, reboot
For what I can find it seems related to:
Error NU1202. Package Microsoft.AspNetCore.Razor 2.2.0 is not compatible with netcoreapp3.1 (.NETCoreApp,Version=v3.1). Package Microsoft.AspNetCore.Razor 2.2.0 does not support any target frameworks.
How can I solve the problem?
Resolved installing latest Visual Studio updates

Asp .Net Core - cannot install Microsoft.AspNet.Mvc nuget package

In my Asp .Net Core Web Application (started with empty template) I cannot install Microsoft.AspNet.Mvc nuget package.
After pressing Install in Nuget manager I get this error message:
Package restore failed. Rolling back package changes for 'WebApplication1'.
I tried to solve it on my own, but:
1) My project doesn't have project.json
2) Clearing nuget cache like in this answer didn't help:
Netstandard1.x Nuget packages cannot be installed for netstandard1.x projects
Project target framework: .NetCoreApp1.0 (also tried 1.1)
Ide: VS2017 RC
I didn't have problems so far with installing other packages.
Is there a workaround to install mvc package?
Btw. I have to start with empty project template.
Thanks in advance for your support.
I looked harder in nuget package name and discovered that correct package to install should be Microsoft.AspNetCore.Mvc and not Microsoft.AspNet.Mvc.
Silly mistake, I chose most popular package by typing "mvc" in search box.

Xamarin Studio Package Console Edit Options

I'm using Xamarin Studio version 5.5.3 to build my ASP.NET MVC Application. When I create a MVC APP, is created with the version 5.2, however this version isn't totally supported and I need downgrade the package to some version < 5. I have to run the command "PM> Install-Package AspNetMvc -Version 4.0.20710" on package console, but it is readonly (as viewed on picture).
Someone have any idea to solve this problem?
The Package Console that ships with Xamarin Studio currently is read-only and only shows messages from NuGet.
There is a PowerShell console available as a separate addin but it is still an alpha release.
Alternatively you can install a specific version from the Add Packages dialog by running a search for all versions of a NuGet package:
Microsoft.AspNet.Mvc version:*
This will return all versions in the Add Packages dialog and you can then pick the version you want to install.

Resources