Skip to content

Commit 6526e5a

Browse files
authored
docs: Add binding redirects doc for .NET framework (#1414)
1 parent a54980d commit 6526e5a

File tree

4 files changed

+16
-4
lines changed

4 files changed

+16
-4
lines changed

docs/cicd/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ variables:
2525
2626
Enable Bitbucket Pipelines as usual on the **Repository settings → Pipelines → Settings** page. After enabling your pipeline, replace the contents of the `bitbucket-pipelines.yml` file, located at the root of your repository, with the following:
2727

28-
```yml
28+
```yml title="bitbucket-pipelines.yml file"
2929
image: mcr.microsoft.com/dotnet/sdk:8.0
3030
options:
3131
docker: true
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Running inside another container
1+
# Running inside a container
22

3-
## 'Docker wormhole' pattern - Sibling Docker containers
3+
## 'Docker Wormhole' pattern - Sibling Docker containers
44

55
### Docker-only example
66

docs/full_framework/index.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# .NET Framework
2+
3+
When working with older versions of the .NET Framework (e.g., .NET Framework 4.x), you may encounter issues related to assembly binding conflicts. These conflicts typically occur when your application requires specific versions of assemblies that are different from the versions being loaded at runtime.
4+
5+
To resolve these conflicts and ensure the correct versions of assemblies are used, binding redirects are often necessary. Binding redirects allow you to specify which version of an assembly should be used by the runtime, preventing errors and version mismatches during execution.
6+
7+
Testcontainers for .NET relies on several external dependencies, which may require different versions of assemblies. Legacy applications or projects targeting the full .NET Framework may not automatically resolve these dependencies correctly, and without binding redirects, runtime errors or unexpected behavior may occur.
8+
9+
In executable .NET Framework projects (such as console apps, web apps, etc.), Visual Studio typically handles binding redirects automatically. However, this is not the case for class libraries or test projects.
10+
11+
For **test projects**, binding redirects are **not automatically added** by Visual Studio, which means you may need to manually configure them in the `App.config` file (or enable [`AutoGenerateBindingRedirects`](https://learn.microsoft.com/dotnet/framework/configure-apps/redirect-assembly-versions#rely-on-automatic-binding-redirection)).

mkdocs.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,10 @@ nav:
4141
- api/resource_reuse.md
4242
- api/wait_strategies.md
4343
- api/best_practices.md
44+
- dind/index.md
45+
- full_framework/index.md
4446
- test_frameworks/xunit_net.md
4547
- Examples:
46-
- examples/dind.md
4748
- examples/aspnet.md
4849
- Modules:
4950
- modules/index.md

0 commit comments

Comments
 (0)