How to install grunt globally in VS2015 - npm

I tried the following, but get this exception:

You might check, you might need to run a command prompt with elevated permissions in order to install globally.
Just a note, Visual Studio comes with it's own archaic versions of Node and Grunt, so if you go to the Quick Launch Toolbar in the upper right-hand corner of the screen and type "External Web Tools" you can force Visual Studio to use the globally-installed version. Just add a path to the global Grunt installation and move it to the top of the list. Close Visual Studio and re-open and you should be all set.

Related

Visual Studio 2022: Cannot create a project named "tempProjectCreation" because of npm naming restrictions

I'm trying to create a new Typescript project in Visual Studio 2022 Community Edition.
I've installed Visual Studio 2022 Community Edition (Windows), as well as Node.JS v18.12.1-x64 for Windows.
In the Visual Studio Installer (v17.4.2) I clicked the "Node.js development" workload and installed it.
I then opened Visual Studio 2022 Community and clicked "Standalone Typescript React Project" from the "Create New Project" page.
While creating the project, a command window opens and the following error occurs in a command window (cmd.exe) that was launched from Visual Studio:
C:\Program Files\nodejs\npx.cmd --yes create-react-app "C:\Users\Admin\source\reactproject1\tempProjectCreation" --use-npm --template typescript && cd /D C:\Users\Admin\source\reactproject1\tempProjectCreation && npm i --save-dev jest-editor-support eslint-config-react-app
Cannot create a project named "tempProjectCreation" because of npm naming restrictions:
* name can no longer contain capital letters
Please choose a different project name.
Press any key to continue . . .
The IDE fails to create the new react template site. Apparently Node.js now forbids Uppercase for file portability reasons.
The solution would seem simple (as the error points out) - simply change the name of "tempProjectCreation" to "tempprojectcreation" (lowercase) and it should work. In fact, I executed the "npx.cmd" command above and renamed the tempProjectCreation to tempprojectcreation" and the website generated without issue!!
I have googled and searched my hard drive and cannot find the Visual Studio template script that might be invoking the error. In fact, I can't find where Visual Studio Template scripts are stored from my
Where are the Visual Studio Template scripts? I've looked in "C:\Users{UserName}\AppData\Local\Microsoft\VisualStudio\17.0_0d978569 and they don't appear to be there.
Are they editable? Is it possible to change the "tempProjectCreation" to lowercase "tempprojectcreation"?
As this is a configuration question, I'm not sure if I am missing any debug information besides the error emitted above, but I'll edit this question if necessary.
here are the steps that I've taken in order to be able to create a standalone React Typescript project with Visual Studio 2022 (on Windows):
open a windows console (cmd) and uninstall then locally reinstall the create-react-app :
npm uninstall -g create-react-app
npm install -g create-react-app
Navigate to this folder: C:\Users\[your_ username]\AppData\Roaming\npm\node_modules\validate-npm-package-name
Edit index.js and comment out these lines of code:
if (name.toLowerCase() !== name) {
warnings.push('name can no longer contain capital letters')
}

'npm' is not recognized as an internal or external command error in Developer Command Prompt for VS2015

I am trying to execute npm install –g tsd in Developer Command Prompt for VS2015.
But it returns
'npm' is not recognized as an internal or external command,
operable program or batch file.
Any idea?
To solve this issue in Visual Studio 2017 (and above), make sure to install the NodeJS tools in the VS installer.
To launch it, go to Control Panel -> Programs -> Programs and Features, scroll down to Visual Studio 2017 and click Change.
Choose Modify in the installer.
Check the Node.js development checkbox and click Modify to complete the installation.
Download / Install NodeJS tools for Visual Studio; that'll fix the issue and give you intellisense among other benefits!
https://github.com/Microsoft/nodejstools
This solution is specifically for Visual studio code editor.
The easiest way to solve that, is to install plugin for node.js using VS code editor,
To do that follow the steps.
click on Extension Icon, and type in search box node.js, It will give you search result.
Look for the node.js Extension pack.
It should look like the bellow screen, I have already install, the extension. That is why, the green install button is not visible, Just hit on install, once finished. Restart the VS code. now it should work for sure.
You can install Node.js from https://nodejs.org/en/. 'npm' may be unrecognized in Visual Studio 2017 and Win 10 OS when node.js package is not found. After installing node.js package, it will automatically add '..\nodejs' value in Environment variable 'PATH'. Once node.js package is installed, restart your Visual Studio 2017 to Rebuild your project again.

