R4D4
R4D4

Reputation: 1402

Trimming the output of publishing

I've got a basic ASP.NET Web Application with the following publish settings:

While the publish does work as expected, it seems to publish quite a bit of extra baggage.

\bin
    Web.config
    Web.Debug.config
    Web.Release.config
    WebServer.dll
\Properties
    AssemblyInfo.cs
    \PublishProfiles
        Release.pubxml
MyWebForm.aspx
MyWebForm.aspx.cs
MyWebForm.aspx.designer.cs
Web.config
Web.Debug.config
Web.Release.config
WebServer.csproj
WebServer.csproj.user

Out of all this, I'm able to remove everything but the following:

\bin
    WebServer.dll
MyWebForm.aspx
MyWebForm.aspx.cs
MyWebForm.aspx.designer.cs
Web.config

So, my question is two-fold:

Upvotes: 1

Views: 83

Answers (1)

R4D4
R4D4

Reputation: 1402

I'm not sure as to the reason behind the publish option is publishing the unrequired files, but it seems there is a very easy way to stop it. In the properties of the project under the option "Package/Publish Web" there is a group "Items to deploy", where I am able to select "Only the files required to run the project".

Upvotes: 1

Related Questions