Jump to content

Visual Studio outputting a DLL instead of EXE?

mattonfire

As the title says, m,my Visual Studio is executing my program as a DLL instead of EXE in the release and debug folder.

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, Ross Scarlet said:

Have you changed the output type to Windows Application?

Shouldn't it be default, how do I do that?

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, mattonfire said:

Shouldn't it be default, how do I do that?

Should be, perhaps when you were creating the project you may have chosen the wrong template? Who knows.

Rightclick on the project in Solution Explorer and then Properties, then on the Application tab you can change the output type. Heres an example since right now im reinstalling my system.

RgAQiLCR.png

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, Ross Scarlet said:

Should be, perhaps when you were creating the project you may have chosen the wrong template? Who knows.

Rightclick on the project in Solution Explorer and then Properties, then on the Application tab you can change the output type. Heres an example since right now im reinstalling my system.

RgAQiLCR.png

Neither console application nor windows application give off an executable.

Link to comment
Share on other sites

Link to post
Share on other sites

have you tried double checking the compiler settings?

 

Try seeing what this option is set to for you:

 

image.png.97fa4a369ef13e5ccd9882cd65e53d98.png

Gaming build:

CPU: i7-7700k (5.0ghz, 1.312v)

GPU(s): Asus Strix 1080ti OC (~2063mhz)

Memory: 32GB (4x8) DDR4 G.Skill TridentZ RGB 3000mhz

Motherboard: Asus Prime z270-AR

PSU: Seasonic Prime Titanium 850W

Cooler: Custom water loop (420mm rad + 360mm rad)

Case: Be quiet! Dark base pro 900 (silver)
Primary storage: Samsung 960 evo m.2 SSD (500gb)

Secondary storage: Samsung 850 evo SSD (250gb)

 

Server build:

OS: Ubuntu server 16.04 LTS (though will probably upgrade to 17.04 for better ryzen support)

CPU: Ryzen R7 1700x

Memory: Ballistix Sport LT 16GB

Motherboard: Asrock B350 m4 pro

PSU: Corsair CX550M

Cooler: Cooler master hyper 212 evo

Storage: 2TB WD Red x1, 128gb OCZ SSD for OS

Case: HAF 932 adv

 

Link to comment
Share on other sites

Link to post
Share on other sites

3 hours ago, mattonfire said:

As the title says, m,my Visual Studio is executing my program as a DLL instead of EXE in the release and debug folder.

Assuming you're using an MSoft language, I guess you are getting this:

5ad15cce3241f_visualstudiodllexecutionerror.PNG.60d8be3f9bcf99de9a636ea95038b95c.PNG

 

That's because when you selected the template to create the project, you chose a type of Class library instead of one of the executable types. The easiest way to fix this issue is to create a new project of an executable type in the same solution. Since you haven't asked why you can't add things like gui definitions and such, I'm going to assume you will create a new console application project. Then copy-paste whatever executable files you have into the new project, and then work in the new project that is of type executable. 

This is a better solution than modifying the .csporj XML file because there are settings that affect the workflow other than just the compiler output type.

ENCRYPTION IS NOT A CRIME

Link to comment
Share on other sites

Link to post
Share on other sites

11 hours ago, reniat said:

 

 

image.png.97fa4a369ef13e5ccd9882cd65e53d98.png

How would I get to this page, when I go through solution properties I get this page.

image.png.10ee440dc4a4e8c34061e278bb401040.png

Link to comment
Share on other sites

Link to post
Share on other sites

8 hours ago, straight_stewie said:

Assuming you're using an MSoft language, I guess you are getting this:

5ad15cce3241f_visualstudiodllexecutionerror.PNG.60d8be3f9bcf99de9a636ea95038b95c.PNG

 

That's because when you selected the template to create the project, you chose a type of Class library instead of one of the executable types. The easiest way to fix this issue is to create a new project of an executable type in the same solution. Since you haven't asked why you can't add things like gui definitions and such, I'm going to assume you will create a new console application project. Then copy-paste whatever executable files you have into the new project, and then work in the new project that is of type executable. 

This is a better solution than modifying the .csporj XML file because there are settings that affect the workflow other than just the compiler output type.

I get no error when compiling the program, it runs perfectly. But i cannot get the debug exe or release, it just outputs a DLL instead.

Link to comment
Share on other sites

Link to post
Share on other sites

4 hours ago, mattonfire said:

How would I get to this page, when I go through solution properties I get this page.

i'm not entirely sure to be honest. Maybe its because the project is of a different type? I've never seen that version of the properties dialog in visual studio, so sorry i can't be much help :S

Gaming build:

CPU: i7-7700k (5.0ghz, 1.312v)

GPU(s): Asus Strix 1080ti OC (~2063mhz)

Memory: 32GB (4x8) DDR4 G.Skill TridentZ RGB 3000mhz

Motherboard: Asus Prime z270-AR

PSU: Seasonic Prime Titanium 850W

Cooler: Custom water loop (420mm rad + 360mm rad)

Case: Be quiet! Dark base pro 900 (silver)
Primary storage: Samsung 960 evo m.2 SSD (500gb)

Secondary storage: Samsung 850 evo SSD (250gb)

 

Server build:

OS: Ubuntu server 16.04 LTS (though will probably upgrade to 17.04 for better ryzen support)

CPU: Ryzen R7 1700x

Memory: Ballistix Sport LT 16GB

Motherboard: Asrock B350 m4 pro

PSU: Corsair CX550M

Cooler: Cooler master hyper 212 evo

Storage: 2TB WD Red x1, 128gb OCZ SSD for OS

Case: HAF 932 adv

 

Link to comment
Share on other sites

Link to post
Share on other sites

5 hours ago, mattonfire said:

I get no error when compiling the program, it runs perfectly. But i cannot get the debug exe or release, it just outputs a DLL instead.

The compiler runs perfectly or your program runs perfectly?

ENCRYPTION IS NOT A CRIME

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, straight_stewie said:

The compiler runs perfectly or your program runs perfectly?

Compiler compiles it and my application runs. But there is no exe in the file debug directory afterwards.

Link to comment
Share on other sites

Link to post
Share on other sites

20 minutes ago, mattonfire said:

Compiler compiles it and my application runs. But there is no exe in the file debug directory afterwards

What is the project file path that you are looking for the .exe in?

ENCRYPTION IS NOT A CRIME

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, straight_stewie said:

What is the project file path that you are looking for the .exe in?

...\Application\bin\Debug\netcoreapp2.0

Link to comment
Share on other sites

Link to post
Share on other sites

Hey,

 

I'm guessing that you are running VS2017 and are currently trying to create a .NET CORE APP, which are different from a .NET Framework application which only runs on windows systems.

 

The answer to your question can be found here: https://docs.microsoft.com/en-us/dotnet/core/deploying/

 

In short since .NET Core can run many operating system then you need to build a "self-contained delpoyment" which will bundle parts of the .NET Core libraries with the application.

 

I hope this helps you :)

 

Best regards

Zyano

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×