'livingdoc' is not recognized as an internal or external command, operable program or batch file - specflow

I have already run dotnet tool install --global SpecFlow.Plus.LivingDoc.CLI to install specflow livingdoc.
then I run the command below:
But when I run livingdoc test-assembly SpecFlowDemo.dll -t TestExecution.json, I got this error 'livingdoc' is not recognized as an internal or external command, operable program or batch file.
and when I again dotnet tool install --global SpecFlow.Plus.LivingDoc.CLI, it shows below:

Solved already after I run cmd as administrator.

After running
dotnet tool install --global SpecFlow.Plus.LivingDoc.CLI
Close and reopen the command prompt before running
livingdoc test-assembly SpecFlowDemo.dll -t TestExecution.json

Related

Unable to build docker container on synology, as synology uses 7z not unzip

I had set a little docker project for myself and thought it may be fun to try and get azerothcore running on my synology.
I have cloned the repository, but was unable to run the acore.sh script to build the docker containers as synology uses 7zip, and acore.sh threw an error because it couldn't unzip the archives.
I wondered if it was possible for me to find out what scripts were attempting to unzip things, and change the commands to call 7z?
running acore.sh throws an error because it can't find unzip. however synology use 7zip.
user#DS920:/volume1/docker/wow/azerothcore-wotlk$ ./acore.sh docker build NOTICE: file </volume1/docker/wow/azerothcore-wotlk/conf/config.sh> not found, we use default configuration only. Deno version check: /volume1/docker/wow/azerothcore-wotlk/apps/bash_shared/deno.sh: line 18: ./deps/deno/bin/deno: No such file or directory Installing Deno... Error: unzip is required to install Deno (see: https://github.com/denoland/deno_install#unzip-is-required).
The error message points to /volume1/docker/wow/azerothcore-wotlk/apps/bash_shared/deno.sh and says
Error: unzip is required to install Deno
If you look into deno.sh script you'll see the command which installs deno:
curl -fsSL https://deno.land/x/install/install.sh | DENO_INSTALL="$AC_PATH_DEPS/deno" sh
If you download this script you'll see unzip there.
I would suggest trying to install unzip, e.g. like described here: How to install IPKG on Synology NAS
You can bypass the ./acore.sh dashboard with standard docker commands.
to build:
$ docker compose --profile app build
to run:
$ docker compose --profile app up # -d for background
Using standard docker commands has the added side benefit of not needing to install deno locally since it's already being installed to the container.
Have your tried:
sudo opkg install unzip

I am a newbie to docker. How can we find which .net framework is installed in a docker image?

I have copied .NET framework from my local directory and build an image by using the below Dockerfile
FROM mcr.microsoft.com/dotnet/framework/sdk:4.8-windowsservercore-ltsc2019
ADD setup C:\setup
RUN cmd.exe /c start /wait C:\setup\NDP471DevPack.exe /q
RUN powershell -Command rm C:\setup -r -Force
WORKDIR C:\\Project
ENTRYPOINT ["C:\\Program Files (x86)\\MSBuild\\14.0\\Bin\\msbuild.exe"]
Now I want verify that the .NET framework is whether installed or not in the image that was build?
You can run dotnet --version to see if there's a .NET runtime installed and which version it is. Something like this
docker run --rm --entrypoint=dotnet <image name> --version
You should be able to use:
reg query "HKLM\SOFTWARE\Microsoft\Net Framework Setup\NDP" /s
In Visual Studio I can select my container and click "Open Terminal Window" and paste the above command.

'docker' is not recognized as an internal or external command, operable program or batch file

I am trying to build docker images with Jenkins java application, but I getting the following error while after starting the job in Jenkins..
Commands used in Build Step inside Jenkins:
cd JenkinsWithSonar_SB
mvn clean install
docker build -f Dockerfile -t springboot-sonar-docker .
The error message is:
'docker' is not recognized as an internal or external command,
operable program or batch file.

Docker for Windows exits with code 127 when building image

When I try to build this Docker-Image, I get the following error:
FROM java:8
WORKDIR /app
ADD . /app
EXPOSE 8080
RUN ./gradlew build
CMD ./gradlew bootRun
When I just build the app with "gradlew build" it runs and when I try to run this Docker Image with a Mac, it works too, just not for windows
EDIT:
This is not a great answer, but what I found is that when Windows mounts files into Docker from Windows, it leaves Windows-like line endings on the mounted files. A janky way to solve it in your Dockerfile would be to install dos2unix in the container and add a
RUN dos2unix gradlew
prior to executing your build process. Unfortunately, this is a TERRIBLE solution. Hopefully Docker for Windows on WSL2 that is supposed to release soon will solve this better but for now you are stuck with this janky solution.
gradlew must be marked as executable.
chmod +x gradlew
Mac and Linux share permissions scheme but Windows needs to use a virtual FS so it copies files with default permissions - 644 and you need 755.

How to remove a virtualenv created by "pipenv run"

I am learning Python virtual environment. In one of my small projects I ran
pipenv run python myproject.py
and it created a virtualenv for me in C:\Users\USERNAME\.virtualenvs
I found it also created or modified some files under my project source code directory. I am just wondering how to cleanly delete this virtualenv and reverse my project back to a no-virtualenv state.
I am using python 3.6.4, and PyCharm.
You can run the pipenv command with the --rm option as in:
pipenv --rm
This will remove the virtualenv created for you under ~/.virtualenvs
See https://pipenv.kennethreitz.org/en/latest/cli/#cmdoption-pipenv-rm
I know that question is a bit old but
In root of project where Pipfile is located you could run
pipenv --venv
which returns
Linux/OS X:
/Users/your_user_name/.local/share/virtualenvs/model-N-S4uBGU
Windows:
C:\Users\your_user_name\.virtualenvs\model-N-S4uBGU
and then remove this env by typing
Bash/Zsh:
rm -rf /Users/your_user_name/.local/share/virtualenvs/model-N-S4uBGU
Powershell:
Remove-Item -Recurse -Force 'C:\Users\your_user_name\.virtualenvs\model-N-S4uBGU'
Command Prompt
rmdir /s "C:\Users\your_user_name\.virtualenvs\model-N-S4uBGU"

Resources