Skip to content

A bug in SourceGear.sqlite3.3.50.4.5, to place e_sqlite3.dll in a wrong directory #658

Description

@viruscamp

It's a bug in SourceGear.sqlite3.3.50.4.5, one dependency of this lib.

With old style msbuild csproj, and place *.sln and *.csproj in the same directory.
Like this, It will place e_sqlite3.dll in a wrong directory.

WindowsFormsApp4\
	WindowsFormsApp4.sln
	packages\SourceGear.sqlite3.3.50.4.5\...
	WindowsFormsApp4.csproj
	bin\x64\Debug\
		WindowsFormsApp4.exe
		packages\SourceGear.sqlite3.3.50.4.5\runtimes\win-x64\native\e_sqlite3.dll

When we place *.sln and *.csproj in different directories, It's right.

WindowsFormsApp4\
	WindowsFormsApp4.sln
	packages\SourceGear.sqlite3.3.50.4.5\...
	WindowsFormsApp4\
		WindowsFormsApp4.csproj
		bin\x64\Debug\
			WindowsFormsApp4.exe
			e_sqlite3.dll

The bug is from SourceGear.sqlite3.targets file

  <ItemGroup Condition=" '$(RuntimeIdentifier)' == '' AND '$(OS)' == 'Windows_NT' AND '$(Platform)' == 'x64' ">
    <Content Include="$(MSBuildThisFileDirectory)..\..\runtimes\win-x64\native\e_sqlite3.dll">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
      <Pack>false</Pack>
    </Content>
  </ItemGroup>

should be, to use runtimes dir

  <ItemGroup Condition=" '$(RuntimeIdentifier)' == '' AND '$(OS)' == 'Windows_NT' AND '$(Platform)' == 'x64' ">
    <Content Include="$(MSBuildThisFileDirectory)..\..\runtimes\win-x64\native\e_sqlite3.dll">
      <Link>runtimes\win-x64\native\e_sqlite3.dll</Link>
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
      <Pack>false</Pack>
    </Content>
  </ItemGroup>

or , to keep the old version structure

  <ItemGroup Condition=" '$(RuntimeIdentifier)' == '' AND '$(OS)' == 'Windows_NT' AND '$(Platform)' == 'x64' ">
    <Content Include="$(MSBuildThisFileDirectory)..\..\runtimes\win-x64\native\e_sqlite3.dll">
      <TargetPath>e_sqlite3.dll</Link>
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
      <Pack>false</Pack>
    </Content>
  </ItemGroup>

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions