I'm trying to run Microsoft Power Platform CLI https://learn.microsoft.com/en-us/power-platform/developer/cli/introduction commands on a linux build agent for CI/CD puposes. This CLI is only available for linux as a VSCode extension. Example usage of the CLI: pac help.
I've installed VSCode on the build agent and the Power Platform extension with the following commands:
tar -xzf code-stable-x64-1675266941.tar.gz
code --install-extension microsoft-IsvExpTools.powerplatform-vscode-1.1.16.vsix
These command run successfully, but I receive "command not found" when running pac help. This was somewhat expected as I'm not running the command from the Integrated terminal in VSCode.
Is there a way to invoke the extension and run these commands without opening VSCode? I have the vsix file downloaded onto the build agent.
Related
In tutorial requirement is install vscode in windows and install Remote Development extension pack. Why not just install in wsl?
I've install vscode to wsl. When I run code in wsl I get message:
To use Visual Studio Code with the Windows Subsystem for Linux, please install Visual Studio Code in Windows and uninstall the Linux version in WSL. You can then use the `code` command in a WSL terminal just as you would in a normal command prompt.
Do you want to continue anyway? [y/N]
To no longer see this prompt, start Visual Studio Code with the environment variable DONT_PROMPT_WSL_INSTALL defined.
Which cons of run vscode in wsl as opposed to run it in Windows?
The WSL extension splits VS Code into a “client-server” architecture, with the client (the user interface) running on your Windows machine and the server (your code, Git, plugins, etc) running "remotely" in your WSL distribution.
When VS Code is started in WSL, no shell startup scripts are run.
The extension runs commands and other extensions directly in WSL so you can edit files located in WSL or the mounted Windows filesystem (for example /mnt/c) without worrying about pathing issues, binary compatibility, or other cross-OS challenges.
(source: MSFT DOCUMENTATION)
This is the architectural choice of Windows and - personally speaking - I feel like it's a choice to avoid conflicts and redundancies.
When running the WSL extension, selecting the 'Extensions' tab will display a list of extensions split between your local machine and your WSL distribution.
Installing a local extension, like a theme, only needs to be installed once.
Some extensions, like the Python extension or anything that handles things like linting or debugging, must be installed separately on each WSL distribution. VS Code will display a warning icon ⚠, along with a green "Install in WSL" button, if you have an extension locally installed that is not installed on your WSL distribution.
I am working on a linux machine my work can benefit from VSCODE.
When I install and try to run VSCODE on an Ubuntu machine, I get this error:
root#ca012294dcc1:/tmp# code --user-data-dir /tmp
To use Visual Studio Code with the Windows Subsystem for Linux, please install Visual Studio Code in Windows and uninstall the Linux version in WSL. You can then use the `code` command in a WSL terminal just as you would in a normal command prompt.
Do you want to continue anyway? [y/N] y
To no longer see this prompt, start Visual Studio Code with the environment variable DONT_PROMPT_WSL_INSTALL defined.
/usr/share/code/bin/../code: error while loading shared libraries: libxshmfence.so.1: cannot open shared object file: No such file or directory
WSL is out of scope. This is not a WSL senario
Remote SSH is out of scope. I know I can connect over SSH with Visual Studio Code. But I like to replace something like VIM with code
There is no Linux GUI available. Only text mode.
Is what I am trying to do possible?
I'm trying to use Visual Studio Code with Bash on Ubuntu on Windows. I have VS Code installed on Windows, but otherwise use Bash exclusively for my JavaScript development workflow.
I have node and npm installed on Bash (via apt-get), however, I do not have node and npm also on Windows to avoid duplication. In my VS Code settings, I have configured the integrated shell to use Bash:
"terminal.integrated.shell.windows": "C:\\windows\\Sysnative\\bash.exe"
The integrated shell works fine, and node and npm are both accessible. However, when I launch VS Code on my project, I get the warning:
Could not install typings files for JavaScript langauge features. Please ensure that NPM is installed or configure 'typescript.npm' in your user settings
I have tried both the following settings, neither of which work:
"typescript.npm": "C:\\windows\\Sysnative\\bash.exe"
"typescript.npm": "C:\\windows\\Sysnative\\bash.exe -c \"npm\""
Is it possible to get VS Code to install typings files via the npm that is installed on Bash?
Try setting “externalTerminal.windowsExec”: “bash” in your settings file to set it as the terminal executable and then restart VS Code
Is there any way to create (from scratch) and run simple C# Console app in VSCode editor. ?
Can you please provide step-by-step instruction how I can do that?
What kind of files I must to include (except HelloWolrd.cs obviously)?
What kind of commands I must to execute?
Navigate to the folder you want to create the console app in. In VSCode, use Ctrl+` to open the terminal window or go to View and select Integrated Terminal. Now type the following below:
dotnet new console
dotnet restore
dotnet run
The best way at this present time to create a console application is to create a DNX style Console Application.
I would advise that you download and install the generator-aspnet Yeoman generator and use that to generate a DNX Console application. Once you've got generator-aspnet installed, in your terminal/console app type yo aspnet and select Console Application.
Here's a thorough guide to creating a DNX Console application which will work with VS Code: http://docs.asp.net/en/latest/dnx/console.html
I was trying to get a 'hello world' set up using visual studio code and c# on mac/osx.
the way I did it was as follows:
Install VS Code and the C# extension
Here (https://www.microsoft.com/net/core#macos) are instructions for installing dotnet core using brew:
Install OpenSSL
brew update
brew install openssl
ln -s /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/lib/
ln -s /usr/local/opt/openssl/lib/libssl.1.0.0.dylib /usr/local/lib/
Install dotnet core pkg: https://go.microsoft.com/fwlink/?LinkID=827526
Create a folder somewhere and in that folder run dotnet new
Go into VS code and open the folder to get the project loaded
Open the terminal in that folder and run dotnet run
To create run as a task
CMD+shift+P then type task
select the Task: Configure Task Runner option
in the tasks.json file after the build task, add the following:
{
"taskName":"run",
"args": [
"${workspaceRoot}/project.json"
]
}
I want to deploy xap to windows phone emulator 7.1 using command prompt and i have been following the msdn article http://msdn.microsoft.com/en-us/library/windowsphone/develop/ff402565(v=vs.105).aspx#BKMK_commandline
i am able to build the project using this command:
MSBuild D:\Projects\PhoneApp1\PhoneApp1\PhoneApp1.csproj
but when i run this command: XapDeployCmd.exe /installlaunch D:\PhoneApp1.xap /targetdevice:xd i get error saying "'XapDeployCmd.exe' is not recognized as an internal or external command,operable program or batch file."
i have the visual studio update 2 installed.what does this mean and how should i use command prompt for deploying my xap.
Did you check if XapDeployCmd.exe direcoty is on your environment path?
if not you can add the whole path, like: C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v8.0\Tools\XAP Deployment\XapDeployCmd.exe /installlaunch D:\PhoneApp1.xap /targetdevice:xd
I would also check if you have any emulator installed