[英]asp.net core target framework 4.6.1 publish
I have asp.net core application that targets framework 4.6.1, When I try to publish, it generates .exe file instead of .dll and I can not publish it on iis. 我有面向框架4.6.1的asp.net核心应用程序,当我尝试发布时,它会生成.exe文件而不是.dll,并且无法在iis上发布。 it working correctly when I run generated .exe and open http://localhost:5000 from browser it works good, but I want to host it on iis.
当我运行生成的.exe并从浏览器中打开http:// localhost:5000时 ,它可以正常工作,但是它想在iis上托管。
Look at target library compiler option. 查看目标库编译器选项。
The /target:library option causes the compiler to create a dynamic-link library (DLL) rather than an executable file (EXE). / target:library选项使编译器创建动态链接库(DLL)而不是可执行文件(EXE)。
When specified at the command line, all files up to the next /out or /target:module option are used to create the .dll file. 在命令行中指定时,直到下一个/ out或/ target:module选项的所有文件都用于创建.dll文件。
Example: 例:
csc /target:library in.cs
Compile in.cs, creating in.dll 编译in.cs,创建in.dll
To set this compiler option in the Visual Studio development environment open the project's Properties page and modify the Output type property to Class Library 要在Visual Studio开发环境中设置此编译器选项,请打开项目的“ 属性”页面,然后将“ 输出类型”属性修改为“ 类库”。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.