无法再将我的应用部署到我的测试设备。

huangapple go评论75阅读模式
英文:

No longer able to deploy my app to my test device

问题

抱歉,我只会为您提供翻译,不会回答关于翻译的问题。以下是您要求的翻译内容:

"我一直在使用我的测试设备(iPhone 6s+,我知道...旧设备)整天(2023年6月10日),突然间我无法再部署我的应用程序到它上面了。我使用这个设备来测试功能,并使用模拟器来完成设计。我的测试设备运行iOS v15.7.6,刚刚在今天(2023年6月10日)更新,但在更新后我一直能够部署到它,直到现在。我收到的错误信息如下:

Severity Code Description Project File Line Suppression State
Error An attempt was made to load an assembly with an incorrect format: C:\Users\Presc.nuget\packages\system.buffers\4.5.1\ref\netstandard2.0\System.Buffers.dll. OML_iOS C:\Users\Presc\source\repos\MY_APP\MY_APP\SGEN

我正在使用Visual Studio 2022 v17.6.2。
我尝试了许多我在StackOverflow和其他网站上找到的建议,但似乎没有任何作用。我也尝试了清理和重新构建,但也没有运气。System.Buffers显然是一个NuGet包,甚至没有安装在这个项目上,它可能会自动安装,但我真的不知道是否是这样。我能够在iPhone 14模拟器上运行应用程序并执行功能,但速度非常慢且存在错误,这就是为什么我使用这台旧设备来测试功能。但现在,今天(2023年6月11日),模拟器上的应用程序不断“停止”,没有错误,IDE没有崩溃,如果我重新启动模拟器上的应用程序,它(显然)仍然连接到调试器,因为如果我停止模拟器上的应用程序,它会停止IDE中的应用程序。但现在我无法继续,无法做任何事情。有人知道发生了什么吗?"

英文:

I’ve been using my test device (iPhone 6s+, I know ... old device) all day (6/10/2023) until suddenly I could no longer deploy my app to it. I use this device to test functionality and I finalize designs using the simulator. My test device is running iOS v15.7.6, and was just updated today (6/10/2023), but I had been able to deploy to it after the update until now. The error I get is:

Severity Code Description Project File Line Suppression State
Error An attempt was made to load an assembly with an incorrect format: C:\Users\Presc.nuget\packages\system.buffers.5.1\ref\netstandard2.0\System.Buffers.dll. OML_iOS C:\Users\Presc\source\repos\MY_APP\MY_APP\SGEN

I’m using Visual Studio 2022 v17.6.2.
I've tried many suggestions I found on StackOverflow and other sites, but nothing seems to work. I've also tried cleaning and rebuilding, no luck there either. System.Buffers is (apparently) a NuGet package and it is not even installed on this project, it might be getting installed automatically, but I really have no idea if that’s the case. I was able to run the app on the iPhone 14 simulator and execute the functionality, but it was awful slow and buggy that’s why I use this old device to test functionality. But now, today (6/11/2023), the app on the simulator keeps "stopping", no errors, IDE doesn't crash and if I restart the app on the simulator, it is (apparently) still connected to the debugger because if I stop the app on the simulator it stops the app in the IDE. But now I'm dead in the water, can't do anything. Anyone know what’s going on?

答案1

得分: 0

好的,以下是您要翻译的内容:

"我本以为我尝试了在StackOverFlow和其他网站上找到的所有建议,但显然没有。我在我的应用程序中浏览了项目->MY_APP属性,注意到生成序列化程序集选项在构建中被设置为开启,我曾在前述的某个网站上看到建议将此选项设置为关闭。所以我这样做了,现在我可以再次部署应用程序到我的测试设备上了。我不确定我是如何错过这一点的,但的确如此。我不知道我在我的应用程序中更改了什么以触发这个问题,因为我之前能够将应用程序部署到设备上,突然间就不能了,非常烦人,不知所措。对于那些遇到同样问题的人,我将在这里发布Visual Studio 2022(对于VS 2019也适用)的步骤。

1)在主IDE菜单上单击“项目”
2)选择“YourApp属性”,将您的项目名称替换为“YourApp”
3)在项目属性选项卡上,从左侧菜单中选择“构建”,而不是“iOS构建”。
4)滚动到页面底部,您会找到“生成序列化程序集”作为最后一个选项。
5)将其设置为“关闭”。

这对我起作用了,希望对您也有用。

英文:

Well, I THOUGHT I tried all suggestions I found on StackOverFlow and other sites, apparently not. I was browsing through my apps Project->MY_APP Properties and noticed that the Generate serialization assembly option on the Build was set to On, I had read on one of the aforementioned sites to try setting this option Off. So I did, now I am able to deploy the app to my test device again. Not sure how I missed that, but I did. I have no idea what I changed in my app to trigger this as a problem, as I was able to deploy the app to the device before and suddenly I couldn't, VERY annoying not knowing. For those of you who are having the same issue, I'll post the steps here for Visual Studio 2022 (same for VS 2019),.

  1. click on Projects on the main IDE menu
  2. Select YourApp Properties, substitute your projects name for YourApp
  3. On the project properties tab, select Build from the menu on the left side menu, NOT iOS Build.
  4. Scroll down to the bottom of the page and you'll find Generate Serialization assembly as the last option.
  5. Set it to Off.

This worked for me, hopefully this will work for you too.

huangapple
  • 本文由 发表于 2023年6月12日 09:28:49
  • 转载请务必保留本文链接:https://go.coder-hub.com/76453183.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定