the application requires that assembly microsoft.reportviewer.processingObjectModel version 11.0.0.0 be installed in the global assembly cache first

I have a small windows forms application created in Visual Studio 2012 that uses ReportViewer version 11.0.0.0.
The application target framework is .NET 4.0 and its deployment method is ClickOnce
On my PC it installs but on client machines, intallation fails with error
the application requires that assembly microsoft.reportviewer.processingObjectModel version 11.0.0.0 be installed in the global assembly cache first.
On the client machines, i have installed
.NET 4.0
ReportViewer 2010
Microsoft Report Viewer 2012 Runtime CTP
SQLSYSCLRTYPES.msi
in the project application files settings, i have set microsoft.reportviewer.processingObjectModel publish status to Include(Auto), in the references i have also set its Copy Local property to True.
what am i missing?
I have even followed the instructions here http://msdn.microsoft.com/en-us/library/ms251723.aspx
Here is (arguably) the best way to deal with this issue... without downloading or installing any extras. This worked with Visual Studio 2012 (Ultimate)
Goto the main project within your solution(default/statup project)
Right Click and Click Properties / Select "Your Project">> Project>> Properties
Click on "Publish" Tab to see publishing options
Goto "Install Mode and Settings">> Click "Application Files" and Dialog opens
Go down and look for the items set with "Publish Status" > Prerequisite
You will find ReportViewer and Several Other Files set to Prerequisite
Change all the Publish Statuses to "Include" in the drop down
I know you only need the ReportViewer Only but this will eliminate other potential problems I came across
Now all the required files will be added to your installation setup good to go!
For interest, you can change include a desktop icon under "Install Mode and Settings">>Options>Mainfests>Create Desktop Short Cut
you are missing the ProcessingObjectModel.dll file find the version 11.0.0.0 in gac assembly C:\windows\assembly\GAC_MSIL\Microsoft.ReportViewer.ProcessingObjectModel and add it to bin dir.
We had the same issue, but the thing is, its automatically adding it to the references (microsoft.reportviewer.processingObjectModel), if u EXCLUDE it from the publishing properties(properties->publish->application files), It might fix it.
A better option would be to install the Microsoft Report Viewer 2010 SP1 Redistributable Package at:
http://www.microsoft.com/en-us/download/details.aspx?id=6610
Your users will need to have this package installed as well. If you just copy and paste a MS DLL, you'll have to redeploy it every time you upgrade your application.
If you are using WinForms, to me it seems pointless to worry about installing this DLL in the GAC when it's being used for a report viewer that is deployed via click-once. This isn't a big file and you're probably using it as a report viewer control on a form, nothing more. One possible solution is to do the following:
In Visual Studio, go to the reference in your project for the assembly Microsoft.ReportViewer.ProcessingObjectModeland locate the file path to the folder for that assembly. Mine was version 12 and so my file path was C:\windows\assembly\GAC_MSIL\Microsoft.ReportViewer.ProcessingObjectModel\12.0.0.0__89845dcd8080cc91
Copy the file path of the folder the assembly is in and remove the reference from your project (right click the reference and select "Remove").
Win + R to get a 'Run' prompt. Paste that folder path in there and execute to jump right into the folder of that DLL.
Find the DLL, it should be the only file in that folder, and copy it to your Visual Studio project folder. You shouldn't care about 100kb of extra space on your drive consumed, and I don't think this DLL is one you'll need to update.
Back in Visual Studio, right click References, Add Reference, and browse for that DLL in your project folder. After adding the reference, make sure that the Copy Local property is set to true.
Clean and rebuild, test the application on your local computer, than Deploy your ClickOnce again.
Now when users install your application with ClickOnce, the reference will not refer to the GAC at all and there won't be any need to rely on the prerequisite check/installation process for this DLL because you have included it directly in your published application.
It depends on the setup type you are using but basically, it means the required library is missing from your server or computer. To enable the application to download from the server (In a client-server architecture), you need to include the file(s) in the project.
Go to your application option and locate the "Publish" tab
Click on "Application files"
In the ensuing dialog, select to include all the libraries you want included (or that are required to run your application on the client machine and click "Ok")
Build your application and then publish to the server.
I hope this works for you, it worked for me in Visual Studio 2010 Professional
In case of Windows 10 it won't work installing Microsoft Report Viewer 2010 SP1 as describe by user1236560. First you need to install Prerequisites for SQL Server Management Objects (SQLSysClrTypes.msi) need to choose between x86 and x64 depending on your hardware. You could find it on: http://origin.www.ms.akadns.net/downloads/en/details.aspx?FamilyID=16BC778C-357B-46E9-8356-D575903AC831
After that you need to install MICROSOFT® REPORT VIEWER 2012 RUNTIME that you could find on: https://www.microsoft.com/en-us/download/details.aspx?id=35747
Both of this package will have to be installed.
I encountered this error
System Update Required
Unable to install or run the application. The application requires that assembly
Microsoft.ReportViewer.ProcessingObjectModel Version 11.0.0.0 be installed in the Global Assembly Cache (GAC) first.
Please contact your system administrator.
this error popped out when installing an application made from Visual Studio
meaning I am one of the client
I have Visual Studio 2015 and a Microsoft SQL Server 2014 and didn't know about Crystal Reports and other related stuff to it. I do check the version of my .NET Framework which is version 4.6.2.
I have several extension files and distributable files downloaded and yet doesn't solve my problem.
I do not know if I solve the problem generally but I do become successful in installing the application
so I downloaded and installed the ff:
SAP Crystal Report for Visual Studio 2015(latest, just to make sure)
Microsoft System CLR Types for Microsoft SQL Server 2012
Microsoft Report Viewer 2012 Runtime.
the problem took me about 2 days to trouble shoot, Be careful on downloading and installing extension files and distributed files cause it will munch some space too.
The Best answer is:
Here is (arguably) the best way to deal with this issue... without downloading or installing any extras. This worked with Visual Studio 2012 (Ultimate)
Go to the main project within your solution(default/statup project)
Right Click and Click Properties / Select "Your Project">> Project>> Properties
Click on "Publish" Tab to see publishing options
Go to "Install Mode and Settings">> Click "Application Files" and Dialog opens
Go down and look for the items set with "Publish Status" > Prerequisite
You will find ReportViewer and Several Other Files set to Prerequisite
Change all the Publish Statuses to "Include" in the drop down.
I know you only need the ReportViewer Only but this will eliminate other potential problems I came across
Now all the required files will be added to your installation setup good to go!
For interest, you can change include a desktop icon under "Install Mode and Settings">>Options>Mainfests>Create Desktop Short Cut
It reduced all of my head aches.

