Skip to content

Commit 893d712

Browse files
authored
Merge pull request #11024 from MicrosoftDocs/main638919308133269469sync_temp
Repo sync for protected branch
2 parents aaa949c + a3c0599 commit 893d712

File tree

6 files changed

+74
-20
lines changed

6 files changed

+74
-20
lines changed

docs/deployment/how-to-include-a-data-file-in-a-clickonce-application.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ Each ClickOnce application you install is assigned a data directory on the desti
3838

3939
If you added an XML file named `Data.xml`, the file will look similar to the following code example.
4040

41-
`<file name="Data.xml" hash="23454C18A2DC1D23E5B391FEE299B1F235067C59" hashalg="SHA1" asmv2:size="39500" />`
41+
`<file name="Data.xml" hash="AA11BB22CC33DD44EE55FF66AA77BB88CC99DD00" hashalg="SHA1" asmv2:size="39500" />`
4242

4343
4. Add the attribute `type` to this element, and supply it with a value of `data`.
4444

45-
`<file name="Data.xml" writeableType="applicationData" hash="23454C18A2DC1D23E5B391FEE299B1F235067C59" hashalg="SHA1" asmv2:size="39500" />`
45+
`<file name="Data.xml" writeableType="applicationData" hash="AA11BB22CC33DD44EE55FF66AA77BB88CC99DD00" hashalg="SHA1" asmv2:size="39500" />`
4646

4747
5. Re-sign your application manifest by using your key pair or certificate, and then re-sign your deployment manifest.
4848

@@ -79,4 +79,4 @@ Each ClickOnce application you install is assigned a data directory on the desti
7979
You must re-sign your deployment manifest because its hash of the application manifest has changed.
8080

8181
## Related content
82-
- [Access local and remote data in ClickOnce applications](../deployment/accessing-local-and-remote-data-in-clickonce-applications.md)
82+
- [Access local and remote data in ClickOnce applications](../deployment/accessing-local-and-remote-data-in-clickonce-applications.md)

docs/ide/how-to-locate-and-organize-project-and-item-templates.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ ms.subservice: general-ide
1919

2020
When template files are placed in a known location, Visual Studio can locate the files and make them available for creating new projects and new items. Templates provide a convenient way to create applications, access class libraries, implement unit tests, and set up configuration files.
2121

22-
Installed templates and user templates (*.vstemplate* files) are stored in different locations. You can also customize the locations with Visual Studio options.
22+
Installed templates and user templates (`.vstemplate` files) are stored in different locations. You can also customize the locations with Visual Studio options.
2323

2424
This article describes the template file locations recognized by Visual Studio.
2525

@@ -52,7 +52,7 @@ For example, the following directory has the Visual Basic item templates for Eng
5252

5353
## Location for user templates
5454

55-
When you add a compressed (*.zip*) file that includes a *.vstemplate* file to the user template directory, Visual Studio makes the template available in the **New project** and **New item** dialogs. By default, user templates are placed in the following locations:
55+
When you add a compressed (`.zip`) file that includes a `.vstemplate` file to the user template directory, Visual Studio makes the template available in the **New project** and **New item** dialogs. By default, user templates are placed in the following locations:
5656

5757
::: moniker range="vs-2019"
5858

docs/msbuild/build-process-overview.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: How MSBuild builds projects
33
description: Discover how MSBuild processes your project files, whether you invoke the build tool from Visual Studio or from a command line or script.
4-
ms.date: 3/10/2025
4+
ms.date: 8/14/2025
55
ms.topic: overview
66
helpviewer_keywords:
77
- MSBuild, build process overview
@@ -13,9 +13,15 @@ ms.custom: peer-review-program
1313
---
1414
# How MSBuild builds projects
1515

16-
How does MSBuild actually work? In this article, you'll learn how MSBuild processes your project files, whether invoked from Visual Studio, or from a command line or script. Knowing how MSBuild works can help you better diagnose problems and better customize your build process. This article describes the build process and is largely applicable to all project types.
16+
MSBuild is Microsoft's build engine that is used to build most Visual Studio projects. MSBuild invokes compilers and other tools to build your code, but also includes flexible configuration and customization options, and infrastructure for creating not just compiled binaries, but also a wide range of other output artifacts. MSBuild is very configurable and customizable, but to get the most out of this customizability, it's important to understand how MSBuild works. In this article, you'll learn how MSBuild processes your project files, whether invoked from Visual Studio, or from a command line or script. Knowing how MSBuild works can help you better diagnose problems and better customize your build process. This article describes the build process and is largely applicable to all project types.
1717

