Сбой развертывания приложения AspNetCore на Mac на Mac
Я использую Visual Studio для Mac и получаю сообщение об ошибке при попытке опубликовать приложение AspNetCore с использованием.Net Core 2.0. Я смотрю на трассировку стека для сбоя, и он показывает мне ошибку при доступе к com.xamarin.universalinstaller.
/usr/local/share/dotnet/sdk/2.0.0/Sdks/Microsoft.NET.Sdk.Publish/build/netstandard1.0/PublishTargets/Microsoft.NET.Sdk.Publish.MSDeploy.targets(138,5): error MSB4018: The "VSMSDeploy" task failed unexpectedly.
/usr/local/share/dotnet/sdk/2.0.0/Sdks/Microsoft.NET.Sdk.Publish/build/netstandard1.0/PublishTargets/Microsoft.NET.Sdk.Publish.MSDeploy.targets(138,5): error MSB4018: System.Security.SecurityException: No access to the given key ---> System.UnauthorizedAccessException: Access to the path "/Library/Application Support/com.xamarin.universalinstaller" is denied.
/usr/local/share/dotnet/sdk/2.0.0/Sdks/Microsoft.NET.Sdk.Publish/build/netstandard1.0/PublishTargets/Microsoft.NET.Sdk.Publish.MSDeploy.targets(138,5): error MSB4018: at System.IO.Directory.CreateDirectoriesInternal (System.String path) [0x0005f] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.IO/Directory.cs:121
/usr/local/share/dotnet/sdk/2.0.0/Sdks/Microsoft.NET.Sdk.Publish/build/netstandard1.0/PublishTargets/Microsoft.NET.Sdk.Publish.MSDeploy.targets(138,5): error MSB4018: at System.IO.Directory.CreateDirectory (System.String path) [0x0008f] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.IO/Directory.cs:85
/usr/local/share/dotnet/sdk/2.0.0/Sdks/Microsoft.NET.Sdk.Publish/build/netstandard1.0/PublishTargets/Microsoft.NET.Sdk.Publish.MSDeploy.targets(138,5): error MSB4018: at System.IO.DirectoryInfo.Create () [0x00000] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.IO/DirectoryInfo.cs:144
/usr/local/share/dotnet/sdk/2.0.0/Sdks/Microsoft.NET.Sdk.Publish/build/netstandard1.0/PublishTargets/Microsoft.NET.Sdk.Publish.MSDeploy.targets(138,5): error MSB4018: at (wrapper remoting-invoke-with-check) System.IO.DirectoryInfo:Create ()
/usr/local/share/dotnet/sdk/2.0.0/Sdks/Microsoft.NET.Sdk.Publish/build/netstandard1.0/PublishTargets/Microsoft.NET.Sdk.Publish.MSDeploy.targets(138,5): error MSB4018: at System.IO.Directory.CreateDirectoriesInternal (System.String path) [0x00030] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.IO/Directory.cs:103
/usr/local/share/dotnet/sdk/2.0.0/Sdks/Microsoft.NET.Sdk.Publish/build/netstandard1.0/PublishTargets/Microsoft.NET.Sdk.Publish.MSDeploy.targets(138,5): error MSB4018: at System.IO.Directory.CreateDirectory (System.String path) [0x0008f] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.IO/Directory.cs:85
/usr/local/share/dotnet/sdk/2.0.0/Sdks/Microsoft.NET.Sdk.Publish/build/netstandard1.0/PublishTargets/Microsoft.NET.Sdk.Publish.MSDeploy.targets(138,5): error MSB4018: at Microsoft.Win32.KeyHandler..ctor (Microsoft.Win32.RegistryKey rkey, System.String basedir, System.Boolean is_volatile) [0x00038] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/corlib/Microsoft.Win32/UnixRegistryApi.cs:152
/usr/local/share/dotnet/sdk/2.0.0/Sdks/Microsoft.NET.Sdk.Publish/build/netstandard1.0/PublishTargets/Microsoft.NET.Sdk.Publish.MSDeploy.targets(138,5): error MSB4018: --- End of inner exception stack trace ---
/usr/local/share/dotnet/sdk/2.0.0/Sdks/Microsoft.NET.Sdk.Publish/build/netstandard1.0/PublishTargets/Microsoft.NET.Sdk.Publish.MSDeploy.targets(138,5): error MSB4018: at Microsoft.Win32.KeyHandler..ctor (Microsoft.Win32.RegistryKey rkey, System.String basedir, System.Boolean is_volatile) [0x00042] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/corlib/Microsoft.Win32/UnixRegistryApi.cs:154
/usr/local/share/dotnet/sdk/2.0.0/Sdks/Microsoft.NET.Sdk.Publish/build/netstandard1.0/PublishTargets/Microsoft.NET.Sdk.Publish.MSDeploy.targets(138,5): error MSB4018: at Microsoft.Win32.KeyHandler..ctor (Microsoft.Win32.RegistryKey rkey, System.String basedir) [0x00000] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/corlib/Microsoft.Win32/UnixRegistryApi.cs:132
/usr/local/share/dotnet/sdk/2.0.0/Sdks/Microsoft.NET.Sdk.Publish/build/netstandard1.0/PublishTargets/Microsoft.NET.Sdk.Publish.MSDeploy.targets(138,5): error MSB4018: at Microsoft.Win32.KeyHandler.Lookup (Microsoft.Win32.RegistryKey rkey, System.Boolean createNonExisting) [0x000bf] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/corlib/Microsoft.Win32/UnixRegistryApi.cs:428
/usr/local/share/dotnet/sdk/2.0.0/Sdks/Microsoft.NET.Sdk.Publish/build/netstandard1.0/PublishTargets/Microsoft.NET.Sdk.Publish.MSDeploy.targets(138,5): error MSB4018: at Microsoft.Win32.UnixRegistryApi.OpenSubKey (Microsoft.Win32.RegistryKey rkey, System.String keyname, System.Boolean writable) [0x00000] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/corlib/Microsoft.Win32/UnixRegistryApi.cs:867
/usr/local/share/dotnet/sdk/2.0.0/Sdks/Microsoft.NET.Sdk.Publish/build/netstandard1.0/PublishTargets/Microsoft.NET.Sdk.Publish.MSDeploy.targets(138,5): error MSB4018: at Microsoft.Win32.RegistryKey.OpenSubKey (System.String name, System.Boolean writable) [0x0001b] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/corlib/Microsoft.Win32/RegistryKey.cs:466
/usr/local/share/dotnet/sdk/2.0.0/Sdks/Microsoft.NET.Sdk.Publish/build/netstandard1.0/PublishTargets/Microsoft.NET.Sdk.Publish.MSDeploy.targets(138,5): error MSB4018: at Microsoft.Win32.RegistryKey.OpenSubKey (System.String name) [0x00000] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/corlib/Microsoft.Win32/RegistryKey.cs:450
/usr/local/share/dotnet/sdk/2.0.0/Sdks/Microsoft.NET.Sdk.Publish/build/netstandard1.0/PublishTargets/Microsoft.NET.Sdk.Publish.MSDeploy.targets(138,5): error MSB4018: at (wrapper remoting-invoke-with-check) Microsoft.Win32.RegistryKey:OpenSubKey (string)
/usr/local/share/dotnet/sdk/2.0.0/Sdks/Microsoft.NET.Sdk.Publish/build/netstandard1.0/PublishTargets/Microsoft.NET.Sdk.Publish.MSDeploy.targets(138,5): error MSB4018: at Microsoft.NET.Sdk.Publish.Tasks.MsDeploy.Utility.CheckMSDeploymentVersion () [0x0005e] in <a8bbf6f62d6e4b888cb2558952dc0635>:0
/usr/local/share/dotnet/sdk/2.0.0/Sdks/Microsoft.NET.Sdk.Publish/build/netstandard1.0/PublishTargets/Microsoft.NET.Sdk.Publish.MSDeploy.targets(138,5): error MSB4018: at Microsoft.NET.Sdk.Publish.Tasks.MsDeploy.Utility.get_IsMSDeployInstalled () [0x00013] in <a8bbf6f62d6e4b888cb2558952dc0635>:0
/usr/local/share/dotnet/sdk/2.0.0/Sdks/Microsoft.NET.Sdk.Publish/build/netstandard1.0/PublishTargets/Microsoft.NET.Sdk.Publish.MSDeploy.targets(138,5): error MSB4018: at Microsoft.NET.Sdk.Publish.Tasks.MsDeploy.Utility.CheckMSDeploymentVersion (Microsoft.Build.Utilities.TaskLoggingHelper log, System.String& errorMessage) [0x00003] in <a8bbf6f62d6e4b888cb2558952dc0635>:0
/usr/local/share/dotnet/sdk/2.0.0/Sdks/Microsoft.NET.Sdk.Publish/build/netstandard1.0/PublishTargets/Microsoft.NET.Sdk.Publish.MSDeploy.targets(138,5): error MSB4018: at Microsoft.NET.Sdk.Publish.Tasks.MsDeploy.VSMSDeploy.Execute () [0x00034] in <a8bbf6f62d6e4b888cb2558952dc0635>:0
/usr/local/share/dotnet/sdk/2.0.0/Sdks/Microsoft.NET.Sdk.Publish/build/netstandard1.0/PublishTargets/Microsoft.NET.Sdk.Publish.MSDeploy.targets(138,5): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute () [0x00023] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/msbuild-15.4/src/Build/BackEnd/TaskExecutionHost/TaskExecutionHost.cs:631
/usr/local/share/dotnet/sdk/2.0.0/Sdks/Microsoft.NET.Sdk.Publish/build/netstandard1.0/PublishTargets/Microsoft.NET.Sdk.Publish.MSDeploy.targets(138,5): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder+<ExecuteInstantiatedTask>d__26.MoveNext () [0x0022d] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/msbuild-15.4/src/Build/BackEnd/Components/RequestBuilder/TaskBuilder.cs:787
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:05.75
Я посмотрел на мою файловую систему и /Library/Application Support/com.xamarin.universalinstaller там не было.
Я не нашел никакой информации об этом установщике относительно VSMSDeploy.
У меня такой вопрос, нужно ли устанавливать это отдельно? Если так, где я могу получить это? У меня поврежденная установка VS (я попытался переустановить и не получил ошибку)? Зачем это нужно для VSMSDeploy?
1 ответ
Я на самом деле чувствую себя немного глупо по этому поводу, но я просто попытался создать отсутствующую папку.
/Library/Application Support/com.xamarin.universalinstaller
После того, как я попытался опубликовать, он пожаловался, что не найдена подпапка com.xamarin.universalinstaller с именем LocalMachine, поэтому я создал ее.
/Library/Application Support/com.xamarin.universalinstaller/LocalMachine
И теперь VS Mac публикуется как мечта.