I want to update AppxPackage with appxmanifest.xml with C# DISM API.
This is how I do it in powershell :
Dism /Online /Add-AppxPackage -DisableDevelopmentMode -Register "C\Program Files\WindowsApp\Microsoft.WindowsCalculator_10.1805.1201.0_x64__8wekyb3d8bbwe\AppxManifest.xml
Is it possible to do the same in C#? I don't want to just run the powershell command in C#.
I want to run a mpicc code written in C#. But to run the same I'll have to install sudo apt install mpich and to do that I need sudo command in windows cmd window. I tried using git bash and installed gsudo but didn't work. Is there any other way to run my file?
Commands to use to run my file:
mpicc p_mpi.c -o p_mpi
mpirun -np 4 ./p_mpi
Commands I used before using the above and failed:
sudo apt install mpich
winget install gsudo
gsudo apt install mpich
sudo is a linux command for running a program as administrator. It can not be used in windows.
If you are using windows but need to use linux only programs i sugest trying out wsl.
apt is also a program that does not work in windows. It is a program used for installing and updating programs in debian based linux distributions.
I do not find ASP.NET v4.0 and ASP.NET v4.0 classic in IIS.
I have tried below:
1) Installing ASP.Net
2) Run aspnet_regiis.exe -ir in command prompt as administrator
3) Run dism /online /enable-feature /featurename:IIS-ASPNET45 /all in command prompt as administrator
Please let me know what I am doing wrong.
Thanks in advance!
I need to install .Net 3.5 so I can use SQL Server Express/Local Db in Visual Studio.
I have trawled the internet looking for answers and nothing works.
It got stuck on this all night, this is enabling .Net 3.5 from the Control Panel.
I even redownloaded Windows 10 and run this DISM command
DISM /Online /Enable-Feature /FeatureName:NetFx3 /All /LimitAccess /Source:c:\sources\sxs
but it still hangs and won't do anything.
If anyone could help me out that would be super helpful
.NET 3.5 cant be install by internet. you have to use your installation DVD or ISO downloaded from Microsoft website.
use this command to install
DISM /Online /Enable-Feature /FeatureName:NetFx3 /Source:d:\sources\sxs /All /LimitAccess
d: should be the
ISO mapped drive if you use ISO file
DVD drive if you use installation DVD
Few important points.
If you use ISO file, There can be errors if you try to use a ISO from a network location.
If you download ISO from Microsoft web site careful about 32 bit and 64 bit.
Run command prompt as Administrator to run this command
If your command prompt hang without any response, probably it means Some windows updates installation is in progress. So restart the computer and try again.
Go to "Turn Windows feature on or off" window.If you installed properly, you can see .NET framework 3.5 is installed.
Here is the step by step guide I have written. http://codeketchup.blogspot.sg/2015/11/how-to-install-net-framework-35-on.html
If you have access to MSDN subscription, download the Windows 10 Features on Demand ISO, mount it and run this command:
DISM.EXE /Online /Add-Capability /CapabilityName:NetFx3~~~~ /Source:D:\
(where D: is the mounted ISO)
If this fails, run this command to add the files back to your Windows
DISM.EXE /Online /Add-Package /PackagePath:D:\Microsoft-Windows-NetFx3-OnDemand-Package.cab
and now go to the UI to enable the feature.
If you don't have your Windows installation media at hand or want it easier:
These are the methods without the commandline DISM command, which work interactively- for the first two you need current internet access:
Normally it is enough to start an application requiring .NET 3.5 and Windows will bring up a dialog for installation over internet.
Type "windows feature" in the magnifier (search) line besides the start button and switch to
Turn Windows features on or off
Control panel
Then you find the known dialog from previous versions to turn .NET 3.5 features on, etc. (At least I was unable to find it from new settings dialog without search.)
If you updated Windows 10, and you had .NET 3.5 activated before on Win 7 or 8.x, then you have to do nothing, it is also activated in Windows 10.
Here is the real offline "emergency" installer:
http://www.smart-arab.com/2013/12/install-net-on-windows-8-1-and-windows-10-offline/
Of course this is not the official way.
You need to go to add remove programs and then add features to windows, then select it from here. This will install .net 3.5 and 2.0
edit 1
Please open a command prompt (cmd.exe) as admin and run the following command to install .Net 3.5:
DISM /Online /Enable-Feature /FeatureName:NetFx3 /Source:d:\sources\sxs /All /LimitAccess
(replace D: with your mounted Win10 ISO)
In some environment, DISM fails to fetch the file (Proxy, network policies). The DISM command takes the files from the DVD and you're fine
1. Open CMD as an administrate
Command: Dism /online /enable-feature /featurename:NetFX3 /All /Source:D:\sources\sxs /LimitAccess
here D=partition name Mout
Open ISO file of windows 10 and type D where Partition.
Finally Open Windows Features and then you will see Net Framework 3.5 has been install and enable.
The only way to install windows-service I know is using "Visual Studio 2010 Command Prompt", Is there a way to install windows-service on a machine which isn't having Visual Studio installed (assume that .Net version 4.X is installed)?
Call to SDK Command prompt, follow
Start>All Programs>Microsoft .NET Framework SDK v2.0>SDK Command prompt
Type in the SDK command prompt
installutil C:\MyWebServiceApp\bin\Debug\MyService.exe
this is your application's .exe path.
Now your Windows service has successfully installed with Windows Environment.
To start that, go to
Start>Run type services.msc and run it.
In this services window, find your Windows Service and Write Click on it and select Properties. Set Startup type as Automatic or Manual.
Now restart you machine and find your Windows Service by Task Manager. It will display in task manager under running services.
Reference here
Try installutil <Path of the Service>
C:\Windows\Microsoft.NET\Framework64\v4.0.30319
you can use batch file and call it from your installer or application
For Installation
#ECHO OFF
REM The following directory is for .NET 4.0
set DOTNETFX4=%SystemRoot%\Microsoft.NET\Framework\v4.0.30319
set PATH=%PATH%;%DOTNETFX4%
echo Installing WindowsService...
echo ---------------------------------------------------
InstallUtil /i YouServiceName.exe
echo ---------------------------------------------------
echo Done.
For Uninstall
#ECHO OFF
REM The following directory is for .NET 4.0
set DOTNETFX4=%SystemRoot%\Microsoft.NET\Framework\v4.0.30319
set PATH=%PATH%;%DOTNETFX4%
echo Installing WindowsService...
echo ---------------------------------------------------
InstallUtil /u YouServiceName.exe
echo ---------------------------------------------------
echo Done.