What is the DotNet CLI 'Tool' command? [duplicate] - asp.net

This question already has answers here:
No executable found matching command "dotnet-tool"
(2 answers)
Closed 4 years ago.
I'm trying to get the library based Identity pages scaffolded into my project, and the MS docs say use this command to start with:
dotnet tool install -g dotnet-aspnet-codegenerator
Yet when I type that command, I get back the error:
No executable found matching command "dotnet-tool"
Is this tool something I need to have installed or what?

'dotnet tool' is used to install .NET Core global tools. Try to specify --global or provide a path so it knows where to be installed. Paths are done using --tool-path I believe.

Related

What's the expected value for DOTNET_ROOT variable when installing dotnet core from tarballs?

I'm installing dotnet core on Linux ARM64 using tarball as explained here. After installing I followed the suggestion to set DOTNET_ROOT=$PATH:$HOME/dotnet. However global tools fail with A fatal error occurred, the required library libhostfxr.so could not be found.
I fixed by changing the env variable to DOTNET_ROOT=$HOME/dotnet.
Is this a bug in the docs ?
Yes, this appears to be a bug in the documentation. The code which interprets DOTNET_ROOT does not split the string on :. DOTNET_ROOT should be set to an absolute file path which points to the directory containing the dotnet executable. If dotnet is on your PATH already, you can set it like this in bash/zsh.
export DOTNET_ROOT="$(dirname $(which dotnet))"
came across this problem while working on porting .net libraries from Windows to Raspberry PI. On the Raspberry the .net core 3.1 installs in /opt/dotnet, and that's where DOTNET_ROOT ought to point at:
export DOTNET_ROOT="/opt/dotnet"
This should eliminate the "fatal error occurred. The required library libhostfxr.so could not be found." error when attempting to run portable code using the 'dotnet' command on the RPI
I was getting an error trying to execute the dotnet ef from the EF cli global tools install.
Added this to the bottom of my /home/<user>/.bashrc worked for me.
# User specific aliases and functions
export DOTNET_ROOT=$HOME/.dotnet
export PATH=$PATH:$DOTNET_ROOT:$DOTNET_ROOT/tools
Then the dotnet ef command worked correctly.
I had to add this to my ~/.zshrc
export DOTNET_ROOT=~/.dotnet
export PATH=$PATH:$DOTNET_ROOT
I found that I had different locations for different sdk/runtime versions. One was installed at "/home/{username}/.dotnet" and the other at "/usr/share/dotnet".
I found a post stating the default DOTNET_ROOT is "/usr/share/dotnet" and errors showed dotnet command was executing this location. I copied all files from "home/{username}/.dotnet" to "/usr/share/dotnet" with rsync.
sudo apt install rsync;
sudo rsync -a /home/{username}/.dotnet/ /usr/share/dotnet

windeployqt module QtQuick not installed [duplicate]

This question already has answers here:
Deploy Qt5 QML application
(8 answers)
Closed 4 years ago.
Im trying to deploy a set of QT applications. On linux all applications works fine after installing all dependencies, but in windows QtQuick based applications doesn't work at all.
To deploy on windows I follow this steps:
Compile my project in release mode.
Add mingw to the system environment path
Run windeployqt.exe --release c:\myappdir\relesase\myapp.exe
When step 3 is finish I got a lot of dlls in the release folder Qt5Quick.dll among them. But myapp.exe doesn't work and didn't threw any error.
In order to get any extra information I add console to my CONFIG parameter under myapp.pro file and running myapp.exe by console I got this info:
QQmlApplicationEngine failed to load component
qrc:/main.qml:1 module "QtQuick" is not installed
qrc:/main.qml:-1 module "QtQuick" is not installed
qrc:/main.qml:1 module "QtQuick" is not installed
My version of QtSDK is 5.10.0 with MinGW so this solution doesn't work at all, I got more errors.
More over if I try to run myapp.exe without those dll in the root folder it works fine.
I been the whole day trying to find any solutions but nothing seems to work.
I'm pretty sure I missing something but I don't know whats is it.
Thanks
As I suppose, I was missing something. --qmldir option is needed in order to add QtQuick modules.
windeployqt.exe --qmldir . --release c:\myappdir\relesase\myapp.exe
That line did the trick,
Thanks #frank osterfeld and #Felix

RealmSwift and Swift 2.1 (module file was created by older version of compiler)

I searched and got answers on using CocoaPods but really i couldn't manage to use it because i didn't what they mean
1- Install CocoaPods 0.39.0 or later. -> i did install it using sudo command
"I stopped here, didn't know what to do"
2- In your Podfile, add use_frameworks! and pod 'RealmSwift' to your main and test targets.
3- From the command line, run pod install.
4- Use the .xcworkspace file generated by CocoaPods to work on your project!
sorry my question looks bad but it is my first time to ask a question here :)
Your list of steps is correct, and assuming CocoaPods installed correctly, you will then need to navigate to the directory of your .xcodeproj file.
In that directory, you can run the command pod init which will create a .podfile in the directory.
You can then continue onto steps 2-4.
However, as of writing this response, Realm's current release doesn't support Swift 2.1. We are actively working on an update for 2.1, which you can follow on this Github Issue.

where to run symfony2 debug commands? [duplicate]

This question already has answers here:
How to command run for symfony2 in windows 7
(2 answers)
Closed 9 years ago.
Currently I am new to symfony2, I was just going through the basics and while reading the "The book" from symfony I came across some commands which can be used to debug the application like following commands
$ php app/console router:match /blog/my-latest-post
$ php app/console router:debug
So my question is:
1) From where to run these commands, from commandline?
2) How do you run them, is there something we need to install or some dependency?
Currently I am using WAMP server on windows 7 machine, just a localhost.
From command line, from your project. Check How to command run for symfony2 in windows 7
We use composer for update dependency. Chechk How to install Symfony2 Bundles with Composer

Is it possible to install PHPUnit without pear? [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
PHP - Is there a portable version of PHPUnit?
On a Red Hat Linux machine, without root privileges, so can not use pear.
Manual download leads to https://github.com/sebastianbergmann/phpunit/, but this seems a windows version since the executable is a phpunit.bat.
Is there a way to install PHPUnit on Linux without PEAR?
I have made an installer for this: https://github.com/kblomqvist/gitinstall-phpunit
Further down on the same page, it says how to install PHPUnit from a git checkout:
PHPUnit from a git checkout

Resources