Cannot launch python via cmd - python-3.x

Currently I'm working on a project to deliver apps via MSIX packaging including python as one of them. I've already created an msix package for the same with below settings :
So the MSIX package displays the environment variables added to the system path
VHD has been mounted (staged) and registered on test machine, however I still cannot open python via cmd
I'm a bit new to the MSIX packaging tech, so any help would be appreciated.
Users to be able to run python from cmd.

Files that are packaged and deployed with an MSIX run inside a container. This means that these files will not be "visible" by default to tools like cmd or Powershell.
You need to define an appExecutionAlias in your package manifest. The following SO question has more details:
How to run an MSIX installed application from the command line
If you're using the MSIX Packaging Tool or Visual Studio to build the package, you need to manually edit the AppXManifest.xml file and add the appExecutionAlias element.
If you're using other commercial tools, you probably have a GUI option to include and configure it.

Related

How to install exe file in Azure DevOps?

I have desktop application and i need install exe file in Azure Pipeline. How i can install exe file in my azure pipeline?
In general, you have a couple options: either install the software each time you run your pipeline (in a step), or build a custom agent with the software pre-installed. If your application is small and can be installed silently using the command line, installing it on the hosted agent each time is probably fine.
If your application is large, requires a GUI, or can't be silently installed, building a custom agent is likely the best option. See: https://learn.microsoft.com/en-us/azure/devops/pipelines/agents/v2-windows?view=azure-devops

dotnet restore on linux does not include XML file from nuget package

I have a Visual Studio solution and am trying to build to run on a Linux installation of Docker. As part of the process I need to copy the XML documentation from one of the nuget packages for my Swagger documentation. On my windows development box, I am able to do this, but on Linux it is not working. The problem seems to be when I look at the lib folder for the nuget package on linux I see only a .dll while on Windows I see both .dll and .xml. Below is my restore command
RUN dotnet restore "src/Management/Management.csproj"
Why is the XML file not being extracted on linux?
On another note it seems like linux creates the directories using all lower case. So if I am extracting nuget package Test.MyPackage-3.4.3 it will be located on linux at /root/.nuget/.../test.mypackage/3.4.3. In my csproj file I am referencing the package using %(PackageReference.Identity) which returns the camel-case capitalization. Is there a work-around for this as well?
Not sure if it's still a relevant question.
There is an Env variable NUGET_XMLDOC_MODE which is set to skip in Docker image provided by Microsoft.
If you change it to ENV NUGET_XMLDOC_MODE=none in your Dockerfile it will fix the issue. However image build time will definitely increase so you can consider having dotnet restore as a separate step to enable caching.
More info can be found here
https://learn.microsoft.com/en-us/nuget/reference/cli-reference/cli-ref-environment-variables

How to install dependent binaries on Azure App Service with Linux?

I have a spring boot application that I am running on Azure App Service (Linux). My application has a dependency on a binary and needs it to be present on the system. How do I install it on my App service?
I tried the following two options:
Did ssh via Kudu and installed the package ($ apk add package). But the changes are not persisted beyond /home. The dependencies were installed in other folders and when the app service was re-deployed all those dependencies were gone
Used the post deployment hook to run the command "$ apk add package" to install once the deployment finishes. This script is run as can be seen from the custom log statements but still i do not see the installed package. Even when is use apt-get it says "unable to lock administration directory"
Using a statically compiled binary is not an option for me since that has its own issues.
Thanks
For the Tomcat, Java SE and WildFly apps on App Service Linux, you can create a file at /home/startup.sh and use it to initialize the container in any way you want (Example: you can install the required packages using this script).
App Service Linux checks for the presence of /home/startup.sh at the time of startup. If it exists, it is executed. This provides web app developers with an extension point which can be used to perform necessary customization during startup, like installing necessary packages during container startup.
I think this is a common problem with Linux on Azure.
I recommend having a step back and consider one of the following options.
Run your application in a container that has all the dependencies
you are looking for.
Run your application on Linux VM IaaS instead
of Azure App Service (Linux),PaaS.
Run your application on Windows OS PaaS and add extension for your dependency.(Most likely you won't run into this problem when using Windows OS)
While I understand that none of them might be acceptable by you, but I have not found a solution for that problem in those specific circumstances.

Changing Asp.net core Docker target from Windows to Linux

I have created a new ASP.net application by Visual Studio 2019. When I was creating the project, I ticked the Docker Support checkbox and selected Windows for my docker. After a while, I decided to change my docker from Windows to Linux as I have some other software on Linux container and every time I need to switch. I did some research and I found out if I change the server URL inside the DockerFile, I can change it to Linux. By doing it I encounter this error: Your Docker server host is configured for 'Linux', however the project targets 'Windows'
Then I opened the Cs proj file and change the windows to Linux and now I see: Unable to copy file obj\debug\netcoreapp2.1\xxxx.dll to bin\debug\netcoreapp2.1\xxxx.dll. Access to the path bin\debug\netcoreapp2.1\xxxx.dll is denied.
I reverted the change but I still see the same error.
Edit your .csproj file in a text editor like notepad++
You should see DockerDefaultTargetOS tag, and it should read Windows
Change that to Linux
update your dockerfile, replace the base instruction by this line
"FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim AS base"
do the same with build instruction: FROM mcr.microsoft.com/dotnet/core/sdk:3.1-buster AS build
update your csproj tag DockerDefaultTargetOS to point to linux

Is separate set of selenium jar files needed for linux os?

I am using Selenium Webdriver(v 2.47.1) automation tool in windows operating system. I have created one automation script using Eclipse IDE and integrated script with Jenkins CI. In Jenkins I created new job with help of windows batch file. Jenkins job successfully completed.
I have uploaded same set of code(contains src, lib, bin directories..) to Linux server where Jenkins CI is installed and tried to create new work using Jenkins. In Linux OS I have used shell command to build the project. Project not builded successfully..
I don't know where the actual problem is..? Please help me on this
There is few things which can effects scripts in Linux environment
1st is batch file you are using
refer it to resolve it if exist in your case
http://stackoverflow.com/questions/32120102/bash-file-is-running-fine-in-windows-for-testng-but-it-is-not-working-in-linux-m
Another one is if your using chrome then you need to set chrome binary according to linux
http://chromedriver.storage.googleapis.com/index.html?path=2.16/
Hope it will help you :)
If still you are facing problem then please share the error your get on terminal/Jenkins jobs section

Resources