Shell Extension : Not showing in Windows Explorer context

I have Windows 7 Professional x64. I have Visual Studio 2010 Premium and Visual Studio 2012 Premium installed on my machine.
I installed TFS Power Tools Decemeber 2011. I restarted my computer after successful installation. I then checked out a folder from TFS 2010 but the TFS menu items in Windows Explorer context menu do not appear when i right click on the folder.
I even reinstalled it by uinstalling it, restarting the pc and installing it again then restarting it again but same issue.
I have followed the instructions outlined in here:
TFS Power Tools: Shell Extension : Context Menu Quirky and TFS Icons on Files/Folders missing
But same issue same issue occurs. Would anyone know what else i can do to get the TFS menu items to appear in the context menu please?
Thanks in advance,
I am not sure if this would help or you are willing to use a new version but I had the exact same environment and issue with you.
What I had done is that I uninstalled the old TFS Power Tools ( listed with a "Microsoft Team Foundation Server" prefix and/or "Microsoft Visual Studio Team Foundation Server" in Control-Panel/Programs-and-Features ) and install a newer version which is RTM. You can download them at http://www.microsoft.com/en-nz/download/details.aspx?id=35775 and install the following in the same order listed below
Team Foundation Server 2012 RTM Power Tools.msi
Visual Studio Team Foundation Server 2012 Update 1 Power Tools.msi
Visual Studio Team Foundation Server 2012 Update 2 Power Tools.msi
Close Visual Studio before you start then restart after installing, you should see your context menu afterwards together with the green arrow that indicates it is in TFS
Here is a screenshot of it
Also please take note that after installation this would not happen instantaneously as advised on this post: TFS Power Tools: Shell Extension : Context Menu Quirky and TFS Icons on Files/Folders missing
It sometimes takes a while for the TfsComProviderSvr.exe to check if
the local folder is a workspace and register the shell extension.
So this depends on many variables, your TFS server speed, your machine speed and your network speed. In my case I left it overnight to fully show everything.
Windows has a limit on home many overlay icons it can support. This started happening to me after i installed google drive, one drive, and dropbox and the TFSOverlay got pushed down to the bottom in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\explorer \ShellIconOverlayIdentifiers
You can fix it by either
Uninstalling some of the overlay apps. (Eg: remove Google drive
or Dropbox)
Rename the TFS folders in
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\explorer \ShellIconOverlayIdentifiers to start with numbers so they take priority (Eg: "1TfsOverlayAdd" , "2TfsOverlayEdit" etc.).
Also there is usually a delay for the green icons to appear in the folder explorer, so be patient.
I was having the same problem and just I executed this file:
C:\Program Files (x86)\Microsoft Team Foundation Server 2012 Power
Tools\TfsComProviderSvr.exe
After a few minutes the menu appeared.
This problem also occurs when you are running Visual Studio under different credentials (i.e. an account with Administrator privileges) than the logged on user. Logging on as that same user displays the ShellExtension correctly. But that's just not an option here...
I have not yet found a solution. It would be a nice feature to be able to set some options for TfsComProviderSvr.exe, so that one can let it watch workspace folders for a different 'Team Member' than the logged on user...
I've tried running Explorer.exe with other credentials, but that does not spawn a new TfsComProviderSvr.exe. Starting it by hand with the different credentials also does not seem to work. An instance of TfsComProviderSvr.exe is always (re)spawned for the currently logged on user.
Forgive me for sharing the obvious, but I had a similar issue, and in my case it appears that the default selected installed features were different than I expected.
I reran the installer using "Modify" instead of "Repair" and confirmed that the Windows Shell Extension feature was selected for installation:
I'm running a similar environment (VS 2010 Shell with VS 2013 Professional). Perhaps that impacts the defaults.
Here is the Power Tools Installer that I used.
I had a similar issue, I ripped off old the version, gave me some issues as you have to stop the TFS process and the explorer process but you can always restart explorer again once the old version has been uninstalled.
Then I restated my machine.
Installed latest version: http://visualstudiogallery.msdn.microsoft.com/b1ef7eb2-e084-4cb8-9bc7-06c3bad9148f ( version 11.0.60506.0 )
Restarted my pc again
Navigated to a source control folder and all TFS icons and shell extensions now started to appear.
Bottom line, the latest version worked for me, did not have to fiddle with reg'values at all.
Here's how I fixed mine. I had installed Visual Studio 2015 and installed TFS Power Tools for VS 2015. I also installed Visual Studio 2017. I generally use VS 2017 and had attached to TFS there. I hadn't attached VS 2015 to TFS and the power tools menu would not show up in explorer. I finally realized that when they say you have to have the same version of Visual Studio installed that you ALSO have to have that visual studio Team Explorer connected to TFS. You don't have to use it beyond that, but it must be connected using the dialog, like you see here.

