Visual Studio for Mac:Guid 应包含 32 位数字和 4 个破折号 (xxxx...)
Visual Studio for Mac: Guid should contain 32 digits with 4 dashes (xxxx...)
我是 Visual Studio 和 Mac 的菜鸟。我的目的是检查 Xamarin 开发。我的 Visual Studio 版本是 7.3 (Build 799) Community Edition,我安装在 MB Pro 2015 Mid 型号上。
当我尝试通过以下方式创建项目时,
- 多平台
- 应用程序
- 游戏(iOS、Mac)
- SpriteKit 游戏 (2D)
然后继续执行这些步骤,直到按下提供项目名称的创建按钮,它只给我以下警报,我无法创建项目。
更新:
我通过转到 "Open Log Directory" 菜单项找到了以下日志。
ERROR [2017-12-14 00:46:07Z]: The project could not be created
System.FormatException: Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).
at System.Guid+GuidResult.SetFailure (System.Guid+ParseFailureKind failure, System.String failureMessageID, System.Object failureMessageFormatArgument, System.String failureArgumentName, System.Exception innerException) [0x00034] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/guid.cs:200
at System.Guid+GuidResult.SetFailure (System.Guid+ParseFailureKind failure, System.String failureMessageID) [0x00000] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/guid.cs:184
at System.Guid.TryParseGuidWithNoStyle (System.String guidString, System.Guid+GuidResult& result) [0x0000e] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/guid.cs:611
at System.Guid.TryParseGuid (System.String g, System.Guid+GuidStyles flags, System.Guid+GuidResult& result) [0x000f8] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/guid.cs:451
at System.Guid..ctor (System.String g) [0x00029] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/guid.cs:244
at Xamarin.AndroidDesigner.MonoDevelop.AndroidDesignerInitializer+<>c.<SupportsObject>b__1_0 (System.String g) [0x00000] in /Users/vsts/agent/2.126.0/work/3/s/Xamarin.Designer.Android/Xamarin.AndroidDesigner.MonoDevelop/AndroidDesignerInitializer.cs:23
at System.Linq.Enumerable.Any[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] predicate) [0x0002c] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/external/corefx/src/System.Linq/src/System/Linq/AnyAll.cs:38
at Xamarin.AndroidDesigner.MonoDevelop.AndroidDesignerInitializer.SupportsObject (MonoDevelop.Projects.WorkspaceObject item) [0x00014] in /Users/vsts/agent/2.126.0/work/3/s/Xamarin.Designer.Android/Xamarin.AndroidDesigner.MonoDevelop/AndroidDesignerInitializer.cs:23
at MonoDevelop.Projects.WorkspaceObject.InitializeExtensionChain () [0x00091] in /Users/builder/data/lanes/5402/df590420/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/WorkspaceObject.cs:382
at MonoDevelop.Projects.WorkspaceObject.EnsureInitialized () [0x00021] in /Users/builder/data/lanes/5402/df590420/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/WorkspaceObject.cs:74
at MonoDevelop.Projects.MSBuild.MSBuildProjectService.CreateProject (System.String typeGuid, MonoDevelop.Projects.ProjectCreateInformation info, System.Xml.XmlElement projectOptions, System.String[] flavorGuids) [0x00046] in /Users/builder/data/lanes/5402/df590420/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.MSBuild/MSBuildProjectService.cs:526
at MonoDevelop.Projects.ProjectService.CreateProject (System.String typeAlias, MonoDevelop.Projects.ProjectCreateInformation info, System.Xml.XmlElement projectOptions, System.String[] flavorGuids) [0x00000] in /Users/builder/data/lanes/5402/df590420/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectService.cs:341
at MonoDevelop.Ide.Templates.ProjectDescriptor.CreateItem (MonoDevelop.Projects.ProjectCreateInformation projectCreateInformation, System.String defaultLanguage) [0x0012b] in /Users/builder/data/lanes/5402/df590420/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/ProjectDescriptor.cs:140
at MonoDevelop.Ide.Templates.SolutionDescriptor.CreateEntry (MonoDevelop.Projects.ProjectCreateInformation projectCreateInformation, System.String defaultLanguage) [0x001e9] in /Users/builder/data/lanes/5402/df590420/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/SolutionDescriptor.cs:161
at MonoDevelop.Ide.Templates.ProjectTemplate.CreateWorkspaceItem (MonoDevelop.Projects.ProjectCreateInformation cInfo) [0x00000] in /Users/builder/data/lanes/5402/df590420/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/ProjectTemplate.cs:311
at MonoDevelop.Ide.Templates.ProjectTemplatingProvider.ProcessTemplate (MonoDevelop.Ide.Templates.DefaultSolutionTemplate template, MonoDevelop.Ide.Projects.NewProjectConfiguration config, MonoDevelop.Projects.SolutionFolder parentFolder) [0x0000e] in /Users/builder/data/lanes/5402/df590420/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/ProjectTemplatingProvider.cs:67
at MonoDevelop.Ide.Templates.ProjectTemplatingProvider.ProcessTemplate (MonoDevelop.Ide.Templates.SolutionTemplate template, MonoDevelop.Ide.Projects.NewProjectConfiguration config, MonoDevelop.Projects.SolutionFolder parentFolder) [0x00000] in /Users/builder/data/lanes/5402/df590420/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/ProjectTemplatingProvider.cs:58
at MonoDevelop.Ide.Templates.TemplatingService+<ProcessTemplate>d__13.MoveNext () [0x00024] in /Users/builder/data/lanes/5402/df590420/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/TemplatingService.cs:150
有没有人遇到过这种问题?您已经制定出任何解决方案或解决方法?
所以问题似乎是,如果项目模板使用的项目类型之一不受支持,则会创建一个未知的项目类型,其风格 guid 为空。这会导致 Android 设计器出现异常。
在这种情况下,Xamarin.iOS 项目类型被认为不受支持,因为 Xamarin.iOS 未安装。
对于 Mac,这似乎是 Visual Studio 中的错误。如果项目模板不受支持,则不应尝试创建 Xamarin.iOS 项目,或者应使用无风格 guid 而不是使用空字符串来创建未知项目。
我是 Visual Studio 和 Mac 的菜鸟。我的目的是检查 Xamarin 开发。我的 Visual Studio 版本是 7.3 (Build 799) Community Edition,我安装在 MB Pro 2015 Mid 型号上。
当我尝试通过以下方式创建项目时,
- 多平台
- 应用程序
- 游戏(iOS、Mac)
- SpriteKit 游戏 (2D)
- 游戏(iOS、Mac)
- 应用程序
然后继续执行这些步骤,直到按下提供项目名称的创建按钮,它只给我以下警报,我无法创建项目。
更新: 我通过转到 "Open Log Directory" 菜单项找到了以下日志。
ERROR [2017-12-14 00:46:07Z]: The project could not be created
System.FormatException: Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).
at System.Guid+GuidResult.SetFailure (System.Guid+ParseFailureKind failure, System.String failureMessageID, System.Object failureMessageFormatArgument, System.String failureArgumentName, System.Exception innerException) [0x00034] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/guid.cs:200
at System.Guid+GuidResult.SetFailure (System.Guid+ParseFailureKind failure, System.String failureMessageID) [0x00000] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/guid.cs:184
at System.Guid.TryParseGuidWithNoStyle (System.String guidString, System.Guid+GuidResult& result) [0x0000e] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/guid.cs:611
at System.Guid.TryParseGuid (System.String g, System.Guid+GuidStyles flags, System.Guid+GuidResult& result) [0x000f8] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/guid.cs:451
at System.Guid..ctor (System.String g) [0x00029] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/guid.cs:244
at Xamarin.AndroidDesigner.MonoDevelop.AndroidDesignerInitializer+<>c.<SupportsObject>b__1_0 (System.String g) [0x00000] in /Users/vsts/agent/2.126.0/work/3/s/Xamarin.Designer.Android/Xamarin.AndroidDesigner.MonoDevelop/AndroidDesignerInitializer.cs:23
at System.Linq.Enumerable.Any[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] predicate) [0x0002c] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/external/corefx/src/System.Linq/src/System/Linq/AnyAll.cs:38
at Xamarin.AndroidDesigner.MonoDevelop.AndroidDesignerInitializer.SupportsObject (MonoDevelop.Projects.WorkspaceObject item) [0x00014] in /Users/vsts/agent/2.126.0/work/3/s/Xamarin.Designer.Android/Xamarin.AndroidDesigner.MonoDevelop/AndroidDesignerInitializer.cs:23
at MonoDevelop.Projects.WorkspaceObject.InitializeExtensionChain () [0x00091] in /Users/builder/data/lanes/5402/df590420/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/WorkspaceObject.cs:382
at MonoDevelop.Projects.WorkspaceObject.EnsureInitialized () [0x00021] in /Users/builder/data/lanes/5402/df590420/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/WorkspaceObject.cs:74
at MonoDevelop.Projects.MSBuild.MSBuildProjectService.CreateProject (System.String typeGuid, MonoDevelop.Projects.ProjectCreateInformation info, System.Xml.XmlElement projectOptions, System.String[] flavorGuids) [0x00046] in /Users/builder/data/lanes/5402/df590420/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.MSBuild/MSBuildProjectService.cs:526
at MonoDevelop.Projects.ProjectService.CreateProject (System.String typeAlias, MonoDevelop.Projects.ProjectCreateInformation info, System.Xml.XmlElement projectOptions, System.String[] flavorGuids) [0x00000] in /Users/builder/data/lanes/5402/df590420/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectService.cs:341
at MonoDevelop.Ide.Templates.ProjectDescriptor.CreateItem (MonoDevelop.Projects.ProjectCreateInformation projectCreateInformation, System.String defaultLanguage) [0x0012b] in /Users/builder/data/lanes/5402/df590420/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/ProjectDescriptor.cs:140
at MonoDevelop.Ide.Templates.SolutionDescriptor.CreateEntry (MonoDevelop.Projects.ProjectCreateInformation projectCreateInformation, System.String defaultLanguage) [0x001e9] in /Users/builder/data/lanes/5402/df590420/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/SolutionDescriptor.cs:161
at MonoDevelop.Ide.Templates.ProjectTemplate.CreateWorkspaceItem (MonoDevelop.Projects.ProjectCreateInformation cInfo) [0x00000] in /Users/builder/data/lanes/5402/df590420/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/ProjectTemplate.cs:311
at MonoDevelop.Ide.Templates.ProjectTemplatingProvider.ProcessTemplate (MonoDevelop.Ide.Templates.DefaultSolutionTemplate template, MonoDevelop.Ide.Projects.NewProjectConfiguration config, MonoDevelop.Projects.SolutionFolder parentFolder) [0x0000e] in /Users/builder/data/lanes/5402/df590420/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/ProjectTemplatingProvider.cs:67
at MonoDevelop.Ide.Templates.ProjectTemplatingProvider.ProcessTemplate (MonoDevelop.Ide.Templates.SolutionTemplate template, MonoDevelop.Ide.Projects.NewProjectConfiguration config, MonoDevelop.Projects.SolutionFolder parentFolder) [0x00000] in /Users/builder/data/lanes/5402/df590420/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/ProjectTemplatingProvider.cs:58
at MonoDevelop.Ide.Templates.TemplatingService+<ProcessTemplate>d__13.MoveNext () [0x00024] in /Users/builder/data/lanes/5402/df590420/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/TemplatingService.cs:150
有没有人遇到过这种问题?您已经制定出任何解决方案或解决方法?
所以问题似乎是,如果项目模板使用的项目类型之一不受支持,则会创建一个未知的项目类型,其风格 guid 为空。这会导致 Android 设计器出现异常。
在这种情况下,Xamarin.iOS 项目类型被认为不受支持,因为 Xamarin.iOS 未安装。
对于 Mac,这似乎是 Visual Studio 中的错误。如果项目模板不受支持,则不应尝试创建 Xamarin.iOS 项目,或者应使用无风格 guid 而不是使用空字符串来创建未知项目。