Skip to content

Native dlls copied to the bin folder on build #1089

@uluhonolulu

Description

@uluhonolulu

Recent libgit2sharp Nuget uses a new Nuget feature that allows you to include a piece of a build script in your NuGet.

It worked great on my dev machine, but when I deployed it to AppHarbor, the native dlls appeared in the /bin folder (in addition to the target subfolder), which caused my app to fail.

The problem lies in the _CopyWebApplicationLegacy target, which does not execute locally (it's run only if you have a non-default output dir), thus I don't have this problem on my dev machine. Namely, it executes the following piece of code:

<!-- Copy items that have been marked to be copied to the bin folder -->
<Copy SourceFiles="@(_SourceItemsToCopyToOutputDirectory)" 
      DestinationFolder="$(WebProjectOutputDir)\bin" 
      SkipUnchangedFiles="true" 
      Retries="$(CopyRetryCount)"
      RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"/>

You can see that the target folder is always /bin -- I believe it's a bug in the Microsoft.WebApplication.targets file (I can't control it on the target machine).

I had to fix it by adding a postbuild task that removed the files from the bin folder.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions