I've got a .NET 5 web api I'm trying to get deployed (for development/staging) on a local IIS. I've actually been doing this just fine for a couple of years now, but something changed and now it isn't deploying. The web deploy succeeds (according to Visual Studio), but instead of putting the files in the IIS website folder, it puts all of the files in the VS project folder. It literally fills up my project folder with .dlls that are meant for the target deployment folder.
For example, in my Build/Output window:
Adding file (devapi.mysite.com\api-ms-win-core-console-l1-1-0.dll).
Adding file (devapi.mysite.com\api-ms-win-core-console-l1-2-0.dll).
Adding file (devapi.mysite.com\api-ms-win-core-datetime-l1-1-0.dll).
(and a few hundred more...)
I am unsure of what change caused the web deploy to fail. I recently updated Visual Studio to 16.11.11 and also updated several of my NuGet packages.
Searches (at least mine anyway) didn't come up with any solution. I did verify that I had everything in place by referencing this doc:
And as I said, Visual Studio reports that the publish was successful:
But upon deploy, I get 503 Service Unavailable from IIS.
No clue how this got changed... In IIS, go to your website, click on "Basic Settings...", and check the Physical path. Mine had somehow been reset to my project folder instead of the inetpub web deploy folder. Problem solved.