I make a Desktop application Form using C# and .NET. Then I simply deploy it and make a .EXE file of it. But when I runt his .EXE file on my other Laptop, it is going to ask me "You must install .NET Desktop Runtime to run this application".
"You must install .NET Desktop Runtime to run this application"
11.3k Views Asked by Ibrar At
2
There are 2 best solutions below
2
mike
On
Well, if you wanted to use the app on another device without installing the .NET Desktop Runtime, you could've just created a self-contained app by opening the project folder that has the .csproj file in cmd or powershell and you could've ran:
- this command to publish it in the "Debug" folder
dotnet publish -r win-x64 --self-contained true -c Debug
- or this one for the "Release" folder
dotnet publish -r win-x64 --self-contained true -c Release
The -r flag is used to set the runtime id, for which you can see the catalog here. The -c flag is used to set the configuration: Release or Debug.
To learn more about the dotnet publish command, you can read this article on Microsoft Docs
Or you could've installed the.NET Desktop Runtime on your other laptop like Augusto said in his answer
Related Questions in C#
- Passing arguments to main in C using Eclipse
- kernel module does not print packet info
- error C2016 (C requires that a struct or union has at least one member) and structs typedefs
- Drawing with ncurses, sockets and fork
- How to catch delay-import dll errors (missing dll or symbol) in MinGW(-w64)?
- Configured TTL for A record(s) backing CNAME records
- Allocating memory for pointers inside structures in functions
- Finding articulation point of undirected graph by DFS
- C first fgets() is being skipped while the second runs
- C std library don't appear to be linked in object file
- gcc static library compilation
- How to do a case-insensitive string comparison?
- C programming: Create and write 2D array of files as function
- How to read a file then store to array and then print?
- Function timeouts in C and thread
Related Questions in .NET
- file download method in visual studio 2017
- Repository manager receives the wrong connection string in .net core
- MongoDb not connecting C#
- The current .NET SDK does not support targeting .NET Core 6.0. Brand new WPF Project VS Community 2022 17.9.5
- Why Scanning GSI on DynamoDb doesnt work as fast as expected when using CONTAINS?
- Are "blittable types" really unmanaged types for StructLayout Sequential
- Failed to fetch dynamically imported module on Blazor JS Interop
- Problem to upload several images per one request
- Implementing Azure AD B2C Authentication in .NET 8 Blazor Project (RenderMode: InteractiveAuto)
- Stripe connect payout - throws exceptions
- 'IOException: The cloud file provider is not running', when trying to delete 'cloud' folder
- Azure Application Insights Not Displaying Custom Logs for Azure Functions with .NET 8
- Convert C# DateTime.Ticks to Bigquery DateTime Format
- Socket.io nodejs server .NET connection
- Producer Batching Service Bus Vs Kafka
Related Questions in RUNTIME
- Razor.RuntimeCompilation creates an error
- Runtime Error 5 in VBA: Invalid Procedure Call or Argument
- I get this message when I open (most) games on my PC
- How to download and add .class/.jar file dynamically in java runtime class path Spring Boot 3.x
- Subsetting a list of files within a folder to apply python function
- Unable to download CSV file from web URL with runtime using python
- Set button Height from a constant value defined in a class in WPF
- Set picklist Value as default value in a field on sales a engagement Runtime Object
- How to adjust differences of hardwares while executing code
- Published .NET 8 Application Includes Windows SDK for .NET 6
- Method definition and objects in Java
- How to save the JavaScript runtime state
- St_union function taking a long time to run (R)
- Pass python script directly to python -m timeit
- Showing only previous output
Related Questions in DESKTOP-APPLICATION
- How To Convert Nextjs Typescript Golang Postgresql Web App Into Desktop App
- UI Interface Crashes and Hanging Issues in MFC Application
- WindowsAppSDK resource file modification requires rebuild
- Unable to Publish my ElectronJS app to Microsoft Store
- How to avoid chrome from doing auto Handlers
- Change dark mode using main.js electron
- Is there a way to configure so that pgadmin 4 via browser can continue to work after pgadmin 4 via desktop version is closed?
- Not able to open prompt using .WithPrompt(Prompt.SelectAccount)
- App with sidebar routes in React and Electron
- Finding challenging to call function from Rust to NextJS ( Tauri + NextJS )
- How to configure to open application if click Notifications of my Electron js Applications In Windows Action Center (Notification Panel)
- Auto Logout from Epic Games Launcher
- FlaskUI Desktop App Error: "127.0.0.1 refused to connect" when run as administrator
- How to execute a .py file with a class using .robot file or integrating it to robot framework?
- How to create trustworthy desktop applications that do not conflict with antivirus software
Related Questions in RUNTIME.EXEC
- How to perform Runtime.getRuntime().exec from docker container
- Trying to programmatically set DPI for second screen on my Android device
- I made image detection system using opencv in python but its now switching on the camera, can anyone please tell what can be the issue?
- How to create a .exe file using c/c++ for ssh login into remote server?
- "You must install .NET Desktop Runtime to run this application"
- Simple Java program consumes huge amount of memory
- Why process.waitFor() is not returning?
- flutter installation not working for windows developement while flutter doctor returns positive results ..windows not connected after some time
- Runtime.exec() the executable library not work in non root
- Is there a way to keep a test.Bat file open and run the rest of the code?
- How to Terminate .exe file in uwp app using fulltrustlauncher?
- Android Runtime.exec ("screencap") not doing anything (not working) and not giving any error
- Java Android Runtime.getRuntime().exec()
- Runtime.getRuntime().exec not working with gcloud
- Android 10 - netstat execution not working properly
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Well, you'need to install .Net Desktop Runtime ♂️
You can download it from here, just look for the "Desktop runtime" section. This link is for version 6.0, so maybe I'll need to look for a different version.