terraform : The term 'terraform' 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
terraform init
+ CategoryInfo : ObjectNotFound: (terraform:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
You can refer this link.
Install Terraform
Install Terraform Visual Studio Code extension
Or you can try using Linux WSL for windows.
If you have downloaded it in the windows system then try to login with the administrator on visual code and it should work.
Related
I am trying to enable-migrations and add-migration in the project but getting error.
Anyone faced same issue please share your experience.
Visual Studio 2013
Entity Framework 6.4.4
Error:
PM> Add-Migration 'Intialize Database'
Add-Migration : The term 'Add-Migration' 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
Add-Migration 'Intialize Database'
+ CategoryInfo : ObjectNotFound: (Add-Migration:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
You need to install Microsoft.EntityFrameworkCore.Tools nuget to access EF Core tools such Add-Migration:
Package Manager Console:
Install-Package Microsoft.EntityFrameworkCore.Tools
.NET CLI command:
dotnet add package Microsoft.EntityFrameworkCore.Tools
I'd like to force NuGet to restore my NuGet packages. Going to my solutions directory and type NuGet restore, even with the latest downloaded NuGet.exe doesn't work.
As explained here, I can do this in a Powershell prompt, using the Update-Package command (as I prefer not to use my Visual Studio environment).
However, my Powershell seems not to understand Update-Package, although I have a +5 version:
PowerShell Prompt> Get-Host | Select-Object Version
Version
-------
5.1.19041.1023
PowerShell Prompt> Update-Package -reinstall
Update-Package : The term 'Update-Package' 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
+ Update-Package -reinstall
+ ~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Update-Package:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
What can I do in order to launch Update-Package successfully in my Powershell?
Thanks in advance
Mybe you can try Update-Package -reinstall command in Package Manager Console
Standard powershell doesn't ship have NuGet restore functionality.
If you refer to https://learn.microsoft.com/en-us/nuget/consume-packages/install-use-packages-visual-studio, and https://learn.microsoft.com/en-us/nuget/consume-packages/package-restore, you will see that there are 5 ways to use NuGet.
Visual Studio (and MSBuild.exe)
Visual Studio for Mac
dotnet CLI
NuGet.exe CLI
Package Manager Console (in Visual Studio)
There is no functionality built into powershell.
Your only options are to build on top of the above mentioned tooling.
Call dotnet.exe restore
Call nuget.exe restore
Call msbuild.exe restore.
I don't use Update-Package, but the following:
& "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe" /t:restore C:\code\projectdirectory
You may have to change the path to MSBuild.exe
Not native PowerShell, but it works.
I'm trying to use the DesktopAppConverter to convert an .EXE package into UWP compatible executable so I can publish on Windows Stores.
The exe package is compiled from Unity3D for standalone.
When I use the convert command I get an error.
DesktopAppConverter.exe -Installer .\eve.exe -Destination .\Converted
-PackageName "eve" -Publisher "CN=C9839D08-E518-4B7C-BA6C-FCA61493C7F3" -Version 1.0.0.0 -MakeAppx
C:\Program Files\WindowsApps\Microsoft.DesktopAppConverter_2.1.4.0_x64__8wekyb3d8bbwe\DesktopAppConverter.ps1 : Exception calling "Compile" with "0" argument(s): "Reference
to undeclared attribute group 'http://schemas.microsoft.com/appx/manifest/preview/windows10/msixappcompatsupport:PreviewEntryPointAttributesGroup'."
At line:1 char:1
+ &'C:\Program Files\WindowsApps\Microsoft.DesktopAppConverter_2.1.4.0_ ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,DesktopAppConverter.ps1
I would appreciate the help , I tried looing online but couldn't find a solution.
The DesktopAppConverter is Microsoft's first try at building a tool for converting older packages to MSIX/APPX.
They deprecated it and instead released the MSIX Packaging Tool. I included a link that teaches you how to use this tool to convert your package, give it a try.
If this still does not work, you can use the free Express edition from Advanced Installer. This was released in a partnership with Microsoft before they built their own solution (the MSIX Packaging Tool).
I installed CMake on Windows and I added the path to Sytem Variables (C:\Program Files\CMake\bin)
I can see it with from command prompt:
D:\>cmake --version
cmake version 3.18.2
CMake suite maintained and supported by Kitware (kitware.com/cmake).
But when I try to same from the Visual Studio Code's terminal, I get an error:
PS D:\Cmake\Mastering-CMake> cmake --version
cmake : The term 'cmake' 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
+ cmake --version
+ ~~~~~
+ CategoryInfo : ObjectNotFound: (cmake:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
The CMake extension also reports an error:
The "cmake" command is not found in PATH. Install it or use `cmake.cmakePath` in the workspace settings to define the CMake executable binary.
But I already added CMake to the Path. What else should I do? Thanks!
Restarting Visual Studio Code made it update the PATH.
New terminals can find cmake now.
Today I started to work with bower in my project in Visual Studio 2013. When I tried to run bower init from the Package Manager Console in VS, I got the following error:
PM> bower init
bower.cmd : bower ENOINT Register requires an interactive shellIn Zeile:1
Zeichen:1
+ bower init
+ ~~~~~~~~~~
+ CategoryInfo : NotSpecified: (bower ENOINT ...teractive shell:St
ring) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
Additional error details:
Note that you can manually force an interactive shell with --config.interactive
Apparently the command needs an interactive shell to ask the user about some setting preferences, so I ended up running it outside of VS in Powershell (which is not really great).
The Package Manager Console only seems to provide non-interactive functionality (in the style of "fire and forget"). I searched for a plugin for VS that provides an interactive shell, but had no success.
Is there any interactive shell available that integrates with Visual Studio, allowing you to run an interactive script like bower init without having to leave the IDE?