Visual Studio Tools for Apache Cordova : Update NPM and NodeJS - visual-studio-cordova

Hi I installed Visual Studio Tools for Apache Cordova during the winter. I have now worked on an angular project which has npm dependancies, and gulp files which use a Node server to serve pages to test out the app.
I did however like the way VS.Net installed NodeJS and other tools during the Visual Studio Tools for Apache Cordova installation, adding the correct paths to my system to get great CMD support for git, npm etc.
I want to continue to develop Cordova apps using Visual STudio, especially using the Mac remote deployment node module that was installed. However I find that the version of NodeJS and NPM that was installed is now out of date. I got a warning about version numbers when I installed the Azure-cli node package.
What is the best way to update NodeJS and NPM versions so that they stay integrated with Visual Studio Tools for Apache Cordova

There is no specific limitation for updating nodejs, but please be aware of some known issue related to newer version of nodejs. Just make sure you will not run into these scenarios, and I think you can feel free to update.
If you do encounter any issue after you update the nodejs to a specific version, I think it's good to raise the issue and let MS VS team to fix it in future release.
And make sure the nodejs is added into your PATH system environment varaibles.

Related

Visual Studio 2017 Installation of "ASP.NET and web development"

I've downloaded Visual Studio with --layout option, and installed it.
Installation was successful with warning, as below,
The product failed to install the listed workloads and components due to one or more package failures.
Incomplete workloads
.NET Core cross-platform development (Microsoft.VisualStudio.Workload.NetCoreTools,version=15.0.26208.0)
ASP.NET and web development (Microsoft.VisualStudio.Workload.NetWeb,version=15.0.26208.0)
Azure development (Microsoft.VisualStudio.Workload.Azure,version=15.0.26208.0)
Mobile development with JavaScript (Microsoft.VisualStudio.Workload.WebCrossPlat,version=15.0.26208.0)
Node.js development (Microsoft.VisualStudio.Workload.Node,version=15.0.26208.0)
Incomplete components
.NET Core 1.0 - 1.1 development tools (Microsoft.NetCore.ComponentGroup.Web,version=15.0.26208.0)
.NET Core 1.0.1 development tools (Microsoft.Net.Core.Component.SDK,version=15.0.26208.0)
Container development tools (Microsoft.VisualStudio.Component.DockerTools,version=15.0.26208.0)
Git for Windows (Microsoft.VisualStudio.Component.Git,version=15.0.26208.0)
Visual Studio Emulator for Android (Component.Android.Emulator,version=15.0.26208.0)
There errors were listed in log file.
Every time I modify the Installer and try to install web components, doesn't work.
I've tried to restart computer, restart the installer.
Nothing works.
After some digging,
I found a solution.
Try to install Visual Studio with setting temp and %temp% folder to short path, like d:\temp.
Step 1 : open cmd with administrator privileges (to ignore administrative privileges error).
Step 2 : execute command - set tmp="d:\temp"
Step 3 : execute command - set temp="d:\temp"
Step 4 : execute vs_community.exe with whatever --layout option you want.

Error while Publishing Web App in Visual Studio Professional 2013

I am trying to publish my Web App in Visual Studio Professional 2013 but getting the following error
I got the same question asked over here but no useful answer.
Can anyone please help
You probably will be using older version, that was having an issue. refer detail [here]
Install the newer web deployment tool, should work.
which .net version are you using.
check web deploy version. if vs has 2 web deploy version, the vs get confuse to take which version. If it has 2 version, just uninstall vs and then instal it along with web deploy. if the Vs has one 1 web deploy version, you uninstall and install the web deploy. It will rectify your problem i hope.
You can refer This link
Check if version 9.0.0.0 of the assembly is installed in GAC. (from the VS2013 developer command prompt) gacutil /l Microsoft.Web.Deployment. Issues like this have occurred in the past where things worked, then after installing an update (or trying to install one) then reports of missing dlls, like nuget, occur.
The usual course of action is to repair the Visual Studio installation.
There is a problem with your publish profile. Delete the pubxml file located bellow Properties folder in your project and then create a new publish profile.
I got the same problem when older project runs into the new .NET Framework, for that you have to do the following.
Right Click on your project name->select Property Pages -> Click Build from the menu-> then select Target Framework .Net framework 4.5 or your current using framework..
"Could not load file or assembly" means the required file (of that mentioned version) is not available in the assembly (nor in the registry). All you gotta to do is to ensure this same is installed properly that would allow you to proceed further. The other things to ensure is the latest framework installed on your system.
Think you have some errors happen when to install or update Visual 2013, so you can reinstall again and this error will be fixed.

