Running DNU Restore on VSO build - asp.net-core

I am trying to get DNX projects building on VSO's host agent.
First thing is installing DNX. I have the following powershell script to do this:
dnx-upgrade.ps1:
dnvm upgrade -r clr -arch x86 -v 1.0.0-beta6
It successfully installs and PATH is updated:
Adding
C:\Users\buildguest.dnx\runtimes\dnx-clr-win-x86.1.0.0-beta6\bin to
process PATH
Adding
C:\Users\buildguest.dnx\runtimes\dnx-clr-win-x86.1.0.0-beta6\bin to
user PATH
Then I need to restore the solution's packages with this script:
dnu-restore.ps1:
dnu restore
But I get the following error when executing dnu-restore.ps1:
[error]dnu : The term 'dnu' is not
recognized as the name of a cmdlet, function, script file, or operable
program. Check the
[error]spelling
of the name, or if a path was included, verify that the path is
correct and try again.
[error]At
C:\a\8ac4a4f6\Root\MyProject\Development\dnu-restore.ps1:1 char:1
[error]+ dnu restore
[error]+ ~~~
[error] + CategoryInfo :
ObjectNotFound: (dnu:String) [], CommandNotFoundException
[error] + FullyQualifiedErrorId :
CommandNotFoundException
Build tasks:
Why is this happening? Surely dnu should execute? Is there a better way to restore DNX project packages?

Using the Prebuild.ps1 script from this MSDN article solved the problem.
As Victor suggested, it may be because the steps are run in different processes.

Related

Error While Installing amazon-cloud-watch-agent through system manager

I'm facing issue while installing amazon-cloud-watch-agent through AWS system manager.Error details as follows.
install errors: & : The term 'C:\Program Files\Amazon\AmazonCloudWatchAgent\amazon-cloudwatch-agent-ctl.ps1' is not recognized as the
name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
included, verify that the path is correct and try again.
At C:\ProgramData\Amazon\SSM\Packages_arnawsssmpackageamazoncloudwatchagent_2B_HP6ASKUGHXDL73H24T7UUUKNWXRDTKWGMMX5YMX
LDHWGQE2KUPXA====\1.247357.0b252275\install.ps1:23 char:3
& "${Cmd}" -Action cond-restart
+ CategoryInfo : ObjectNotFound: (C:\Program File...h-agent-ctl.ps1:String) [], ParentContainsErrorRecord
Exception
+ FullyQualifiedErrorId : CommandNotFoundException
failed to run commands: exit status 1
Failed to install package; install status Failed
I have tried install it manually.It also didn't work.
The error message you are seeing indicates that the installation script is having trouble locating the script included in the CloudWatch Agent installation package called amazon-cloudwatch-agent-ctl.ps1. This could occur if the CloudWatch Agent installation package was not downloaded completely or was downloaded to an unexpected location.

How to debug the openjdk9 by netbeans8.2 in win10?

When I tried to debug the openjdk9 by netbeans8.2 in win10, I got the following error:
"\"D:/jdk9/jdk9/build/windows-x86_64-normal-server-fastdebug/jdk/bin/java.exe\":
not in executable format: File format not recognized"
How can I fix it?
I build the source code by command "./configure -with-freetype=/cygdrive/c/freetype -enable-debug -with-target-bits=64", then run make all, I also tried slowdebug, however, that also failed.
If I "run" the project instead of "debug", it runs successfully like below, so there is no issue for the file windows-x86_64-normal-server-fastdebug/jdk/bin/java.exe, it seems the gdb doesn't recognize the java.exe file.
Also I opened the openjdk source code from the location D:/jdk9/jdk/common/nb_native by netbeans, see below:
And tried to build it by netbeans, however, it produces the following error:
cd 'D:\jdk9\jdk\common'
sh ../configure --with-freetype=/cygdrive/c/freetype --with-debug-level=slowdebug --with-target-bits=64
/cygdrive/d/jdk9/jdk/configure: /cygdrive/d/jdk9/jdk/common/autoconf/configure: No such file or directory
PRE-BUILD FAILED (exit value 1, total time: 743ms)
I know that both paths /cygdrive/d/jdk9/jdk/configure and /cygdrive/d/jdk9/jdk/common/autoconf/configure exist.
This is how I configured the pre-built commands:
If you build the openjdk -with-target-bits = 64, then make sure that you installed a 64-bit gdb, or build the openjdk in 32-bit mode.
Your steps to import the nbproject looks correct.
Change Build => Pre-Build properties:
Set "Working Directory" to ../..
Set "Command Line" to sh ./configure ...

Extension host terminated unexpectedly with error code 3221225477 Signal: null

PS D:\> install npm
install : The term 'install' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ install npm
+ ~~~~~~~
+ CategoryInfo : ObjectNotFound: (install:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
When trying to install npm in vscode version VSCodeSetup-x64-1.17.2 in windows 10 OS, I am getting the error.
Error Code from debugger is as below
3221225477 Signal: null
e._onExtensionHostCrashed # /C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:29
/C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:28 Extension host terminated unexpectedly.
e.doShow # /C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:28
C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:28 Extension host terminated unexpectedly.
e.doShow # /C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:28
Please advise how to resolve this error.
Thanks and Regards
Vijay
You're typing 'install npm install' but the first 'install' is not a binary for the CMD.
Try to install node (which includes npm):
https://nodejs.org/en/download/
Goto the environment path settings, at the "Path" in both user path and system path, there is a more ";" for visual studio code, remove the ";" and restart the VS code, everything is ok now.
I think it's a Microsoft bug.

Could not load file or assembly 'Microsoft.Build.Framework, Version=15.1.0.0 when trying to create a nuget package

This used to work before. When I try to create a nuget package from Package Manager Console using the following command
nuget.exe pack $testCoreProj -Build -OutputDirectory $outputPackagePath
I get this error
Attempting to build package from 'Test.PageObjects.csproj'.
MSBuild auto-detection: using msbuild version '15.0' from 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin'.
nuget.exe : Could not load file or assembly 'Microsoft.Build.Framework, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
At C:\Good\GIT\mg-alfa-dev\Test.Core\CreateNuGetPackage.ps1:26 char:1
+ nuget.exe pack $testPageObjectsProj -Build -OutputDirectory $outputPa ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (Could not load ...file specified.:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
Since you can run that commnad line in the Package Manager Console, you should add the path of nuget.exe into the environment path. Could please try to update the nuget.exe version (Above 4.0) in that path:
https://dist.nuget.org/win-x86-commandline/v4.3.0/nuget.exe

sencha build giving error stbuild exited with non-zero code : 7

I wanted to create .apk file of my sencha application so I executed below command
sencha package build packager.json
but when I executed above command,it generates error as given below.
'C:\Program' is not recognized as an internal or external command,operable program or batch file.
""D:/Android/AndroidSDKr15\tools\android" create project --target android-16 --name chartDemoApp --activity STActivity --path "../build/" --package triumphsys. mobility.chartDemoApp"
Could not run ant with error: 1
Failed to package application
[ERR] stbuild exited with non-zero code : 7
even I have attached my command prompt here and packager.json here.
please help me to resolve it.
I was able to solve the problem by uninstalling "C:\Program files\Sencha Cmd" and again re-installing it at "C:\Sencha" without any spaces in folder name. and it worked for me.