Unknown developer
Unknown developer

Reputation: 5960

Deploy ASP.NET Core project in local folder

I have an ASP.NET Core 2 web application developed in VS 2017. I just tried to publish it in a local folder via VS 2017. Now, I have a local folder with my application stuff and some things need clarification:

  1. The files created inside the folder are exactly the same with those which should be created if we deploy in Azure?
  2. web.config file has been created after deployment while there was not such a file in the development phase. Why?
  3. How may I run this deployed project? There are a lot of .dll files.

I am new to .NET world and I want to understand some things.

Upvotes: 0

Views: 1186

Answers (1)

Chris Pratt
Chris Pratt

Reputation: 239430

The result of publishing an ASP.NET Core app, is mostly just the result of building, i.e. everything gets compiled to DLLs. There is no difference here deploying to IIS or Azure.

The Web.config is added for the sake of IIS. If you open it up, you'll see it's very light on the actual configuration. It mostly just directs IIS to run the app using dotnet.exe. ASP.NET Core doesn't utilize Web.config, relying instead on various configuration providers, and principally among those, appsettings.json.

The easiest way to run the app is just:

dotnet MyApp.dll

In a console window. The DLL should be that of the main application, which will have the same name as your project.

Upvotes: 1

Related Questions