Publish to Azure from Visual Studio for Mac

CodyBCodyB USXamarin Team Xamurai
edited November 2017 in Xamarin Blog

Hey everyone! I hope you enjoy THIS post on Azure and VS for Mac! Feel free to discuss below, and I will help out where I can :smile:

Thanks!

Posts

  • rgiampietrorgiampietro USMember ✭✭

    Any idea how you just publish/create an Archive on your local machine so you can manually 'publish' to your own VPS?

    On Windows Visual Studio you can Publish to your local file systems and that generates a folder of your .net code minus the .cs files etc... that's basically what I am looking to replicate on OSx... thanks.

  • BrianBirdBrianBird USUniversity ✭✭

    I have an asp.net core 2.0 web app with Entity Framework and a sqlite database. How would I deploy to Azure and set the web app to use SQL Azure and to run code-first migrations?

  • JackFruhJackFruh USMember

    Hi there, I work for a large enterprise and the "Publish to Azure App Service" dialog is unusable.

    Clicking the header in the subscription column does not sort by subscription and there is no filter on this dialog.

    We're a large enterprise customer with 47 subscriptions and hundreds upon hundreds of app services.

    The publish screen sits around 'thinking' for a very long time.

    If there is anything you can do to speed this up and make the list sortable, that'd be a big help.

  • CodyBCodyB USXamarin Team Xamurai

    @JackFruh I would like to talk more in-depth about this. Would you be able to chat via email or DM?

    @BrianBird We are working on adding support for many different scenarios. are you currently able to publish the app to Azure and then make edits in the Azure Portal?

    Thanks!

  • RohitNayakRohitNayak USMember

    I see the below errror when published to azure
    /usr/local/share/dotnet/sdk/2.0.3/Sdks/Microsoft.NET.Sdk.Publish/build/netstandard1.0/PublishTargets/Microsoft.NET.Sdk.Publish.MSDeploy.targets(139,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.3/Sdks/Microsoft.NET.Sdk.Publish/build/netstandard1.0/PublishTargets/Microsoft.NET.Sdk.Publish.MSDeploy.targets(139,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.3/Sdks/Microsoft.NET.Sdk.Publish/build/netstandard1.0/PublishTargets/Microsoft.NET.Sdk.Publish.MSDeploy.targets(139,5): error MSB4018: at (wrapper remoting-invoke-with-check) System.IO.DirectoryInfo:Create ()
    /usr/local/share/dotnet/sdk/2.0.3/Sdks/Microsoft.NET.Sdk.Publish/build/netstandard1.0/PublishTargets/Microsoft.NET.Sdk.Publish.MSDeploy.targets(139,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.3/Sdks/Microsoft.NET.Sdk.Publish/build/netstandard1.0/PublishTargets/Microsoft.NET.Sdk.Publish.MSDeploy.targets(139,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.3/Sdks/Microsoft.NET.Sdk.Publish/build/netstandard1.0/PublishTargets/Microsoft.NET.Sdk.Publish.MSDeploy.targets(139,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.3/Sdks/Microsoft.NET.Sdk.Publish/build/netstandard1.0/PublishTargets/Microsoft.NET.Sdk.Publish.MSDeploy.targets(139,5): error MSB4018: --- End of inner exception stack trace ---
    /usr/local/share/dotnet/sdk/2.0.3/Sdks/Microsoft.NET.Sdk.Publish/build/netstandard1.0/PublishTargets/Microsoft.NET.Sdk.Publish.MSDeploy.targets(139,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.3/Sdks/Microsoft.NET.Sdk.Publish/build/netstandard1.0/PublishTargets/Microsoft.NET.Sdk.Publish.MSDeploy.targets(139,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.3/Sdks/Microsoft.NET.Sdk.Publish/build/netstandard1.0/PublishTargets/Microsoft.NET.Sdk.Publish.MSDeploy.targets(139,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.3/Sdks/Microsoft.NET.Sdk.Publish/build/netstandard1.0/PublishTargets/Microsoft.NET.Sdk.Publish.MSDeploy.targets(139,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.3/Sdks/Microsoft.NET.Sdk.Publish/build/netstandard1.0/PublishTargets/Microsoft.NET.Sdk.Publish.MSDeploy.targets(139,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.3/Sdks/Microsoft.NET.Sdk.Publish/build/netstandard1.0/PublishTargets/Microsoft.NET.Sdk.Publish.MSDeploy.targets(139,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.3/Sdks/Microsoft.NET.Sdk.Publish/build/netstandard1.0/PublishTargets/Microsoft.NET.Sdk.Publish.MSDeploy.targets(139,5): error MSB4018: at (wrapper remoting-invoke-with-check) Microsoft.Win32.RegistryKey:OpenSubKey (string)
    /usr/local/share/dotnet/sdk/2.0.3/Sdks/Microsoft.NET.Sdk.Publish/build/netstandard1.0/PublishTargets/Microsoft.NET.Sdk.Publish.MSDeploy.targets(139,5): error MSB4018: at Microsoft.NET.Sdk.Publish.Tasks.MsDeploy.Utility.CheckMSDeploymentVersion () [0x0005e] in <68dc1c1b6e7f4ba19116cbf1cdf98823>:0
    /usr/local/share/dotnet/sdk/2.0.3/Sdks/Microsoft.NET.Sdk.Publish/build/netstandard1.0/PublishTargets/Microsoft.NET.Sdk.Publish.MSDeploy.targets(139,5): error MSB4018: at Microsoft.NET.Sdk.Publish.Tasks.MsDeploy.Utility.get_IsMSDeployInstalled () [0x00013] in <68dc1c1b6e7f4ba19116cbf1cdf98823>:0
    /usr/local/share/dotnet/sdk/2.0.3/Sdks/Microsoft.NET.Sdk.Publish/build/netstandard1.0/PublishTargets/Microsoft.NET.Sdk.Publish.MSDeploy.targets(139,5): error MSB4018: at Microsoft.NET.Sdk.Publish.Tasks.MsDeploy.Utility.CheckMSDeploymentVersion (Microsoft.Build.Utilities.TaskLoggingHelper log, System.String& errorMessage) [0x00003] in <68dc1c1b6e7f4ba19116cbf1cdf98823>:0
    /usr/local/share/dotnet/sdk/2.0.3/Sdks/Microsoft.NET.Sdk.Publish/build/netstandard1.0/PublishTargets/Microsoft.NET.Sdk.Publish.MSDeploy.targets(139,5): error MSB4018: at Microsoft.NET.Sdk.Publish.Tasks.MsDeploy.VSMSDeploy.Execute () [0x00034] in <68dc1c1b6e7f4ba19116cbf1cdf98823>:0
    /usr/local/share/dotnet/sdk/2.0.3/Sdks/Microsoft.NET.Sdk.Publish/build/netstandard1.0/PublishTargets/Microsoft.NET.Sdk.Publish.MSDeploy.targets(139,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.3/Sdks/Microsoft.NET.Sdk.Publish/build/netstandard1.0/PublishTargets/Microsoft.NET.Sdk.Publish.MSDeploy.targets(139,5): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder+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)

  • RohitNayakRohitNayak USMember

    I see the below errror when published to azure
    /usr/local/share/dotnet/sdk/2.0.3/Sdks/Microsoft.NET.Sdk.Publish/build/netstandard1.0/PublishTargets/Microsoft.NET.Sdk.Publish.MSDeploy.targets(139,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.3/Sdks/Microsoft.NET.Sdk.Publish/build/netstandard1.0/PublishTargets/Microsoft.NET.Sdk.Publish.MSDeploy.targets(139,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.3/Sdks/Microsoft.NET.Sdk.Publish/build/netstandard1.0/PublishTargets/Microsoft.NET.Sdk.Publish.MSDeploy.targets(139,5): error MSB4018: at (wrapper remoting-invoke-with-check) System.IO.DirectoryInfo:Create ()
    /usr/local/share/dotnet/sdk/2.0.3/Sdks/Microsoft.NET.Sdk.Publish/build/netstandard1.0/PublishTargets/Microsoft.NET.Sdk.Publish.MSDeploy.targets(139,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.3/Sdks/Microsoft.NET.Sdk.Publish/build/netstandard1.0/PublishTargets/Microsoft.NET.Sdk.Publish.MSDeploy.targets(139,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.3/Sdks/Microsoft.NET.Sdk.Publish/build/netstandard1.0/PublishTargets/Microsoft.NET.Sdk.Publish.MSDeploy.targets(139,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.3/Sdks/Microsoft.NET.Sdk.Publish/build/netstandard1.0/PublishTargets/Microsoft.NET.Sdk.Publish.MSDeploy.targets(139,5): error MSB4018: --- End of inner exception stack trace ---
    /usr/local/share/dotnet/sdk/2.0.3/Sdks/Microsoft.NET.Sdk.Publish/build/netstandard1.0/PublishTargets/Microsoft.NET.Sdk.Publish.MSDeploy.targets(139,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.3/Sdks/Microsoft.NET.Sdk.Publish/build/netstandard1.0/PublishTargets/Microsoft.NET.Sdk.Publish.MSDeploy.targets(139,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.3/Sdks/Microsoft.NET.Sdk.Publish/build/netstandard1.0/PublishTargets/Microsoft.NET.Sdk.Publish.MSDeploy.targets(139,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.3/Sdks/Microsoft.NET.Sdk.Publish/build/netstandard1.0/PublishTargets/Microsoft.NET.Sdk.Publish.MSDeploy.targets(139,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.3/Sdks/Microsoft.NET.Sdk.Publish/build/netstandard1.0/PublishTargets/Microsoft.NET.Sdk.Publish.MSDeploy.targets(139,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.3/Sdks/Microsoft.NET.Sdk.Publish/build/netstandard1.0/PublishTargets/Microsoft.NET.Sdk.Publish.MSDeploy.targets(139,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.3/Sdks/Microsoft.NET.Sdk.Publish/build/netstandard1.0/PublishTargets/Microsoft.NET.Sdk.Publish.MSDeploy.targets(139,5): error MSB4018: at (wrapper remoting-invoke-with-check) Microsoft.Win32.RegistryKey:OpenSubKey (string)
    /usr/local/share/dotnet/sdk/2.0.3/Sdks/Microsoft.NET.Sdk.Publish/build/netstandard1.0/PublishTargets/Microsoft.NET.Sdk.Publish.MSDeploy.targets(139,5): error MSB4018: at Microsoft.NET.Sdk.Publish.Tasks.MsDeploy.Utility.CheckMSDeploymentVersion () [0x0005e] in <68dc1c1b6e7f4ba19116cbf1cdf98823>:0
    /usr/local/share/dotnet/sdk/2.0.3/Sdks/Microsoft.NET.Sdk.Publish/build/netstandard1.0/PublishTargets/Microsoft.NET.Sdk.Publish.MSDeploy.targets(139,5): error MSB4018: at Microsoft.NET.Sdk.Publish.Tasks.MsDeploy.Utility.get_IsMSDeployInstalled () [0x00013] in <68dc1c1b6e7f4ba19116cbf1cdf98823>:0
    /usr/local/share/dotnet/sdk/2.0.3/Sdks/Microsoft.NET.Sdk.Publish/build/netstandard1.0/PublishTargets/Microsoft.NET.Sdk.Publish.MSDeploy.targets(139,5): error MSB4018: at Microsoft.NET.Sdk.Publish.Tasks.MsDeploy.Utility.CheckMSDeploymentVersion (Microsoft.Build.Utilities.TaskLoggingHelper log, System.String& errorMessage) [0x00003] in <68dc1c1b6e7f4ba19116cbf1cdf98823>:0
    /usr/local/share/dotnet/sdk/2.0.3/Sdks/Microsoft.NET.Sdk.Publish/build/netstandard1.0/PublishTargets/Microsoft.NET.Sdk.Publish.MSDeploy.targets(139,5): error MSB4018: at Microsoft.NET.Sdk.Publish.Tasks.MsDeploy.VSMSDeploy.Execute () [0x00034] in <68dc1c1b6e7f4ba19116cbf1cdf98823>:0
    /usr/local/share/dotnet/sdk/2.0.3/Sdks/Microsoft.NET.Sdk.Publish/build/netstandard1.0/PublishTargets/Microsoft.NET.Sdk.Publish.MSDeploy.targets(139,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.3/Sdks/Microsoft.NET.Sdk.Publish/build/netstandard1.0/PublishTargets/Microsoft.NET.Sdk.Publish.MSDeploy.targets(139,5): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder+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)

  • JohnHairJohnHair GBMember ✭✭✭✭✭

    @CodyB said:
    Hey everyone! I hope you enjoy THIS post on Azure and VS for Mac! Feel free to discuss below, and I will help out where I can :smile:

    Thanks!

    Hi Cody, any movement on other publish options for VS4Mac? Even just FTP would be a welcome start. I have already added to the uservoice, btw.

  • JeffLimJeffLim USMember ✭✭

    I am using VS for Mac. I have been followed the example from here: https://blog.xamarin.com/publish-azure-visual-studio-mac/. I have signed-in to azure (via the publish to Azure) with a wrong account. Looking for a solution of how to logout that user account from VS for Mac. Pls help.

Sign In or Register to comment.