"exited with code 9009" error while trying to build AngularJSToDo Sample app for Visual studio 2013 community - visual-studio-2013

I downloaded Visual studio 2013 Community today, after that I manually installed all the needed tools for the Apache Cordova extension for visual studio. Then I downloaded the AngularJS Sample App
to try it out .. but when I try to build it it gives me that error
The command "Powershell -ExecutionPolicy RemoteSigned Unblock-File
'C:\Projects\AngularJSTodo Sample for Tools for Apache
Cordova\JavaScript\AngularJSToDo\FetchRequirements.ps1'; Powershell
-File 'C:\Projects\AngularJSTodo Sample for Tools for Apache Cordova\JavaScript\AngularJSToDo\FetchRequirements.ps1'" exited with
code 9009
any help would be greatly appreciated.

The sample projects have been authored in a way that the requisite dependency frameworks will be automatically downloaded when you run the project for the first time.
However, the libraries may fail to download in case the script does not have the right permissions to execute. To fix this:
Open the folder where you’ve downloaded the sample app
Identify the FetchRequirements.ps1 file and right click it
Choose “Properties”
Click the Unblock button if it shows up
Try to run the project again through Visual Studio

Related

How to build Visual Studio Installer Project in Azure Devops Pipeline Hosted Agent

I have a Visual Studio setup project. Normally I use the Microsoft Visual Studio Installer Projects extension, and run an MSBuild Exec task with command line using devenv. This works on my dev box and my existing build machine. However I'm looking to migrate to a hosted pipeline agent using the VS2017 image.
I was hoping the installer extension might already be installed, so I tried my build and got an error:
"C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\devenv.com" "D:\a\2\s\Source\Build..\WindowsFormsApp1\WindowsFormsApp1.sln" /Build "Debug" /Project "Setup1" /ProjectConfig "Debug" /Log
The operation could not be completed. The parameter is incorrect.
I tried adding the VSIX to my repo, and then issuing a command line install of the VSIX as such:
"C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\VSIXInstaller.exe" /a /quiet /log:MyTestApp.log D:\a\2\s\Source\Build\InstallerProjects.vsix
However that seems to block for about 10 minutes, and then fails with an error (I suspect the UI is blocking even though I used the /quiet arg to suppress the UI):
... exited with code -2146233088.
Is there any way to build a Visual Studio installer project using a MS-hosted pipeline agent?
How to build Visual Studio Installer Project in Azure Devops Pipeline Hosted Agent
AFAIK, I am afraid we could not build Visual Studio Installer Project in Azure Devops Pipeline Hosted Agent at this moment.
I encountered a similar issue two weeks ago, after a period of investigation, I started to try the same idea as you, using command line to install the Microsoft Visual Studio Installer Projects extension.
However, I got the timeout issue. I could not install that extension on the hosted agent. To test the reason for this, I use the same command lien to installed that extension on another local machine. Indeed, there is a UI window to confirm if you want to install this extension, even after I give the /admin parameter:
Check the options here.
Then I try to open the command line with Administrator and execute the same command line, it can successfully install that extension. So, I want to execute the command line in the Azure DevOps pipeline. But no success. Because we could not execute command line script as admin using Command Line Script task.
It seems we have to set our private agent.
Hope this helps.

The "GetReferenceNearestTargetFrameworkTask" task was not found

I have a problem with autocompletion in VS 2017 Community.
Previously I had VS 2017 Enterprise from school, but the key expired so I moved to Community.
Before, everything works great, but now it doesn't work at all.
I found a solution on Stack Overflow here but it doesn't work, so found another solution at GitHub here.
And I got this:
Build FAILED.
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(1601,5): error MSB4036:
The "GetReferenceNearestTargetFrameworkTask" task was not found. Check the following:
1.) The name of the task in the project file is the same as the name of the task class.
2.) The task class is "public" and implements the Microsoft.Build.Framework.ITask interface.
3.) The task is correctly declared with in the project file, or in the *.tasks files located in the
"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin" directory.
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:00.11
Do you know what to do next?
I had the same error message but for a different problem.
So, I'm using MSBuild to automate build/deploy process for Azure Functions. Everything was working fine until I updated both Visual Studio 2017 and Visual Studio Build Tools 2017 at which point I started getting this error. To be precise I got this error only when using MSBuild, building project manually from VS was working fine.
In my case I already had everything set as per #Programmer's answer.
But as I was using MSBuild it turned out that I also had to install NuGet targets and build tasks which are part of Visual Studio Build Tools.
Follow these to fix that error. This applies to VS 2017:
Fix 1:
1.Install Nuget PackageManager from here.
2.Restart Visual Studio.
If the problem is still there, continue below
Fix 2:
1.Download and start/run the Visual Studio Installer again.
2.While the Visual Studio Installer is still running, go to the "Individual Components" tab
3.Tick the "NuGet package manager" check-box that is under "Code tools" option.
4.Click Install to install it.
Screenshot of where this is located:
That should fix the error you see in this question. Restart Visual Studio and test the auto-completion function. If it's not working, see the answers from this question as that is a whole different issue.
I was seeing this issue with msbuild 15.6.82 on a build environment that does not have VisualStudio 2017, only VS Build Tools.
Here's a PowerShell script that resolves this issue, it pretty much does the equivalent of previous answers in the VS Installer, but silently and waiting for completion.
Start-Process "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installer.exe" -ArgumentList 'modify --installPath "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools" --quiet --add Microsoft.VisualStudio.Component.NuGet.BuildTools --add Microsoft.Net.Component.4.5.TargetingPack --norestart --force' -Wait -PassThru
I'm working with a headless build server on server core, resolved by installing chocolatey package choco install visualstudio2017-workload-webbuildtools from here:
https://chocolatey.org/packages?q=msbuild
I'm reporting an answer from a Microsoft techician
This usually indicates one of two things:
A failed VS installation. If that's the case, I would recommend running a repair on your VS install.
You have msbuild assemblies in the GAC. If that's the case, please ungac them.
Livar Cunha [MSFT]
I got the same problem in Visual Studio 2019, I solved it by simply install unity package