WCF REST starter kit fails to install

I just, quite anxiously, downloaded the spankin new WCF REST starter kit. The installed failed. Anyone else had this problem?
http://msdn.microsoft.com/en-us/netframework/cc950529.aspx
Edit: The install fails during the template installation. The VS JIT debugger window pops up. Nothing else is running the PC, I am running as an admin on XP Pro, and the error occurs from either the EXE or the MSI.
Yes, it just failed for me too. Got a warning about replacing an existing file during the template install, then a hard crash after I told it to continue.
EDIT: Just tried again - it worked. Did 3 things different:
Closed all running VS2008 SP1 instances
Read the install guide closer and chose to run setup.exe instead of the msi, and did "Run As Administrator"
Didn't close the MSI installer until the delayed template installer had completed.
Here's the Install Guide:
SYSTEM REQUIREMENTS:
Windows Vista OR Windows Server 2008 OR Windows Server 2003
Visual Studio 2008 SP1
INSTALL AND USAGE STEPS:
Before installing, remember to uninstall any versions you have installed on the machine (see the Uninstall section below for steps to uninstall).
Run the setup.exe in administrator mode (right click on setup.exe and select 'Run as Administrator')
The install process will launch a visual studio installer. Remember to click through the visual studio installer to install the templates. NOTE: You may miss the vsi that is launched, so be sure to finish both the vsi and setup.exe installs to ensure that the whole install process is complete.
While running the vsi, you will get a prompt, which you can safely accept to continue.
Once installed, build the Microsoft.ServiceModel.web project installed on your machine.
You need to reference the Microsoft.ServiceModel.Web.dll assembly from the template generated projects, as well as from the samples. Please remember to verify this while using your templates and projects.
Note that you may also use a project reference instead.
There is a solution that includes all the samples provided in the "WCF REST Starter Kit\Samples\WCF REST Starter Kit Samples" location. This gives you a way to easily try out all the samples from one place.