c# - 除非删除 bin/obj 文件夹,否则 Xamarin.ios 不会生成

标签 c# xamarin compiler-errors xamarin.ios building

你好,

我对 Xamarin.iOS 部分的构建有疑问。我不知道确切是什么问题。
除非删除 bin/obj 文件夹,否则我的解决方案不会完全构建。

语境:

如果我启动 VS2017 或 2019,我可以构建解决方案。
如果我进行了一些更改、微小的更改,然后我重新构建解决方案,它将无法正常工作。

第一次构建非常慢(新项目需要 5 分钟)。

我在 Vs2017 上遇到错误,而在 2019 年,它是一个无限的建筑物。
它只有在我删除 obj 和 bin 文件夹然后清理和重建时才能工作。
这真的很烦人。

我已经制作了 Microsoft 支持票以了解问题所在。

这只是我的电脑,因为如果其他人尝试在 Mac 上编译它就可以工作。

我已经制作了 Microsoft 支持票以了解问题所在(我正在等待)。

在这里发帖 => https://forums.xamarin.com/discussion/158080/second-time-building-extremely-long-and-fail-on-xamarin-ios#latest

在 MAC => 我尝试了不同版本的 Mono SDK 5.18.1.3,但在 Vs2019 中存在错误。我回到 5.18.1.15。
现在我在 Mono Framework MDK 的 5.18.1.28 上。

我在 Xamarin.iOS 12.4.0.64(用于 VS2017)上移动到 12.8.0.2 和 12.10.0.153 用于 VS 2019。我回到 12.4.0.64 再次使用 VS2017。

我们可以看到警告(在日志文件中)=>

客户端 build1736klein 在等待对主题 xvs/Build/4.12.3.83/copy-item/XamarinHelloWorld.iOS/c913e05002fXamarinHelloWorld.iOS.exe 的回复时已断开连接

底层 MQTT 连接意外断开。原因:RemoteDisconnected,消息:(IDTâche:88)

AggregateException:发生了一个或多个错误。
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(795,3): error : ClientDisconnectedException: The client build1736klein has been disconnected while waiting对主题 xvs/Build/4.12.3.83/copy-item/XamarinHelloWorld.iOS/c913e05002fXamarinHelloWorld.iOS.exe 的回复
“MTouch”任务的执行完成——ÉCHEC。 (IDTâche:88)

只有删除 Obj 和 Bin 文件夹并重新启动 Visual Studio 2017 才能构建。我不知道为什么会出现问题。

Visual Studio 2017 Pro 是最新的。
Mojave 是最新的。
在 Mac 上,我使用 Visual Studio 2019 社区

有人知道我可以改变什么?
谢谢你。

最佳答案

错误 =>

warning : The client build21656klein has been disconnected while waiting a post response to topic xvs/Build/4.12.3.83/copy-item/XamarinHelloWorld.iOS/c913e05002fXamarinHelloWorld.iOS.exe 1> The underlying MQTT connection has been disconnected unexpectedely. Reason: RemoteDisconnected, Message: (IDTâche:90) 1> The underlying MQTT connection has been disconnected unexpectedely. Reason: Error, Message: The client has been disconnected while trying to perform the unsubscribe to topics: xma/last-will (IDTâche:90) 1> The underlying MQTT connection has been disconnected unexpectedely. Reason: Error, Message: The client has been disconnected while trying to perform the unsubscribe to topics: xma/last-will (IDTâche:90) 1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(795,3): warning : The underlying client has been disconnected by the remote host



并且 =>

System.Net.Mqtt.MqttException: The keep alive tolerance of 00:00:45 seconds has been exceeded and no packet has been received from client build21656klein. The connection will be closed. ---> System.TimeoutException: The operation has timed out.



MQTT example

这是一个非常愚蠢的问题。网络电缆有缺陷,但仍在工作。

关于c# - 除非删除 bin/obj 文件夹,否则 Xamarin.ios 不会生成,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56463468/

相关文章:

c - C中的编译器错误,: Expected Expression错误

c++ - 由于头文件中的语法错误导致编译错误

c# - 删除 xaml 文件中未使用的引用程序集

c# - 将复选框列表传递到 View 中并拉出 IEnumerable

xamarin - 如何检查 xamarin 表单的 UI

java - VS中的 Release模式和 Debug模式

当我尝试关闭响应时抛出 C# HTTPWebResponse 异常

c# - 如何打开新页面?

Xamarin - apk 应用程序大小

variables - 运行计时器时出错 : (void-variable message) in Emacs init. el