【发布时间】:2021-10-04 12:18:52
【问题描述】:
我最近刚刚用 linux 发布了我的 asp.net api,一切正常。 然后我决定对我的代码进行一些更改:
- 删除我不再需要的电子邮件服务。我已经确保它没有引用其他人。
我从 github 拉取了对托管服务器的新更改,然后使用以下命令重新部署。
cd myapp.Api
sudo dotnet clean
sudo dotnet build --configuration Release
sudo systemctl stop myappweb.com.service
sudo dotnet publish -c release -o /var/www/myappweb.com/api/
然后重启
sudo systemctl restart nginx
sudo systemctl stop myappweb.com.service
sudo systemctl enable myappweb.com.service
sudo systemctl start myappweb.com.service
sudo systemctl status myappweb.com.service
sudo journalctl -fu myappweb.com.service
然后发生了错误,即使我的本地应用程序仍然可以正常工作。
* Unhandled exception. System.IO.FileNotFound. Could not load file or assembly 'FluentAssertions, Version=5.10.3.0, Culture=neutral, PublicKeyToken=22f2441a05b241b4a'. The system cannot find the file specified.*
我已经检查了版本,它是一样的。 我立即恢复了 github 上的提交并尝试重新部署,但它仍然产生了同样的错误。
我将不胜感激任何有关真正问题的帮助或建议!
【问题讨论】:
-
这是一个很奇怪的文件名。
标签: c# asp.net linux deployment .net-assembly