testcontainers / testcontainers-dotnet

A library to support tests with throwaway instances of Docker containers for all compatible .NET Standard versions.
https://dotnet.testcontainers.org
MIT License
3.65k stars 250 forks source link

chore: Use relative ProjectReference paths instead of $(SolutionDir) #1094

Closed 0xced closed 5 months ago

0xced commented 5 months ago

What does this PR do?

This pull request replaces all usage of $(SolutionDir) with relative paths instead.

Why is it important?

When using Testcontainers project directly from source, using $(SolutionDir) interferes since the $(SolutionDir) will be defined for the currently opened solution instead of Testcontainers.sln. Using relative paths work both for Testcontainers.sln and MyApp.sln. Using Testcontainers direclty from source is required to test bleeding edge feature such as WithReuse(true) which was introduced a few days ago.

[!NOTE]
directly from source means using

<ProjectReference Include="..\..\testcontainers-dotnet\src\Testcontainers.PostgreSql\Testcontainers.PostgreSql.csproj" />

instead of

<PackageReference Include="Testcontainers.PostgreSql" Version="3.7.0" />

Related issues

None

netlify[bot] commented 5 months ago

Deploy Preview for testcontainers-dotnet ready!

Name Link
Latest commit ca6f7a65247bbe553139a17b2173619b90f9a3f7
Latest deploy log https://app.netlify.com/sites/testcontainers-dotnet/deploys/65aeff6fe56c580008c6a7b8
Deploy Preview https://deploy-preview-1094--testcontainers-dotnet.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.