Exclude files from deployment

cristiz1992's Avatar

cristiz1992

25 Aug, 2017 12:14 PM

Hello,

I need to exclude the "src" folder from the deployment process as it's not required. I am using webpack to build the client side. Any request to those files will result in errors because they require files which are downloaded on build time. I've used the following code in csproj file:

<ItemGroup>
    <ExcludeFromPackageFolders Include="src">
      <FromTarget>MovieWatcher.Web.wpp.targets</FromTarget>
    </ExcludeFromPackageFolders>
  </ItemGroup>
The above code works only if I publish with VS2015, on AppHarbor it has no effect.
  1. 1 Posted by Vladut on 25 Aug, 2017 10:10 PM

    Vladut's Avatar

    I had the same problem. Just in case you find a solution please let me know. Thanks

  2. Support Staff 2 Posted by rune on 01 Sep, 2017 02:45 PM

    rune's Avatar

    Hi,

    Apologies for the delay -- I'm not quite sure I understand the issue/use case for this, but it seems you (cristiz1992) may have resolved it in the meantime? It's likely that there will be some differences from the built-in Visual Studio publish feature as that use MSDeploy in some cases whereas AppHarbor will use vanilla MSBuild, which may not always invoke the same targets and use the same configuration as publish profiles in Visual Studio.

    Also, I haven't heard of this issue before and since you both experience this issue I was wondering if you have the steps to reproduce the issue? For instance, is this an issue with new Visual Studio template/project types or?

    Best,
    Rune

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac