SQLitePCL.raw: e_sqlite3.dll should not be copied to the publish output

Following up to #140, this dll should not be put into the publish output. This can be achieved by adding the CopyToPublishDirectory property and setting it to Never i.e.

      <Content Include="$(MSBuildThisFileDirectory)..\runtimes\win7-x86\native\e_sqlite3.dll">
        <Link>x86\e_sqlite3.dll</Link>
        <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
        <Pack>false</Pack>
        <CopyToPublishDirectory>Never</CopyToPublishDirectory>
      </Content>
      <Content Include="$(MSBuildThisFileDirectory)..\runtimes\win7-x64\native\e_sqlite3.dll">
        <Link>x64\e_sqlite3.dll</Link>
        <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
        <Pack>false</Pack>
        <CopyToPublishDirectory>Never</CopyToPublishDirectory>
      </Content>

Note that this target is only needed for apps targeting .NET Framework and does not apply to apps targeting .NET Core. As such the target file should be moved to a subdirectory specific to .NET Framework:

nupkg_root
\_ build
  \_ net45 (or the lowest supported .NET Framework version)
    \_ SQLitePCLRaw.lib.e_sqlite3.v110_xp.targets
\_ SQLitePCLRaw.lib.e_sqlite3.v110_xp.nuspec
\_ ... other files

This will probably also require a <dependencies>Any</dependencies> attribute in the .nuspec file. @natemcmaster has more context on this.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 18 (7 by maintainers)

Commits related to this issue

Most upvoted comments

Maybe today. Hopefully Monday worst case. I was testing yesterday to make sure I didn’t break anything.