启动一个干净安装的Visual Studio 2017 for Mac,我收到以下错误对话框:
The following extensions could not be started:
MonoDevelop
Full Path: MonoDevelop.Ide
Error: Exception has been thrown by the target of an invocation.
Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
IDE日志如下:
(Beginning of file)
INFO [2017-08-07 17:31:38Z]: Starting Visual Studio 2017 for Mac 7.0.1 (build 24)
INFO [2017-08-07 17:31:38Z]: Running on Mono 5.0.1.1 (2017-02/5077205) (64-bit)
INFO [2017-08-07 17:31:38Z]: Operating System: Mac OS X 10.12.6
Darwin 16.7.0 Darwin Kernel Version 16.7.0
Thu Jun 15 17:36:27 PDT 2017
root:xnu-3789.70.16~2/RELEASE_X86_64 x86_64
INFO [2017-08-07 17:31:38Z]: GTK: Using gtkrc from /Applications/Visual Studio.app/Contents/Resources/lib/monodevelop/bin/gtkrc.mac-dark
Could not find `PresentationCore` referenced by assembly `Microsoft.VisualStudio.Text.UI, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`.
INFO [2017-08-07 17:31:42Z]: Accessibility disabled
INFO [2017-08-07 17:31:42Z]: Using GTK+ 2.24.23
INFO [2017-08-07 17:31:42Z]: Add-in loaded: MonoDevelop.Core
INFO [2017-08-07 17:31:42Z]: Add-in loaded: MonoDevelop.Ide
INFO [2017-08-07 17:31:43Z]: Add-in loaded: MonoDevelop.MacPlatform
INFO [2017-08-07 17:31:43Z]: Initializing Runtime Mono 5.0.1.1
Starting Visual Studio
INFO [2017-08-07 17:31:43Z]: Add-in loaded: MonoDevelop.DesignerSupport
INFO [2017-08-07 17:31:43Z]: Add-in loaded: MonoDevelop.Debugger
INFO [2017-08-07 17:31:43Z]: Add-in loaded: MonoDevelop.SourceEditor2
INFO [2017-08-07 17:31:43Z]: Add-in loaded: MonoDevelop.TextTemplating
INFO [2017-08-07 17:31:43Z]: Add-in loaded: MonoDevelop.Xml
INFO [2017-08-07 17:31:43Z]: Add-in loaded: MonoDevelop.AspNet
INFO [2017-08-07 17:31:43Z]: Add-in loaded: MonoDevelop.UnitTesting
INFO [2017-08-07 17:31:43Z]: Add-in loaded: MonoDevelop.RegexToolkit
INFO [2017-08-07 17:31:43Z]: Add-in loaded: MonoDevelop.Refactoring
INFO [2017-08-07 17:31:43Z]: Add-in loaded: MonoDevelop.CSharpBinding
INFO [2017-08-07 17:31:43Z]: Add-in loaded: MonoDevelop.GtkCore
INFO [2017-08-07 17:31:43Z]: Add-in loaded: MonoDevelop.FSharpBinding
INFO [2017-08-07 17:31:43Z]: Add-in loaded: MonoDevelop.PackageManagement
INFO [2017-08-07 17:31:43Z]: Add-in loaded: MonoDevelop.Debugger.VsCodeDebugProtocol
INFO [2017-08-07 17:31:43Z]: Add-in loaded: MonoDevelop.DotNetCore
INFO [2017-08-07 17:31:43Z]: Add-in loaded: Xamarin.Ide.Insights
INFO [2017-08-07 17:31:43Z]: Add-in loaded: MonoDevelop.Xamarin.Ide
INFO [2017-08-07 17:31:43Z]: Add-in loaded: MonoDevelop.Xamarin.Ide.Mac
INFO [2017-08-07 17:31:43Z]: Add-in loaded: MonoDevelop.VersionControl
INFO [2017-08-07 17:31:43Z]: Add-in loaded: MonoDevelop.MacDev
INFO [2017-08-07 17:31:43Z]: Add-in loaded: Xamarin.TestCloud
INFO [2017-08-07 17:31:43Z]: Add-in loaded: MonoDevelop.Debugger.Soft
INFO [2017-08-07 17:31:43Z]: Add-in loaded: MonoDevelop.IPhone
INFO [2017-08-07 17:31:43Z]: Add-in loaded: MonoDevelop.MonoAndroid
INFO [2017-08-07 17:31:43Z]: Add-in loaded: MonoDevelop.VBBinding
INFO [2017-08-07 17:31:43Z]: Add-in loaded: Xamarin.Forms.Addin
INFO [2017-08-07 17:31:43Z]: Add-in loaded: MonoDevelop.WebToolingAddin
INFO [2017-08-07 17:31:43Z]: Add-in loaded: MonoDevelop.Unity
INFO [2017-08-07 17:31:43Z]: .NET Core SDK not found.
INFO [2017-08-07 17:31:43Z]: .NET Core runtime not found.
ERROR [2017-08-07 17:31:43Z]: Add-in error (MonoDevelop.Ide):
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.TypeInitializationException: The type initializer for 'MonoDevelop.Ide.Templates.MicrosoftTemplateEngineProjectTemplatingProvider' threw an exception. ---> System.UnauthorizedAccessException: Access to the path "/Volumes/Storage (macOS)/ryo/.templateengine" is denied.
at System.IO.Directory.CreateDirectoriesInternal (System.String path) [0x0005f] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/corlib/System.IO/Directory.cs:121
at System.IO.Directory.CreateDirectory (System.String path) [0x0008f] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/corlib/System.IO/Directory.cs:85
at System.IO.DirectoryInfo.Create () [0x00000] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/corlib/System.IO/DirectoryInfo.cs:144
at (wrapper remoting-invoke-with-check) System.IO.DirectoryInfo:Create ()
at System.IO.Directory.CreateDirectoriesInternal (System.String path) [0x00030] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/corlib/System.IO/Directory.cs:103
at System.IO.Directory.CreateDirectory (System.String path) [0x0008f] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/corlib/System.IO/Directory.cs:85
at System.IO.DirectoryInfo.Create () [0x00000] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/corlib/System.IO/DirectoryInfo.cs:144
at (wrapper remoting-invoke-with-check) System.IO.DirectoryInfo:Create ()
at System.IO.Directory.CreateDirectoriesInternal (System.String path) [0x00030] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/corlib/System.IO/Directory.cs:103
at System.IO.Directory.CreateDirectory (System.String path) [0x0008f] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/corlib/System.IO/Directory.cs:85
at Microsoft.TemplateEngine.Utils.PhysicalFileSystem.CreateDirectory (System.String path) [0x00000] in <a2504912b6304074a04ad39fc0858504>:0
at Microsoft.TemplateEngine.Edge.Paths.WriteAllText (System.String path, System.String value) [0x00020] in <5a88eac832b84150b64662534e9b54e6>:0
at Microsoft.TemplateEngine.Edge.Settings.SettingsLoader.Save () [0x00028] in <5a88eac832b84150b64662534e9b54e6>:0
at Microsoft.TemplateEngine.Edge.Settings.ComponentManager.Register (System.Type type) [0x001ac] in <5a88eac832b84150b64662534e9b54e6>:0
at Microsoft.TemplateEngine.Edge.Settings.ComponentManager..ctor (Microsoft.TemplateEngine.Abstractions.ISettingsLoader loader, Microsoft.TemplateEngine.Edge.Settings.SettingsStore userSettings) [0x001e8] in <5a88eac832b84150b64662534e9b54e6>:0
at Microsoft.TemplateEngine.Edge.Settings.SettingsLoader.EnsureLoaded () [0x000f9] in <5a88eac832b84150b64662534e9b54e6>:0
at Microsoft.TemplateEngine.Edge.Settings.SettingsLoader.TryGetMountPointInfoFromPlace (System.String mountPointPlace, Microsoft.TemplateEngine.Abstractions.Mount.MountPointInfo& info) [0x00000] in <5a88eac832b84150b64662534e9b54e6>:0
at Microsoft.TemplateEngine.Edge.Settings.SettingsLoader.TryGetMountPointFromPlace (System.String mountPointPlace, Microsoft.TemplateEngine.Abstractions.Mount.IMountPoint& mountPoint) [0x00000] in <5a88eac832b84150b64662534e9b54e6>:0
at Microsoft.TemplateEngine.Edge.Settings.TemplateCache.Scan (System.String templateDir) [0x000d1] in <5a88eac832b84150b64662534e9b54e6>:0
at MonoDevelop.Ide.Templates.MicrosoftTemplateEngineProjectTemplatingProvider.UpdateCache () [0x0006f] in /Users/builder/data/lanes/4693/7ab1ca2c/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/MicrosoftTemplateEngineProjectTemplatingProvider.cs:82
at MonoDevelop.Ide.Templates.MicrosoftTemplateEngineProjectTemplatingProvider..cctor () [0x0007e] in /Users/builder/data/lanes/4693/7ab1ca2c/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/MicrosoftTemplateEngineProjectTemplatingProvider.cs:65
--- End of inner exception stack trace ---
at (wrapper managed-to-native) System.Reflection.MonoCMethod:InternalInvoke (System.Reflection.MonoCMethod,object,object[],System.Exception&)
at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00002] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/corlib/System.Reflection/MonoMethod.cs:661
--- End of inner exception stack trace ---
at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x0000f] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/corlib/System.Reflection/MonoMethod.cs:667
at System.RuntimeType.CreateInstanceMono (System.Boolean nonPublic) [0x000a8] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/corlib/ReferenceSources/RuntimeType.cs:179
at System.RuntimeType.CreateInstanceSlow (System.Boolean publicOnly, System.Boolean skipCheckThis, System.Boolean fillCache, System.Threading.StackCrawlMark& stackMark) [0x00009] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/corlib/ReferenceSources/RuntimeType.cs:153
at System.RuntimeType.CreateInstanceDefaultCtor (System.Boolean publicOnly, System.Boolean skipCheckThis, System.Boolean fillCache, System.Threading.StackCrawlMark& stackMark) [0x00027] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/rttype.cs:5639
at System.Activator.CreateInstance (System.Type type, System.Boolean nonPublic) [0x00039] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/activator.cs:201
at System.Activator.CreateInstance (System.Type type) [0x00000] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/activator.cs:134
at Mono.Addins.TypeExtensionNode.CreateInstance () [0x00000] in /Users/builder/data/lanes/4693/7ab1ca2c/source/monodevelop/main/external/mono-addins/Mono.Addins/Mono.Addins/TypeExtensionNode.cs:93
at Mono.Addins.InstanceExtensionNode.GetInstance () [0x00008] in /Users/builder/data/lanes/4693/7ab1ca2c/source/monodevelop/main/external/mono-addins/Mono.Addins/Mono.Addins/InstanceExtensionNode.cs:73
at Mono.Addins.ExtensionNodeEventArgs.get_ExtensionObject () [0x0001a] in /Users/builder/data/lanes/4693/7ab1ca2c/source/monodevelop/main/external/mono-addins/Mono.Addins/Mono.Addins/ExtensionContext.cs:1330
at MonoDevelop.Ide.Templates.TemplatingService.OnTemplatingProvidersChanged (System.Object sender, Mono.Addins.ExtensionNodeEventArgs args) [0x00000] in /Users/builder/data/lanes/4693/7ab1ca2c/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/TemplatingService.cs:70
at Mono.Addins.ExtensionNode.add_ExtensionNodeChanged (Mono.Addins.ExtensionNodeEventHandler value) [0x00021] in /Users/builder/data/lanes/4693/7ab1ca2c/source/monodevelop/main/external/mono-addins/Mono.Addins/Mono.Addins/ExtensionNode.cs:172
INFO [2017-08-07 17:31:44Z]: Add-in loaded: MonoDevelop.MonoMac
INFO [2017-08-07 17:31:44Z]: Add-in loaded: MonoDevelop.Packaging.
....
点击&#34;是&#34;在对话框中,我实际上可以进入编辑器,但编译器有一些问题:未定义/实现的核心类等。
我正在使用Sierra 10.12.6和Visual Studio Community 2017 for Mac 7.0.1(build 24)。
答案 0 :(得分:1)
原因是在保存位置未给出写入权限的情况下保存用户配置文件。通过允许每个用户读取/写入位置来解决它。