Как сохранить программу в visual studio в exe
Перейти к содержимому

Как сохранить программу в visual studio в exe

  • автор:

Как сохранить программу в visual studio в exe

How can we create the exe for a console forms application ?

5 Answers 5

an EXE file is created as long as you build the project. you can usually find this on the debug folder of you project.

user avatar

For .net core 2.1 console application, the following approaches worked for me:

1 — from CLI (after building the application and navigating to debug or release folders based on the build type specified):

2 — from Visual Studio

For an in depth explanation of all the deployment options available for .net core applications, checkout the following articles:

Normally, the exe can be found in the debug folder, as suggested previously, but not in the release folder, that is disabled by default in my configuration. If you want to activate the release folder, you can do this: BUILD->Batch Build And activate the «build» checkbox in the release configuration. When you click the build button, the exe with some dependencies will be generated. Now you can copy and use it.

For .NET Core 2.2 you can publish the application and set the target to be a self-contained executable.

In Visual Studio right click your console application project. Select publish to folder and set the profile settings like so:

exe — Как мне создать исполняемый файл в Visual Studio 2013 с C ++?

c: \ users \ me \ documents \ visual studio \ hello world

c: \ users \ me \ documents \ visual studio \ hello world \ Debug \ hello world.exe

  1. Нажмите BUILD> Диспетчер конфигурации …
  2. Под контекстами проекта> Конфигурация, выберите «Release»
  3. СТРОИТЬ> Построить решение или перестроить решение

Как сохранить программу в visual studio в exe

This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.

Visual studio home link

Answered by:
Question

I have written a small program in Visual Studio using C#. Its file extension is .CS and the program is not running without Visual Studio.

I want to run this app on another machine. So how can I export my program as an .EXE file?

Thanks in advance. 🙂

Answers

Hi!

I have written a small program in Visual Studio using C#. Its file extension is .CS and the program is not running without Visual Studio.

I want to run this app on another machine. So how can I export my program as an .EXE file?

Thanks in advance. 🙂

You need to BUILD your project. This will produce an EXECUTABLE ( The .EXE file you mentioned), assuming you created the project with the correct type.

Right click on your solution in Solution Explorer in VIsual Studio and select Build. Go to the bin folder under your project folder and look for the EXE.

See where that takes you and let me know. I will be happy to help you through these first steps.

If I may say, this is really basic knowledge you are asking about. I suggest you do a quick search on google about .NET programming to familiarize yourself with these concepts. Let me know if you have trouble finding literature and I’ll dig something for you.

If you like this or another reply, vote it up!
If you think this or another reply answers the original question, mark it or propose it as an answer.

How to create exe of a console application

How can we create the exe for a console forms application ?

5 Answers 5

an EXE file is created as long as you build the project. you can usually find this on the debug folder of you project.

John Woo's user avatar

For .net core 2.1 console application, the following approaches worked for me:

1 — from CLI (after building the application and navigating to debug or release folders based on the build type specified):

2 — from Visual Studio

For an in depth explanation of all the deployment options available for .net core applications, checkout the following articles:

Normally, the exe can be found in the debug folder, as suggested previously, but not in the release folder, that is disabled by default in my configuration. If you want to activate the release folder, you can do this: BUILD->Batch Build And activate the «build» checkbox in the release configuration. When you click the build button, the exe with some dependencies will be generated. Now you can copy and use it.

For .NET Core 2.2 you can publish the application and set the target to be a self-contained executable.

In Visual Studio right click your console application project. Select publish to folder and set the profile settings like so:

exe — Как мне создать исполняемый файл в Visual Studio 2013 с C ++?

Я не могу найти exe-файл для моей программы Hello World, которая сработала, и программа не открылась, как только она сказала, что работает. Я попытался перейти к своим документам и проверить папку моего проекта. Это было совершенно пусто. Спасибо за любую помощь.

Решение

Все исполняемые файлы из Visual Studio должны находиться в папке отладки вашего проекта, например:

Каталог Visual Studio: c: \ users \ me \ documents \ visual studio

Тогда проект, который называется «Привет, мир», будет в каталоге:

c: \ users \ me \ documents \ visual studio \ hello world

И ваш exe будет находиться в:

c: \ users \ me \ documents \ visual studio \ hello world \ Debug \ hello world.exe

Обратите внимание, что исполняемый файл назван так же, как проект.

В противном случае вы можете опубликовать его в указанной папке по вашему выбору, которая поставляется вместе с установкой, что было бы хорошо, если вы хотите быстро распространить ее

РЕДАКТИРОВАТЬ:

Каждый раз, когда вы строите свой проект в VS, исполняемый файл обновляется новым в соответствии с кодом (при условии, что он собирается без ошибок). Когда вы публикуете его, вы можете выбрать местоположение, а также другие факторы, и установочный файл будет в этом месте, а также некоторые файлы манифеста и другие файлы о проекте.

Другие решения

  1. Нажмите BUILD> Диспетчер конфигурации …
  2. Под контекстами проекта> Конфигурация, выберите «Release»
  3. СТРОИТЬ> Построить решение или перестроить решение

Просто нажмите «Построить» в верхнем меню, а затем нажмите «Опубликовать» …. Затем откроется всплывающее окно, и вы сможете определить папку, в которую хотите сохранить файл .exe, и нажав «Далее», Позволить вам настроить дополнительные параметры …
СДЕЛАННЫЙ!

Сделайте Ctrl + F5, чтобы скомпилировать и запустить ваш проект без отладки. Посмотрите на панель вывода (по умолчанию «Показать вывод из сборки»). Если он успешно скомпилирован, путь к файлу .exe должен быть указан после <имя_проекта>.vcxproj ->

Как сохранить программу в visual studio в exe

This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.

Visual studio home link

  • ProfileText
  • Sign in

Answered by:

Question

I have written a small program in Visual Studio using C#. Its file extension is .CS and the program is not running without Visual Studio.

I want to run this app on another machine. So how can I export my program as an .EXE file?

Thanks in advance. 🙂

Answers

Hi!

I have written a small program in Visual Studio using C#. Its file extension is .CS and the program is not running without Visual Studio.

I want to run this app on another machine. So how can I export my program as an .EXE file?

Thanks in advance. 🙂

You need to BUILD your project. This will produce an EXECUTABLE ( The .EXE file you mentioned), assuming you created the project with the correct type.

Right click on your solution in Solution Explorer in VIsual Studio and select Build. Go to the bin folder under your project folder and look for the EXE.

See where that takes you and let me know. I will be happy to help you through these first steps.

If I may say, this is really basic knowledge you are asking about. I suggest you do a quick search on google about .NET programming to familiarize yourself with these concepts. Let me know if you have trouble finding literature and I’ll dig something for you.

If you like this or another reply, vote it up!
If you think this or another reply answers the original question, mark it or propose it as an answer.

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *