Skip to content

Commit 1b6f13d

Browse files
authored
Add docs on HelixContent property (#21595)
* Add docs on HelixContent property * Add content on Link and LinkBase attributes
1 parent 72bfa8f commit 1b6f13d

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

docs/Helix.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,25 @@ dotnet vstest My.Tests.dll
4949
If that doesn't help, you can try the Get Repro environment link from mission control and try to debug that way.
5050

5151
## Differences from running tests locally
52-
Most tests that don't just work on helix automatically are ones that depend on the source code being accessible. The helix payloads only contain whatever is in the publish directories, so any thing else that test depends on will need to be included to the payload (TBD how to do this).
52+
Most tests that don't just work on helix automatically are ones that depend on the source code being accessible. The helix payloads only contain whatever is in the publish directories, so any thing else that test depends on will need to be included to the payload.
53+
54+
This can be accomplished by using the `HelixContent` property like so.
55+
56+
```
57+
<ItemGroup>
58+
<HelixContent Include="$(RepoRoot)src\KeepMe.js"/>
59+
<HelixContent Include="$(RepoRoot)src\Project\**"/>
60+
</ItemGroup>
61+
```
62+
63+
By default, these files will be included in the root directory. To include these files in a different directory, you can use either the `Link` or `LinkBase` attributes to set the included path.
64+
65+
```
66+
<ItemGroup>
67+
<HelixContent Include="$(RepoRoot)src\KeepMe.js" Link="$(MSBuildThisFileDirectory)\myassets\KeepMe.js"/>
68+
<HelixContent Include="$(RepoRoot)src\Project\**" LinkBase="$(MSBuildThisFileDirectory)\myassets"/>
69+
</ItemGroup>
70+
```
5371

5472
## How to skip tests on helix
5573
There are two main ways to opt out of helix

0 commit comments

Comments
 (0)