I made a small ASP.NET Core (2.0) project, which I thought would output files the same way the old ASP.NET 5 would - but apparently not.
In the old days I would get a web.config
, a bin/
with my .dll
s, and what else I needed when I deployed to my server.
With the new project I still get a web.config
, but all of my dependencies is laying right next to it.
I tried changing the /p:WebPublishMethod
from FileSystem
to Package
, and MSDeploy
but still no /bin
-folder for me.
How come all my files are in the root of my publish folder?
It's probably likely that there is an issue with dotnet on your path variable. Go to your system variables and add C:\Program Files\dotnet\ to path. It should fix the issue if you had the same problem as me.
In order to add the wwwroot folder, right-click on the project and then select add => new folder option and then provide the folder name as wwwroot.
The Bin folder is used for managed-code assemblies, not for native-code (unmanaged-code) assemblies. For more information, see Loading C++ Assemblies in ASP.Net. In ASP.NET 2.0 and later versions, you can put strong-named (signed) assemblies in the Bin folder.
With Visual Studio Publish Tool, we can easily deploy our .NET Core app to different targets. In this article, we published ASP.NET Core Web App to a Local Folder. After we choose the publishing method, we can set various settings such as Deployment mode, Configuration, and Target runtime.
The publish items are computed (the files that are needed to publish). The project is published (the computed files are copied to the publish destination). When an ASP.NET Core project references Microsoft.NET.Sdk.Web in the project file, an app_offline.htm file is placed at the root of the web app directory.
There is no bin folder simply because there does not need to be one. It’s the published output, not just intermediary build output. All the files within the publish directory are required to host your application.
The app is published to a folder. The folder's contents are moved to the IIS site's folder (the Physical path to the site in IIS Manager). Right-click on the project in Solution Explorer and select Publish. In the Pick a publish target dialog, select the Folder publish option. Set the Folder or File Share path.
Publishing an ASP.NET Core project will create an output structure that can be deployed as it is. The output format is suitable for self-hosting and to be hosted through IIS.
There is no bin
folder simply because there does not need to be one. It’s the published output, not just intermediary build output. All the files within the publish directory are required to host your application.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With