18-
The complete build process consists of [initial startup](#startup), [evaluation](#evaluation-phase), and [execution](#execution-phase) of the targets and tasks that build the project. In addition to these inputs, external imports define the details of the build process, including both [standard imports](#standard-imports) such as *Microsoft.Common.targets* and [user-configurable imports](#user-configurable-imports) at the solution or project level.
18+
The complete build process consists of
19+
20+
- [initial startup](#startup) - the processing of command-line options.
21+
- [evaluation](#evaluation-phase) - the interpretation and processing of the text of the MSBuild project file.
22+
- [execution](#execution-phase) - runs the targets and tasks that build the project.
23+
24+
In addition to the source files and other input artifacts, external imports define the details of the build process, including both [standard imports](#standard-imports) such as *Microsoft.Common.targets* and [user-configurable imports](#user-configurable-imports) at the solution or project level.
1925

2026
## Startup
2127

docs/msbuild/customize-builds-for-generated-files.md

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Handle generated files in a build
33
description: Customize MSBuild project files in Visual Studio so that files generated during the build process are included in build output.
4-
ms.date: 02/28/2023
4+
ms.date: 8/5/2025
55
ms.topic: how-to
66
helpviewer_keywords:
77
- MSBuild, transforms
@@ -22,22 +22,55 @@ Files generated during execution don't exist during the evaluation phase, theref
2222

2323
<!-- Some logic that generates your file goes here -->
2424
<!-- Generated files should be placed in $(IntermediateOutputPath) -->
25+
<WriteLinesToFile
26+
File="$(IntermediateOutputPath)GeneratedFile.cs"
27+
Lines='enum MyEnum { A, B }'
28+
Overwrite="true" />
29+
<ItemGroup>
30+
<Compile Include="$(IntermediateOutputPath)GeneratedFile.cs" />
31+
</ItemGroup>
2532

2633
<ItemGroup>
2734
<!-- If your generated file was placed in `obj\` -->
28-
<None Include="$(IntermediateOutputPath)my-generated-file.xyz" CopyToOutputDirectory="PreserveNewest"/>
35+
<None Include="$(IntermediateOutputPath)GeneratedFile.cs" TargetPath="GeneratedFile.cs" CopyToOutputDirectory="PreserveNewest"/>
2936
<!-- If you know exactly where that file is going to be, you can hard code the path. -->
30-
<None Include="some\specific\path\my-generated-file.xyz" CopyToOutputDirectory="PreserveNewest"/>
37+
<None Include="some\specific\path\my-generatedfile" CopyToOutputDirectory="PreserveNewest"/>
3138

3239
<!-- If you want to capture "all files of a certain type", you can glob like so. -->
3340
<None Include="some\specific\path\*.xyz" CopyToOutputDirectory="PreserveNewest"/>
3441
<None Include="some\specific\path\*.*" CopyToOutputDirectory="PreserveNewest"/>
3542
</ItemGroup>
3643
</Target>
44+
45+
<Target Name="CleanGeneratedCode" AfterTargets="CoreClean">
46+
<Delete Files="$(IntermediateOutputPath)GeneratedFile.cs" />
47+
</Target>
3748
```
3849

3950
Adding your generated file to `None` or `Content` is sufficient for the build process to see it. You also want to ensure it gets added at the right time. Ideally, your target runs before `BeforeBuild`. `AssignTargetPaths` is another possible target, as it is the final opportunity to modify `None` and `Content` items (among others) before they are transformed into new items. See [Common Item Types](common-msbuild-project-items.md).
4051

52+
Copy the above, paste it into a file, and call it `buildcodegen.targets`. Then, run `dotnet new console`, import the file, and build it to see how it works.
53+
54+
```xml
55+
<Project Sdk="Microsoft.NET.Sdk">
56+
<Import Project="buildcodegen.targets"/>
57+
<PropertyGroup>
58+
<OutputType>Exe</OutputType>
59+
<TargetFramework>net9.0</TargetFramework>
60+
<ImplicitUsings>enable</ImplicitUsings>
61+
<Nullable>enable</Nullable>
62+
</PropertyGroup>
63+
</Project>
64+
```
65+
66+
Run *msbuild.exe* and look at the output to verify that your file was generated and copied to the output folder. You can use *ildasm.exe* to confirm that your output binaries include the generated code `MyEnum`:
67+
68+
`ildasm CodeGen.dll`
69+
70+
## Next steps
71+
72+
This example could be improved to support more realistic use cases. For example, to support [incremental builds](./incremental-builds.md) when the generated code depends on an input file, `Inputs` and `Outputs` should be provided to the target. Such a target would only regenerate the file if the date of the input file or files is more recent than the output file. Often when customizing for code generation, it's recommended to create a custom task. See [Create a custom task for code generation](./tutorial-custom-task-code-generation.md).
73+
4174
## Related content
4275

4376
- [Customize your build](customize-your-build.md).

docs/msbuild/property-functions.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,16 @@ For example, to set a build property to a new GUID, you can use this script:
6262
<NewGuid>$([System.Guid]::NewGuid())</NewGuid>
6363
```
6464

65+
For overloaded methods, MSBuild tries to find a method with matching parameters.
66+
67+
In MSBuild 17.14 and later, you can use the parameter syntax `out _` to specify an `out` parameter. See [Reference parameters](/dotnet/csharp/language-reference/keywords/method-parameters#reference-parameters). The `out` parameter value is ignored. For example:
68+
69+
```xml
70+
<IsInteger>$([System.Int32]::TryParse("123", out _))</IsInteger>
71+
```
72+
73+
The property `IsInteger` is `true` if the input is successfully parsed as an integer, but the parsed value is ignored.
74+
6575
In static property functions, you can use any public static method or property defined in .NET Standard 2.0 for these system classes:
6676

6777
- [System.Byte](/dotnet/api/System.Byte?view=netstandard-2.0&preserve-view=true)

subscriptions/buy-activate-retail.md

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,47 +3,52 @@ title: Subscriptions available in the Microsoft Store
33
author: joseb-rdc
44
ms.author: amast
55
manager: shve
6-
ms.date: 09/16/2024
6+
ms.date: 08/27/2025
77
ms.topic: how-to
88
description: Purchase Visual Studio subscriptions in the Microsoft Store and activate them in the Visual Studio subscriptions portal.
99
---
1010

1111
# Visual Studio subscriptions are available through the Microsoft Store
1212

13-
Visual Studio subscriptions are available through various channels. Choose from [Volume Licensing](https://www.microsoft.com/licensing/default), Cloud Solution Providers, the [Visual Studio Marketplace](https://marketplace.visualstudio.com/subscriptions), and Microsoft Store. This article explores purchasing and activating subscriptions through the [Microsoft Store](https://www.microsoft.com/store/collections/visualstudio).
13+
Visual Studio subscriptions are available through various channels. Choose from [Volume Licensing](https://www.microsoft.com/licensing/default), Cloud Solution Providers, the [Visual Studio Marketplace](https://marketplace.visualstudio.com/subscriptions), and Microsoft Store. This article explores purchasing and activating subscriptions through the [Microsoft Store](https://www.microsoft.com/store/collections/visualstudio).
1414

1515
## How to buy subscriptions
1616

17-
Need help with deciding which subscription is right for you? Check out our [subscription benefits page](https://visualstudio.microsoft.com/vs/benefits/).
17+
Need help with deciding which subscription is right for you? Check out our [subscription benefits page](https://visualstudio.microsoft.com/vs/benefits/).
1818

1919
Visual Studio subscriptions available through the Microsoft Store include:
2020
+ [Visual Studio Enterprise](https://www.microsoft.com/p/visual-studio-enterprise-subscription/dg7gmgf0dst4?activetab=pivot%3aoverviewtab)
2121
+ [Visual Studio Professional](https://www.microsoft.com/p/visual-studio-professional-subscription/dg7gmgf0dst3?activetab=pivot%3aoverviewtab)
2222
+ [Visual Studio Test Professional](https://www.microsoft.com/p/visual-studio-test-professional-subscription/dg7gmgf0dst6?activetab=pivot%3aoverviewtab)
2323

24-
Each of these subscriptions offers the option to make an initial purchase or to renew an existing subscription. Renewal pricing, which reflects a significant discount, is only available for existing subscriptions.
24+
Each of these subscriptions offers the option to make an initial purchase or to renew an existing subscription. Renewal pricing, which reflects a significant discount, is only available for existing subscriptions.
2525

2626
> [!IMPORTANT]
27-
> To qualify to renew subscriptions at the discounted renewal price, subscriptions should be renewed before they expire. Subscriptions expired for 30 days or more are not eligible for renewal pricing.
27+
> To qualify to renew subscriptions at the discounted renewal price, subscriptions should be renewed before they expire. Subscriptions expired for 30 days or more aren't eligible for renewal pricing.
2828
2929
## How to activate subscriptions
3030

3131
After you purchase a Visual Studio subscription through the Microsoft Store, you can begin the activation process from the payment confirmation page or confirmation email you received after your purchase.
3232

3333
1. Select the **Click here to sign in** link in the confirmation email or on the purchase confirmation page.
34-
2. You are redirected to [https://my.visualstudio.com/subscriptions/activate](https://my.visualstudio.com/subscriptions/activate?wt.mc_id=o~msft~docs).
34+
2. You're redirected to [https://my.visualstudio.com/subscriptions/activate](https://my.visualstudio.com/subscriptions/activate?wt.mc_id=o~msft~docs).
3535
3. Enter the email address that requires access to the Visual Studio subscription and select **Continue**.
36-
4. You may be redirected to one of two different sign-in pages depending on the type of account you're using:
36+
4. You might be redirected to one of two different sign-in pages depending on the type of account you're using:
3737
- Subscribers using their personal "Microsoft Account" (MSA) see the Microsoft Account password page.
3838
- Subscribers using their work/school accounts are redirected to their organization's sign-in page.
3939
5. Enter your password, or complete your organization's sign-in requirements.
4040
6. Upon successful sign-in, an "Activate Your Visual Studio Subscription" window appears.
4141
7. Enter the product key information available from the payment "Confirmation Page" or "Confirmation Email" and select **Activate**.
4242
8. The subscription should now be visible on the [Subscriptions](https://my.visualstudio.com/subscriptions?wt.mc_id=o~msft~docs) page and you should have access to all your subscription benefits.
43+
44+
> [!NOTE]
45+
> When you buy a Retail Visual Studio Subscription through the Microsoft Store or another retail channel, you manage it differently than subscriptions from Volume Licensing or Enterprise Agreements using the Visual Studio Subscriptions Admin portal (manage.visualstudio.com).
46+
>
47+
>These subscriptions are activated using a product key and are intended for individual developers and small teams. As such, they don't include access to subscription management features such as user assignment, or renewal automation. These capabilities are only available for subscriptions provisioned through organizational licensing programs.
4348
4449
## Support for Microsoft Store
4550

46-
If you have any questions about purchasing through the Microsoft Store, help is available. Contact [Microsoft Store Support](https://support.microsoft.com/help/28808/microsoft-store-contact-support?ocid=MSCOMStoreFooter-ContactUs).
51+
If you have any questions about purchasing through the Microsoft Store, help is available. Contact [Microsoft Store Support](https://support.microsoft.com/help/28808/microsoft-store-contact-support?ocid=MSCOMStoreFooter-ContactUs).
4752

4853
## Resources
4954

@@ -58,6 +63,6 @@ If you have any questions about purchasing through the Microsoft Store, help is
5863

5964
## Next steps
6065

61-
Once you've activated your subscription, visit the [Benefits](https://my.visualstudio.com/benefits?wt.mc_id=o~msft~docs) page to see all the tools, services, training, and support benefits included in your subscription. We recommend setting up these benefits to get started:
66+
Once your subscription is active, visit the [Benefits](https://my.visualstudio.com/benefits?wt.mc_id=o~msft~docs) page to see all the tools, services, training, and support benefits included in your subscription. We recommend setting up these benefits to get started:
6267
+ [Visual Studio](vs-ide-benefit.md)
6368
+ [Azure DevOps](vs-azure-devops.md)

0 commit comments

Comments
 (0)