MSBuild windows 2012 Visual Studio 2015 cannot find AxImp.exe

I'm trying to set up Jenkins in a Windows Server 2012 and Visual Studio 2015 and I cannot build my application using MSBuild, I get some Windows SDK issue.
(ResolveComReferences target) ->
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets(2015,5):
error MSB3091: Task failed because "AxImp.exe" was not found, or the
correct Microsoft Windows SDK is not installed. The task is looking
for "AxImp.exe" in the "bin" subdirectory beneath the location
specified in the InstallationFolder value of the registry key
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft
SDKs\Windows\v8.0A\WinSDK-NetFx40Tools-x86. You may be able to solve
the problem by doing one of the following: 1) Install the Microsoft
Windows SDK. 2) Install Visual Studio 2010. 3) Manually set the
above registry key to the correct location. 4) Pass the correct
location into the "ToolPath" parameter of the task.
I've tried the following:
Create the Registry key pointing to the SDK installed. No sucess.
Uninstall all C++ Compilers, download Windows 7 SDK iso and install, as explained here. No success.
Modify Visual Studio 2015 installation adding and removing components, marking explicitly SDKs to be installed. No success.
When building from Visual Studio it builds fine.
I really don't know what's happening here and why I cannot get it working, seems a bug to me regarding Windows or Visual Studio 2015.
The solution was much easier than it seemed to be, just changing the ToolsVersion of the Project node from 4.0 to 14.0 made the trick:
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
So I had a really similar issue, using Jenkins and Msbuild to build projects, and getting this same error.
My solution steps:
first find out IF Aximp.exe exist on the Jenkins machine. I don't have access to the machine, so I included a stage in my jenkinsfile to run this command:
//temp, try and get location of aximp.exe on build machine
bat 'dir "C:\\Program Files (x86)\\Microsoft SDKs\\Windows" /b /s aximp.exe'
I then reviewed the output to see where it lives.
then, I added a parameter to my msbuild command in my jenkinsfile like this:
bat 'msbuild mysolution.sln /p:VisualStudioVersion=14.0 "/p:TargetFrameworkSDKToolsDirectory=C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v10.0A\\bin\\NETFX 4.6.2 Tools" ' //your folder where aximp.exe lives
And the build now runs!

"Gruntfile.js" failed to load

I am using Visual Studio 2013 and followed this article to user grunt in Visual Studio. But when i try to execute, I get following error in Task Runner Explorer:
Failed to load.See output window(Ctrl+Alt+O) for more information.
Output window does not have any relevant information.
Any help would be appreciated!
To fix this, just open a command prompt.
Change the working directory to the folder containing the file grunt.js.
Then enter:
npm install
All dependencies for grunt should now be installed. When you open the project in Visual Studio 2013 afterwards, all the tasks should now be visible.
In Visual Studio 2017, go to Tools > Options > Projects and Solutions > External Web Tools
Change “$(PATH)” to load above “$(VSINSTALLDIR)\Web\External”
Click OK, go back to the Task Runner Explorer and click the Refresh icon.

Can't open the VSVim project

I have a clean install of Visual Studio 2010 with C# and F# installed and I am getting the following error when I try to open the solution cloned from github.
D:\projects\VsVim\VsVim\VsVim.csproj :
error : The project file
'D:\projects\VsVim\VsVim\VsVim.csproj'
cannot be opened.
The project type is not supported by
this installation.
Is there a way to get more information about what exactly I am missing so that I can install the components?
You probably need to install the Visual Studio 2010 SDK.
Noah is correct that the most likely problem is you need to install the Visual Studio SDK. The full steps to getting VsVim to open and compile are the following (taken from the README.txt file in the enlistment).
Install the Visual Studio SDK
Run the script Populate-References.ps1 from the enlistment root directory
Open the Solution.

Resources