dotnet core how to compile EXE

Source: Internet
Author: User
Tags dotnet

Dotnet Core has a transformation, he uses the DLL format instead of EXE as the general execution format, and then the command line dotnet YourApp.dll to run the program. To increase the force, double-click to run, you can use the following scenarios:

Scenario one with BAT file

You can write a bat to execute, such as the Mylib.bat file content:

@dotnet Mylib.dll
@pause

Scenario two releases the specified operating environment

With command line: dotnet publish-f netcoreapp2.1-c release-r win-x64

Where-f Specifies the framework,-r specifies the running environment. After publishing, a directory of more than 60 m is generated. Where the Publish subdirectory carries the entire dotnet core framework, it can be copied to the specified system environment for execution (it is said to install VC + + 2015 runtime).

Spicy big, of course, is not what we want, we need only EXE file format. After testing, published directory removal publish subdirectory, the remaining 1m multi-point EXE related files can be run, provided that the relevant Dotnet core framework is installed.

Additional Information

Tested with a virtual machine. In the WinXP will be prompted is not a valid 32-bit program, Netcore does not support WinXP, Microsoft this dishonest trader.

Official information shows the minimum support Win7, and then install Win7 SP1 x64, or can not directly run, will prompt loading DLL, Baidu, after testing is a lack of a patch: WINDOWS6.1-KB2533623-X64.MSU

Download: Blog Park main station

Microsoft: https://www.microsoft.com/zh-CN/download/details.aspx?id=26764

Well, Microsoft's always going to make you a bit of a problem.

dotnet core how to compile EXE

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.