Visual Studio中的一些项目不会创建exe文件

问题描述 投票:0回答:2

我在visual studio中有3个项目的解决方案,其中一个是wpf,另外两个是控制台。 wpf项目是作为exe文件构建没有问题,但两个控制台项目被构建为dll文件,但我需要所有项目作为exe而不是DLL文件。

c# wpf visual-studio console-application
2个回答
2
投票

您可以在项目首选项页面上配置构建过程的输出。

enter image description here

请记住,从dll转换为.exe会产生一些约束,例如它需要有一个Main方法。


1
投票

在VS 2015/2017中,您需要更改项目输出类型。右键单击project-> Properties-> Application-> Output type-> Console Application。

© www.soinside.com 2019 - 2024. All rights reserved.