【问题标题】:.Net Maui - Operation Timeout when trying to build.Net Maui - 尝试构建时操作超时
【发布时间】:2022-01-18 07:59:08
【问题描述】:

我在构建/运行默认的新 Maui 应用程序时遇到问题。

我创建了一个新的.NET Maui App (Preview) 并且不对自动生成的代码库进行任何更改,但是当我尝试构建或运行应用程序时,我收到了以下超时错误。

Severity    Code    Description Project File    Line    Suppression State
Error   MAUI0000    System.Net.WebException: The operation has timed out
   at System.Net.HttpWebRequest.GetResponse()
   at System.Xml.XmlDownloadManager.GetNonFileStream(Uri uri, ICredentials credentials, IWebProxy proxy, RequestCachePolicy cachePolicy)
   at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn)
   at System.Xml.XmlTextReaderImpl.OpenAndPush(Uri uri)
   at System.Xml.XmlTextReaderImpl.PushExternalEntityOrSubset(String publicId, String systemId, Uri baseUri, String entityName)
   at System.Xml.XmlTextReaderImpl.DtdParserProxy_PushExternalSubset(String systemId, String publicId)
   at System.Xml.DtdParser.ParseExternalSubset()
   at System.Xml.DtdParser.ParseInDocumentDtd(Boolean saveInternalSubset)
   at System.Xml.DtdParser.Parse(Boolean saveInternalSubset)
   at System.Xml.DtdParser.System.Xml.IDtdParser.ParseInternalDtd(IDtdParserAdapter adapter, Boolean saveInternalSubset)
   at System.Xml.XmlTextReaderImpl.ParseDtd()
   at System.Xml.XmlTextReaderImpl.ParseDoctypeDecl()
   at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
   at System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace)
   at System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc)
   at System.Xml.XmlDocument.Load(XmlReader reader)
   at System.Xml.XmlDocument.Load(String filename)
   at Svg2VectorDrawable.SvgTree.Parse(String filename) in /Users/runner/work/Svg2VectorDrawable.Net/Svg2VectorDrawable.Net/Svg2VectorDrawable.Net/SvgTree.cs:line 35
   at Svg2VectorDrawable.Svg2Vector.Parse(String file) in /Users/runner/work/Svg2VectorDrawable.Net/Svg2VectorDrawable.Net/Svg2VectorDrawable.Net/Svg2Vector.cs:line 84
   at Svg2VectorDrawable.Svg2Vector.ParseSvgToXml(String inputSvgFilename, Stream outputStream) in /Users/runner/work/Svg2VectorDrawable.Net/Svg2VectorDrawable.Net/Svg2VectorDrawable.Net/Svg2Vector.cs:line 773
   at Svg2VectorDrawable.Svg2Vector.Convert(String inputSvgFilename, String outputXmlFilename) in /Users/runner/work/Svg2VectorDrawable.Net/Svg2VectorDrawable.Net/Svg2VectorDrawable.Net/Svg2Vector.cs:line 759
   at Microsoft.Maui.Resizetizer.AndroidAdaptiveIconGenerator.Generate() in D:\a\1\s\src\SingleProject\Resizetizer\src\AndroidAdaptiveIconGenerator.cs:line 73
   at Microsoft.Maui.Resizetizer.ResizetizeImages.ProcessAppIcon(ResizeImageInfo img, ConcurrentBag`1 resizedImages) in D:\a\1\s\src\SingleProject\Resizetizer\src\ResizetizeImages.cs:line 132
   at Microsoft.Maui.Resizetizer.ResizetizeImages.<>c__DisplayClass26_0.<ExecuteAsync>b__0(ResizeImageInfo img) in D:\a\1\s\src\SingleProject\Resizetizer\src\ResizetizeImages.cs:line 88
   at Microsoft.Maui.Resizetizer.AsyncTaskExtensions.<>c__DisplayClass0_0`1.<ParallelForEach>b__0(TSource s) in D:\a\1\s\src\SingleProject\Resizetizer\src\AsyncTaskExtensions.cs:line 21   MauiApp C:\Users\rea\.nuget\packages\microsoft.maui.resizetizer.sdk\6.0.101-preview.10.2068\build\Microsoft.Maui.Resizetizer.Sdk.targets    463 

我在跑步

  • vs2022 preview 1.1
  • dotnet v6.0.100
  • Android 12.0 (SDK 31)

有人可以帮我解决我所缺少的吗?

【问题讨论】:

  • 有趣!你在 GitHub 上的某个地方有这个项目吗?或者你能把它放在某个地方吗?
  • 当然,我现在只是将其推送到 GitHub 存储库:github.com/robearlam/MauiTest 不过这很奇怪,它只是新项目的默认文件,资产没有任何变化。我还运行了 Maui-check 工具,结果都是绿色的,所以我很难过!
  • 我会使用 VS Installer 来“修复”VS 2022 Preview。这解决了我遇到的一个(不相关的)问题。
  • 我已经完全卸载并重新安装了VS,仍然是同样的错误

标签: c# .net xamarin maui


【解决方案1】:

抱歉,拖了一段时间!奇怪的是它会产生这个错误,但我认为您可能希望避免使用 MauiApp 作为您的解决方案和项目的名称,因为它也是源代码中的一种类型,这也会导致我构建它的问题。

使用不同名称的解决方案再试一次,如果解决了,请告诉我!

【讨论】:

  • 好点,我已经使用不冲突的不同名称重新生成了项目,但是我仍然遇到相同的超时错误?将更改推送到同一个仓库:github.com/robearlam/MauiTest
  • 您是否有某种防火墙或任何其他可能妨碍您的网络设备?在这里一切正常:)
猜你喜欢
  • 2023-01-29
  • 2020-03-09
  • 2014-07-28
  • 2022-10-17
  • 1970-01-01
  • 1970-01-01
  • 2013-01-01
  • 2019-06-16
  • 2019-04-22
相关资源
最近更新 更多