aspnet / Templates

This repo is OBSOLETE - please see the README file for information
Other
150 stars 57 forks source link

Exclude _references.js artifact from publish #676

Closed scottaddie closed 7 years ago

scottaddie commented 8 years ago

A _references.js file is included in the "Web Application" project template's wwwroot folder. It's currently being published with the application artifacts; however, it provides no value outside of the IDE. I was going to submit a PR for this, but I know that things are shifting from project.json back to the MSBuild/csproj world. To resolve this issue in project.json, the following could be added to the publishOptions property:

    "exclude:": [
      "wwwroot/_references.js"
    ],

Can this minor tweak be addressed when things are migrated back to csproj?

mlorbetske commented 8 years ago

@phenning let's add this to the globbing patterns in the template to remove the CopyToPublish metadata

eriksendc commented 8 years ago

Hi All,

Just wanted to give a +1 to the general idea of not publishing this artifact by default (when creating a new project from scratch). We're in the process of upgrading from rc1 to 1.0.1 RTM and hit this. We'll use the "exclude" section as mentioned above for now. Thanks for having this issue out there, and thank goodness for Google! :)

It'd be great to get an announcement once we change from excluding via project.json to the csproj.

Thanks! -Brian Eriksen

mlorbetske commented 7 years ago

Just merged the PR to exclude this from publish by default. Thanks for pointing this out! This change should be available in the next release of Visual Studio 2017