The Muffin Man
The Muffin Man

Reputation: 20004

Publishing my ASP.NET MVC project doesn't publish all necessary files

I'm using the publishing wizard and it published all of the necessary files except for my Controllers folder. I was under the assumption that I need a controller.

I have navigated to Package/Publish Web setting, do I need to tweak anything in here? I'm guessing this isn't set up properly out of the box. If I change the drop down to publish all files in this folder/solution will it try to upload all the referenced DLLs that don't need to be copied to the server?

Upvotes: 0

Views: 1973

Answers (2)

rcravens
rcravens

Reputation: 8390

The controller and model code is compiled into the web site dll. The views are deployed in their folders.

Upvotes: 1

Craig
Craig

Reputation: 4383

In ASP.NET web projects, including MVC projects, .cs files (controllers in this case) are compiled into the /bin/[your.project].dll assembly when you do a Build or Publish.

So you don't need to publish/copy .cs files.

Upvotes: 3

Related Questions