Pre Build Tasks with Visual Studio Tools for Apache Cordova

I am using bower.json to install dependencies for an Apache Cordova app created from Visual Studio and was wondering if it is possible to run a pre build task somehow in VS 2015 using the new task runner explorer (or another way) to copy just the minified files from bower_components to www\scripts or if my only option is what is listed here?
If it is possible using gulp, please let me know how starting form the blank Cordova app VS template.
The Visual Studio guidance for using NuGet with Cordova projects actually has something that may help here. That document includes a note about how to setup a before_prepare hook to copy NuGet files into the www folder when building. In Cordova before_prepare is one hook into the build process that is similar to a Pre Build task.

Third party software already installed

Im trying to install Tools for Apache Cordova for Visual Studio. In the first step I need to choose which third party dep. to install.
But Ive already installed most of them and already developing on this machine using cordova/node commandline-tools.
Do I need to reinstall all dependencies again? or just some (if yes, which ones?)
The installer for Tools for Apache Cordova automatically detects which software are already present on the machine. Depending whether you are installing for Visual Studio 2013 or 2015, the experience may seem a little different.
After install completes, all required tools will also be configured as expected. It is best to run the installer once to ensure that there are no incompatibilities, but rest assured, it will not re-install existing compatible software.
It is good to let Tools for Apache Cordova for Visual Studio install the 3rd party software because it will install and also configure the machine. If you want to install just the missing software manually then refer the list of dependencies here under Install dependencies manually section and accordingly install the required software and configure the machine.

How to build .sqlproj projects on a build server?

I have many .sqlproj projects that need to be built on our build server. I don't want to install all of Visual Studio on the build server just so I can install SSDT to build these. How can I build .sqlproj projects without a full VS install?
Here's the raw error I get on the build server when trying to build without SSDT intstalled:
C:\MyProject\MyProj.sqlproj (4): The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
Answer: Microsoft now has an official NuGet package (see blog post).
Old answer, prior to August 2016; provided in case the NuGet package doesn't work for you:
Install dacframework.msi (x86|x64)
Install SQLDOM.MSI (x86|x64)
Install SQLLS.MSI (x86|x64)
Install SQLSysClrTypes.msi (x86|x64)
Install SSDTBuildUtilities.msi (from the "Administrator Install Point" as setup in step 3 here)
Done!
Source: Headless MSBuild Support for SSDT (*.sqlproj) Projects.
Microsoft SQL Server Data Tools:
http://msdn.microsoft.com/en-us/data/hh297027
Install the tools on build machine to fix the problem.
The Microsoft SQL Server Data Tools team has released a NuGet package named Microsoft.Data.Tools.Msbuild, which helps to build SQL Projects on build servers.
see : https://blogs.msdn.microsoft.com/ssdt/2016/08/22/releasing-ssdt-with-visual-studio-15-preview-4-and-introducing-ssdt-msbuild-nuget-package/
NuGet package : https://www.nuget.org/packages/Microsoft.Data.Tools.Msbuild/
SSDT v12.0.50730.0 requires Visual Studio to be installed beforehand. I found the easiest solution was to install the bare minimum Visual Studio components which were downloaded from MSDN Subscriber downloads:
Visual Studio 2013 Isolated
Visual Studio 2013 Shell
Then SSDT installed fine.
I also used part of the solution outlined above.
* Install dacframework.msi
* Install SQLDOM.MSI
* Install SQLLS.MSI
* Install SQLSysClrTypes.msi
I use MSBuild 12.0 to perform the build which is also available as a separate download.
I was having the exact same issue building a SQL Server project on an Azure DevOps CI/CD pipeline. None of the pre-built build tasks would work for me.
Some answers mention a NuGet package, but I am not sure how can I use it, because SQL Server projects do not allow to install NuGet packages.
I solved this by avoiding to add a SQL Server project to the solution.
I achieved this by using an MSBuild SDK, capable of producing a SQL Server Data-Tier Application package (.dacpac) from the set of SQL scripts. By adding this second project to the solution, I managed to continue taking advantage of linking the project to a live database through SQL Server Object Explorer on Visual Studio. I gave a more detailed explanation about my implementation in this answer.

Resources