简体   繁体   English

asp.net核心目标框架4.6.1发布

[英]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开发环境中设置此编译器选项,请打开项目的“ 属性”页面,然后将“ 输出类型”属性修改为“ 类库”。

docs.microsoft.com docs.microsoft.com

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用Asp.Net.Identity和Entity Framework 6在Asp.Net Core 2.0 Target Framework 4.6.1中设置身份? - How can I setup identity in Asp.Net Core 2.0 Target Framework 4.6.1 using Asp.Net.Identity and Entity Framework 6? 在c#asp.net核心中获取图像尺寸(框架4.6.1) - Get Image dimensions in c# asp.net core (framework 4.6.1) 在 ASP.NET Core 2.2 和 ASP 之间共享 Cookie 身份验证。 NET MVC 5 (.NET Framework 4.6.1) 没有 Microsoft.Identity - Share Cookie authentication between ASP.NET Core 2.2 and ASP. NET MVC 5 (.NET Framework 4.6.1) without Microsoft.Identity 将Asp.Net应用程序从4.6.1降级到.Net Framework 4.5.2 - Downgrade Asp.Net application to .Net framework 4.5.2 from 4.6.1 集成测试C#WebAPI asp.NET Framework 4.6.1 - Integration testing C# WebAPI asp.NET Framework 4.6.1 Asp.Net 5 Core DisplayFor() 发布错误 - Asp.Net 5 Core DisplayFor() Publish Bug ASP.NET Core 发布和启动设置 - ASP.NET Core publish and launch settings 将ASP.Net Core 3预览6发布到Azure - Publish an ASP.Net Core 3 preview 6 to Azure asp.net核心发布问题 - asp.net core publish issue asp.net core 2.1面向.Net Framework并在IIS上运行而无需托管捆绑 - asp.net core 2.1 target .Net Framework and run on IIS without hosting bundle
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM