[英]How do I setup a ASP.net Core MVC web application to IIS when publishing it creates .dll, .pdb, and .json files
[英]Visual Studio deletes all dll, pdb, xml files from Debug directory and requires publishing when I tried to publish application - how to restore them?
I am developing .NET 4.6.1 Console application with NuGet packages in with Visual Studio 2019 Community Edition and VS places all the NuGet-retrieved dll and compiled pdb, xml files in src/Debug directory. 我猜它是默认的。
我的项目成功编译,可以调试和执行。 但后来我试图发布它。 我收到错误消息Error An error occurred while signing: Failed to sign bin\Debug\app.publish\MyApplication.exe. SignTool Error: Invalid option: /fd com.mycompany.myapplication
Error An error occurred while signing: Failed to sign bin\Debug\app.publish\MyApplication.exe. SignTool Error: Invalid option: /fd com.mycompany.myapplication
and I could see that all the dll, pdb and xml files are deleted from my Debug directory and new directory bin\Debug\app.publish has been created but with the exe file只要。
所以 - 在我尝试发布应用程序后,发生了 2 件坏事:
Failed to sign bin\Debug\app.publish\MyApplication.exe. SignTool Error: Invalid option: /fd com.mycompany.myapplication
Failed to sign bin\Debug\app.publish\MyApplication.exe. SignTool Error: Invalid option: /fd com.mycompany.myapplication
,因此我什至无法重建我的 exe 文件。如何将 Rebuild 与发布分离,以及如何在 Rebuild 期间不进行发布? 以及如何从我的 Debug 目录中的 NuGet 包中恢复 dll? 即如何撤消自从我尝试发布应用程序以来开始发生的所有坏事?
我遵循了 https://stackoverflow.com/a/56739494/1375882并使用 sha1RSA 执行了“创建测试证书...”,然后发布和重建都按预期进行,甚至 dll/pdb/xml 文件也会在我的调试目录。 所以,这解决了这个问题,但可能以次优的方式......
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.