Skip to content

Commit 18b5a89

Browse files
authored
Merge pull request #4471 from mrlacey/i4468-ContribDoc
Add note about working with the shared extension code
2 parents 891cb35 + 40cbf72 commit 18b5a89

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

CONTRIBUTING.md

+9-1
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ Composition templates are just like other templates except that they include a `
100100
}
101101
}
102102
```
103+
103104
In the above example, you can see from the `ts.compositionFilter` tag that this template will be applied when the selected frontend framework (`$frontendframework`) is `MVVMToolkit`, the selected project type is `Blank` (`$projectType`), and the template being processed is of type `project` (`ts.type`). The matching template that satisfies these conditions is below.
104105

105106
```json
@@ -163,6 +164,7 @@ Merge post action files use pattern matching and special comments to identify a
163164
<!--}--}-->
164165
</PropertyGroup>
165166
```
167+
166168
The above merge post action file would search for the `EnablePreviewMsixTooling` property and then remove `<WindowsPackageType>None</WindowsPackageType>` found after that location by surrounding the line to remove with XML comments that use the `{--{` and `}--}` syntax. This syntax indicates that the content within the comment should be removed from the original file. See https://github.com/microsoft/CoreTemplateStudio/blob/dev/docs/templates.md#post-actions for more details on merge post action syntax as well as other types of post actions that can change the output after generation has occurred.
167169

168170
### Modifying the Wizard
@@ -181,6 +183,12 @@ The Template Studio wizard enables developers to produce a custom project templa
181183

182184
Note: Composition filters within the _comp folder do not alter the wizard. They only modify the base templates based on the options selected in the wizard.
183185

186+
## Updating the shared code
187+
188+
The displayed wizard and the logic that generates an app from the selected templates is in the `SharedFunctionality.UI` and `SharedFunctionality.Core` projects. If wanting to work on these it is important to be working in the `TemplateStudio.sln` file and not a `*.slnf` file. You should also use the `DebugAll` configuration as this ensures that all projects are compiled, which is important as these shared projects are included in all the extensions. Switch to using a configuration specific to the extension you are testing when wanting to debug any changes.
189+
190+
It may also be useful to note that because of the limited support for working with XAML files inside a shared project used by an extension, you may get misleading compilation errors if you have any of the `.xaml` files open in the editor when compiling. Simply close the file(s) and any spurious errors will go away.
191+
184192
## Validating changes
185193

186194
F5 or start without debugging to launch the extensions in the Visual Studio Experimental Instance and validate changes. Once the Experimental Instance is loaded, create a new project and select the appropriate `Template Studio for *` template.
@@ -203,4 +211,4 @@ In addition to ensuring all extensions build successfully, the CI pipelines run
203211

204212
The pull request template lists additional considerations when modifying templates. Ensure all considerations are accounted for in your changes and update the pull request description accordingly.
205213

206-
Once all required tests pass and the changes are approved, the pull request will be merged.
214+
Once all required tests pass and the changes are approved, the pull request will be merged.

0 commit comments

Comments
 (0)