Reputation: 749
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?
Upvotes: 11
Views: 9235
Reputation: 799
I'm just switching a website over to VS2019 from VS2017, and having the same issue. I discovered that VS2019 has totally new publish settings, and these don't seem to be initialised properly when coming over from VS2017. Instead of precompiling, the publish happens with all the .aspx.cs files not compiled.
To fix it, follow these steps...
Now it's like it was in VS2017, with a bin directory of dll files.
Upvotes: 0
Reputation: 388023
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.
Upvotes: 9