'runtimes' Folder after Publishing a .Net Core App to Azure Publish Via VS Online

What is the purpose of the 'runtimes' folder that gets published along with all my project files? I have a VS Online account, and have the build/deploy process configured through there. The 'runtimes' folder is certainly not a folder that exists in source control or my project folder.

'runtimes' folder contents:

'runtimes' folder contents

example contents:

example contents

Thanks,
Drew


Like @Gregory_Ott I was facing a similar issue where my deployment was an FDD deployment and the 'runtimes' folder was still being created. All I did was, mentioned the runtime and set the self-contained property to false. In the following example I have used dotnet to publish:

dotnet publish -c Release -o ..\publish --runtime win-x64 --self-contained false

The following link should help you with the deployment: https://docs.microsoft.com/en-us/dotnet/core/deploying/deploy-with-cli


These exist because you are building your application as a self contained application as opposed to one that is dependent upon the framework being installed on the machine executing it. Documentation can be found at https://docs.microsoft.com/en-us/dotnet/articles/core/deploying/ describing the various options that can be used to control this output.


FWIW, I was facing this situation with a .NET 5 application. An empty "runtimes" project was there in the output directory. After wasting a few minutes I realized that the folder was a left-over from a previous build. I deleted bin/obj folders completely and published again and the "runtimes" folder is no longer there in the output. I didn't have to change anything in the project file or build options. Hope it saves someone else a few minutes too.