Skip to content

Commit 7e05ac8

Browse files
authored
Merge pull request #10520 from MicrosoftDocs/repo_sync_working_branch
Confirm merge from repo_sync_working_branch to main to sync with https://github.com/MicrosoftDocs/visualstudio-docs (branch main)
2 parents ebec55f + a1807be commit 7e05ac8

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

docs/extensibility/creating-an-options-page.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,29 @@ This walkthrough creates a simple Tools/Options page that uses a property grid t
265265

266266
A message box displays the current value of `OptionInteger`.
267267

268+
## Open options page
269+
270+
In this section, you'll add a Command and an event for the button to open the options page
271+
272+
1. First add a file called OpenPageCommand.cs.
273+
274+
3. Then, open *OpenPageCommand.cs* and change your Execute method.
275+
276+
```csharp
277+
private void Execute(object sender, EventArgs e)
278+
{
279+
ThreadHelper.ThrowIfNotOnUIThread();
280+
Type optionsPageType = typeof(OptionPageCustom);
281+
Instance.package.ShowOptionPage(optionsPageType);
282+
}
283+
```
284+
285+
3. Run the project, then click the Invoke button (it is under the Tool option by default), then you can see your options page is opened.
286+
287+
5. More details about opening options page can refer to the following documents
288+
289+
- [Opening an Options Page](/previous-versions/cc826083(v=vs.140))
290+
268291
## See also
269292

270293
- [Options and options pages](../extensibility/internals/options-and-options-pages.md)

docs/msbuild/customize-your-build.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,14 @@ Files generated during execution don't exist during the evaluation phase, theref
203203
<!-- Generated files should be placed in $(IntermediateOutputPath) -->
204204

205205
<ItemGroup>
206+
<!-- If your generated file was placed in `obj\` -->
206207
<None Include="$(IntermediateOutputPath)my-generated-file.xyz" CopyToOutputDirectory="PreserveNewest"/>
208+
<!-- If you know exactly where that file is going to be, you can hard code the path. -->
209+
<None Include="some\specific\path\my-generated-file.xyz" CopyToOutputDirectory="PreserveNewest"/>
210+
211+
<!-- If you want to capture "all files of a certain type", you can glob like so. -->
212+
<None Include="some\specific\path\*.xyz" CopyToOutputDirectory="PreserveNewest"/>
213+
<None Include="some\specific\path\*.*" CopyToOutputDirectory="PreserveNewest"/>
207214
</ItemGroup>
208215
</Target>
209216
```

0 commit comments

Comments
 (0)