1

I'm trying to publish a .NET 5 WPF to an Azure App Service. When I tried to publish to Azure I got an error that pointed me to https://aka.ms/vs-add-docker. The Docker support in Visual Studio section looked very promising, especially when I read this

Docker support is available for ASP.NET projects, ASP.NET Core projects, and .NET Core and .NET Framework console projects.

(Emphasis mine). However, I'm not seeing how I can add Docker support to my .NET 5 WPF app. Is it possible to do so or have I misunderstood the linked document?

Addendum

I am not trying to "dockerize" the WPF app. According to the linked document I gave, Docker is required to publish the WPF application installer. My intent is to publish the WPF installer to an Azure App Service. Then the users can go to the URL, click on the link to run the ClickOnce installer. That will install it on their Windows machine. From that point forward the user is running the WPF locally on their machine. I'm going with how I understand the link I provided, which is what I was directed to by VS 2019 when I tried publishing the WPF app to the Azure App Service, and it failed. Perhaps the error message taht VS 2019 gave me isn't appropriate to publishing a WPF app to an Azure App Service. I don't know; I'm just following where the error message directed me to go.

Rod
  • 4,107
  • 12
  • 57
  • 81
  • 2
    How would a WPF/Gui application run in either azure app service or docker? I'm confused – pinkfloydx33 Jun 16 '21 at 22:27
  • 1
    Does this answer your question? [dockerize a wpf application and use it](https://stackoverflow.com/questions/44502886/dockerize-a-wpf-application-and-use-it) – Timothy G. Jun 16 '21 at 22:42
  • @TimothyG. I'm not interested in "dockerizing" our WPF app. The Microsoft link I gave said that deploying the WPF installer to an Azure App Service required Docker. The users at work would go to the App Service, then run the installer from there. After that, the WPF app will run locally on the user's machine. – Rod Jun 17 '21 at 19:42
  • @Rod after your edit, I see what you are saying now. What is the exact error message you get? Or is it just your typical "see this link" error Microsoft loves to use? – Timothy G. Jun 17 '21 at 19:56
  • Where does it say Docker is required to deploy a WPF app via ClickOnce? – mason Jun 17 '21 at 19:57
  • @TimothyG. it really is a "see this link" thing in the error message. And I can see how I should have changed the title of this post. It should read something like, "How do I add Doctor support to the installer of a WPF .NET Core 5 app?". I'm sorry for the confusion by not being clearer in the title. – Rod Jun 17 '21 at 20:55
  • @mason, I'm taking that it requires Docker, because of the error message I got when I tried to publish the app to an Azure App Service. The error message VS 2019 gave me that link. I couldn't understand why I'd need Docker, but when I've ignored the advise in the "see this link" error message before, more often than not I should have paid attention to the link. – Rod Jun 17 '21 at 20:57
  • @mason Docker is mentioned in the Prerequisites. section of the page I linked to. – Rod Jun 17 '21 at 21:07
  • Docker is listed as a prerequisite on that page because that page is specifically about deploying containerized applications. You are not deploying a containerized application, therefore you do not need to follow the directions on that page. You are trying to deploy a WPF app delivered by ClickOnce. Docker is not necessary in that scenario. – mason Jun 17 '21 at 22:54
  • [The directions](https://learn.microsoft.com/en-us/azure/app-service/quickstart-dotnetcore?tabs=net50&pivots=development-environment-vs#publish-your-web-app) explain how to deploy a .NET 5 web application to Azure App Service. Notice Docker isn't necessary. – mason Jun 17 '21 at 22:59

0 Answers0