8000 Repo sync for protected branch by learn-build-service-prod[bot] · Pull Request #10759 · MicrosoftDocs/visualstudio-docs · GitHub
[go: up one dir, main page]

Skip to content

Repo sync for protected branch #10759

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
May 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion docs/deployment/clickonce-deployment-dotnet.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: ClickOnce for .NET 5 and later on Windows
description: Discover the differences between ClickOnce for .NET Core 3.1 and .NET 5 and later versions, versus ClickOnce for .NET Framework.
ms.date: 09/06/2023
ms.date: 05/16/2025
ms.topic: how-to
helpviewer_keywords:
- "deployment, ClickOnce for .NET 5+"
Expand Down
28 changes: 22 additions & 6 deletions docs/javascript/compile-typescript-code-npm.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Compile and build TypeScript code using npm
description: Add TypeScript support to your Visual Studio projects by using the Node Package Manager (npm) package for portability across different platforms and environments.
ms.date: 10/23/2023
ms.date: 5/15/2025
ms.topic: conceptual
author: "mikejo5000"
ms.author: "mikejo"
Expand All @@ -10,7 +10,7 @@ ms.subservice: javascript-typescript
dev_langs:
- JavaScript
---
# Compile TypeScript code (Node.js)
# Compile TypeScript code using npm

::: moniker range=">=vs-2022"
Use the TypeScript npm package to add TypeScript support to projects based on the [JavaScript Project System (JSPS)](../javascript/javascript-in-visual-studio.md#project-templates), or *.esproj*. Starting in Visual Studio 2019, it's recommended that you use the npm package instead of the TypeScript SDK. The TypeScript npm package provides greater portability across different platforms and environments.
Expand All @@ -31,11 +31,11 @@ The [TypeScript npm package](https://www.npmjs.com/package/typescript) adds Type

::: moniker range=">=vs-2022"
For projects created using the JavaScript Project System (JSPS), or *.esproj*, no additional workloads are needed. You just need to install npm (https://www.npmjs.com/), which is included with Node.js.

For the older project type (.njsproj), you need to install the Node.js development workload and the Node.js runtime.
::: moniker-end

::: moniker range="vs-2019"
For the Node.js project type (.njsproj), you need to install the Node.js development workload and the Node.js runtime.

[Follow instructions](./tutorial-nodejs.md?toc=%252fvisualstudio%252fjavascript%252ftoc.json) to install the Node.js development workload and npm (https://www.npmjs.com/), which is included with Node.js.

For a simple Visual Studio integration, create your project using one of the Node.js TypeScript templates, such as the Blank Node.js Web Application template. Else, use either a Node.js JavaScript template included with Visual Studio and follow instructions here. Or, use an [Open Folder](../javascript/develop-javascript-code-without-solutions-projects.md) project.
Expand All @@ -45,7 +45,9 @@ The [TypeScript npm package](https://www.npmjs.com/package/typescript) adds Type

From Solution Explorer (right pane), open the *package.json* in the project root. The packages listed correspond to packages under the npm node in Solution Explorer. For more information, see [Manage npm packages](../javascript/npm-package-management.md).

For a Node.js project, you can install the TypeScript npm package using the command line or the IDE. To install using the IDE, right-click the npm node in Solution Explorer, choose **Install New npm package**, search for **TypeScript**, and install the package.
::: moniker range="vs-2019"
For the older Node.js project type, you can install the TypeScript npm package using the command line or the IDE. To install using the IDE, right-click the npm node in Solution Explorer, choose **Install New npm package**, search for **TypeScript**, and install the package.
::: moniker-end

Check the **npm** option in the **Output** window to see package installation progress. The installed package shows up under the **npm** node in Solution Explorer.

Expand Down Expand Up @@ -114,10 +116,17 @@ The [TypeScript npm package](https://www.npmjs.com/package/typescript) adds Type
For an example of using Vue.js with TypeScript, see [Create a Vue.js application](create-application-with-vuejs.md).
::: moniker-end

1. If you need to configure options such as the startup page, path to the Node.js runtime, application port, or runtime arguments, right-click the project node in Solution Explorer, and choose **Properties**.
1. If you need to configure build and deployment options such as the app URL or runtime commands, right-click the project node in Solution Explorer, and choose **Properties**.

::: moniker range=">=vs-2022"
>[!NOTE]
> When configuring third-party tools, projects using the JavaScript Project System (JSPS), or *.esproj*, don't use the paths that are configured under **Tools** > **Options** > **Projects and solutions** > **Web Package Management** > **External Web Tools**. These settings are used for other project types.
::: moniker-end

::: moniker range="vs-2019"
>[!NOTE]
> When configuring third-party tools, Node.js projects don't use the paths that are configured under **Tools** > **Options** > **Projects and solutions** > **Web Package Management** > **External Web Tools**. These settings are used for other project types.
::: moniker-end

1. Choose **Build > Build Solution**.

Expand All @@ -141,8 +150,15 @@ Press **Ctrl+F5** (or **Debug > Start Without Debugging**) to run the applicatio

You can use Task Runner Explorer in Visual Studio to help automate tasks for third-party tools like npm and webpack.

::: moniker range=">=vs-2022"
- [NPM Task Runner](https://marketplace.visualstudio.com/items?itemName=MadsKristensen.NpmTaskRunner64) - Adds support for npm scripts defined in *package.json*. Supports yarn.
- [Webpack Task Runner](https://marketplace.visualstudio.com/items?itemName=MadsKristensen.WebPackTaskRunner) - Adds support for webpack.
::: moniker-end

::: moniker range="vs-2019"
- [NPM Task Runner](https://marketplace.visualstudio.com/items?itemName=MadsKristensen.NPMTaskRunner) - Adds support for npm scripts defined in *package.json*. Supports yarn.
- [Webpack Task Runner](https://marketplace.visualstudio.com/items?itemName=MadsKristensen.WebPackTaskRunner) - Adds support for webpack.
::: moniker-end

## Related content

Expand Down
14 changes: 7 additions & 7 deletions docs/javascript/compile-typescript-code-nuget.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Compile and build TypeScript code using NuGet
description: Add TypeScript support to your Visual Studio projects by using the NuGet package for portability across different platforms and environments.
ms.date: 10/23/2023
ms.date: 5/15/2025
ms.topic: conceptual
author: "mikejo5000"
ms.author: "mikejo"
Expand Down Expand Up @@ -34,7 +34,7 @@ If Visual Studio is installed, then the node.exe bundled with it will automatica
Visual Studio adds the NuGet package under the **Dependencies** node in Solution Explorer. The following package reference gets added to your *.csproj file.

```xml
<PackageReference Include="Microsoft.TypeScript.MSBuild" Version="3.9.7">
<PackageReference Include="Microsoft.TypeScript.MSBuild" Version="5.8.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand All @@ -48,7 +48,7 @@ If Visual Studio is installed, then the node.exe bundled with it will automatica

1. Open *tsconfig.json* and update to set the compiler options that you want.

The following is an example of a simple *tsconfig.json* file.
Use the following example, which shows a simple *tsconfig.json* file.

```json
{
Expand All @@ -75,14 +75,14 @@ If Visual Studio is installed, then the node.exe bundled with it will automatica

### Build the application

1. Add TypeScript (*.ts*) or TypeScript JSX (*.tsx*) files to your project, and then add TypeScript code. For a simple example of TypeScript, use the following:
1. Add TypeScript (*.ts*) or TypeScript JSX (*.tsx*) files to your project, and then add TypeScript code. For a simple example of TypeScript, use the following code:

```typescript
let message: string = 'Hello World';
console.log(message);
```

1. If you are using an older non-SDK style project, follow instructions in [Remove default imports](#remove-default-imports) before building.
1. If you're using an older non-SDK style project, follow instructions in [Remove default imports](#remove-default-imports) before building.

1. Choose **Build > Build Solution**.

Expand Down Expand Up @@ -157,7 +157,7 @@ Press **F5** or select the Start button at the top of the window.

In older ASP.NET Core projects that use the [non-SDK-style format](/nuget/resources/check-project-format), you may need to remove some project file elements.

If you are using the NuGet package for MSBuild support for a project, the project file must not import `Microsoft.TypeScript.Default.props` or `Microsoft.TypeScript.targets`. The files get imported by the NuGet package, so including them separately may cause unintended behavior.
If you're using the NuGet package for MSBuild support for a project, the project file must not import `Microsoft.TypeScript.Default.props` or `Microsoft.TypeScript.targets`. The files get imported by the NuGet package, so including them separately may cause unintended behavior.

1. Right-click the project and choose **Unload Project**.

Expand All @@ -167,7 +167,7 @@ If you are using the NuGet package for MSBuild support for a project, the projec

1. Remove references to `Microsoft.TypeScript.Default.props` and `Microsoft.TypeScript.targets`.

The imports to remove look similar to the following:
The imports to remove look similar to the following XML:

```xml
<Import
Expand Down
5 changes: 4 additions & 1 deletion docs/msbuild/errors/msb1001.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "MSB1001 diagnostic code"
description: Learn about the possible causes of the MSB1001 build error, and get troubleshooting tips.
ms.date: 05/14/2025
ms.date: 05/16/2025
ms.topic: "error-reference"
f1_keywords:
- MSB1001
Expand All @@ -26,7 +26,10 @@ This article describes the MSB1001 error code.

## Message text

<!-- :::editable-content name="messageText"::: -->
`MSB1001: Unknown switch.`
<!-- :::editable-content-end::: -->
<!-- MSB1001: Unknown switch. -->

<!-- :::editable-content name="postOutputDescription"::: -->
## Description
Expand Down
5 changes: 4 additions & 1 deletion docs/msbuild/errors/msb1002.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "MSB1002 diagnostic code"
description: Learn about the possible causes of the MSB1002 build error, and get troubleshooting tips.
ms.date: 01/14/2025
ms.date: 05/16/2025
ms.topic: "error-reference"
f1_keywords:
- MSB1002
Expand All @@ -26,7 +26,10 @@ This article describes the MSB1002 error code.

## Message text

<!-- :::editable-content name="messageText"::: -->
`MSB1002: This switch does not take any parameters.`
<!-- :::editable-content-end::: -->
<!-- MSB1002: This switch does not take any parameters. -->

<!-- :::editable-content name="postOutputDescription"::: -->
<!--
Expand Down
5 changes: 4 additions & 1 deletion docs/msbuild/errors/msb1003.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "MSB1003 diagnostic code"
description: Learn about the possible causes of the MSB1003 build error, and get troubleshooting tips.
ms.date: 05/14/2025
ms.date: 05/16/2025
ms.topic: "error-reference"
f1_keywords:
- MSB1003
Expand All @@ -26,7 +26,10 @@ This article describes the MSB1003 error code.

## Message text

<!-- :::editable-content name="messageText"::: -->
`MSB1003: Specify a project or solution file. The current working directory does not contain a project or solution file.`
<!-- :::editable-content-end::: -->
<!-- MSB1003: Specify a project or solution file. The current working directory does not contain a project or solution file. -->

<!-- :::editable-content name="postOutputDescription"::: -->
<!--
Expand Down
5 changes: 4 additions & 1 deletion docs/msbuild/errors/msb1004.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "MSB1004 diagnostic code"
description: Learn about the possible causes of the MSB1004 build error, and get troubleshooting tips.
ms.date: 01/14/2025
ms.date: 05/16/2025
ms.topic: "error-reference"
f1_keywords:
- MSB1004
Expand All @@ -26,7 +26,10 @@ This article describes the MSB1004 error code.

## Message text

<!-- :::editable-content name="messageText"::: -->
`MSB1004: Specify the name of the target.`
<!-- :::editable-content-end::: -->
<!-- MSB1004: Specify the name of the target. -->

<!-- :::editable-content name="postOutputDescription"::: -->
<!--
Expand Down
5 changes: 4 additions & 1 deletion docs/msbuild/errors/msb1005.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "MSB1005 diagnostic code"
description: Learn about the possible causes of the MSB1005 build error, and get troubleshooting tips.
ms.date: 01/14/2025
ms.date: 05/16/2025
ms.topic: "error-reference"
f1_keywords:
- MSB1005
Expand All @@ -26,7 +26,10 @@ This article describes the MSB1005 error code.

## Message text

<!-- :::editable-content name="messageText"::: -->
`MSB1005: Specify a property and its value.`
<!-- :::editable-content-end::: -->
<!-- MSB1005: Specify a property and its value. -->

<!-- :::editable-content name="postOutputDescription"::: -->
<!--
Expand Down
5 changes: 4 additions & 1 deletion docs/msbuild/errors/msb1006.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "MSB1006 diagnostic code"
description: Learn about the possible causes of the MSB1006 build error, and get troubleshooting tips.
ms.date: 01/14/2025
ms.date: 05/16/2025
ms.topic: "error-reference"
f1_keywords:
- MSB1006
Expand All @@ -26,7 +26,10 @@ This article describes the MSB1006 error code.

## Message text

<!-- :::editable-content name="messageText"::: -->
`MSB1006: Property is not valid.`
<!-- :::editable-content-end::: -->
<!-- MSB1006: Property is not valid. -->

<!-- :::editable-content name="postOutputDescription"::: -->
<!--
Expand Down
5 changes: 4 additions & 1 deletion docs/msbuild/errors/msb1007.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "MSB1007 diagnostic code"
description: Learn about the possible causes of the MSB1007 build error, and get troubleshooting tips.
ms.date: 01/14/2025
ms.date: 05/16/2025
ms.topic: "error-reference"
f1_keywords:
- MSB1007
Expand All @@ -26,7 +26,10 @@ This article describes the MSB1007 error code.

## Message text

<!-- :::editable-content name="messageText"::: -->
`MSB1007: Specify a logger.`
<!-- :::editable-content-end::: -->
<!-- MSB1007: Specify a logger. -->

<!-- :::editable-content name="postOutputDescription"::: -->
<!--
Expand Down
5 changes: 4 additions & 1 deletion docs/msbuild/errors/msb1008.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "MSB1008 diagnostic code"
description: Learn about the possible causes of the MSB1008 build error, and get troubleshooting tips.
ms.date: 05/14/2025
ms.date: 05/16/2025
ms.topic: "error-reference"
f1_keywords:
- MSB1008
Expand All @@ -26,7 +26,10 @@ This article describes the MSB1008 error code.

## Message text

<!-- :::editable-content name="messageText"::: -->
`MSB1008: Only one project can be specified.`
<!-- :::editable-content-end::: -->
<!-- MSB1008: Only one project can be specified. -->

<!-- :::editable-content name="postOutputDescription"::: -->
<!--
Expand Down
5 changes: 4 additions & 1 deletion docs/msbuild/errors/msb1009.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "MSB1009 diagnostic code"
description: Learn about the possible causes of the MSB1009 build error, and get troubleshooting tips.
ms.date: 03/25/2025
ms.date: 05/16/2025
ms.topic: "error-reference"
f1_keywords:
- MSB1009
Expand All @@ -26,7 +26,10 @@ This article describes the MSB1009 error code.

## Message text

<!-- :::editable-content name="messageText"::: -->
`MSB1009: Project file does not exist.`
<!-- :::editable-content-end::: -->
<!-- MSB1009: Project file does not exist. -->

<!-- :::editable-content name="postOutputDescription"::: -->
<!--
Expand Down
5 changes: 4 additions & 1 deletion docs/msbuild/errors/msb1010.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "MSB1010 diagnostic code"
description: Learn about the possible causes of the MSB1010 build error, and get troubleshooting tips.
ms.date: 01/14/2025
ms.date: 05/16/2025
ms.topic: "error-reference"
f1_keywords:
- MSB1010
Expand All @@ -26,7 +26,10 @@ This article describes the MSB1010 error code.

## Message text

<!-- :::editable-content name="messageText"::: -->
`MSB1010: Must provide a property name for the getProperty switch.`
<!-- :::editable-content-end::: -->
<!-- MSB1010: Must provide a property name for the getProperty switch. -->

<!-- :::editable-content name="postOutputDescription"::: -->
<!--
Expand Down
5 changes: 4 additions & 1 deletion docs/msbuild/errors/msb1011.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "MSB1011 diagnostic code"
description: Learn about the possible causes of the MSB1011 build error, and get troubleshooting tips.
ms.date: 01/14/2025
ms.date: 05/16/2025
ms.topic: "error-reference"
f1_keywords:
- MSB1011
Expand All @@ -26,7 +26,10 @@ This article describes the MSB1011 error code.

## Message text

<!-- :::editable-content name="messageText"::: -->
`MSB1011: Specify which project or solution file to use because this folder contains more than one project or solution file.`
<!-- :::editable-content-end::: -->
<!-- MSB1011: Specify which project or solution file to use because this folder contains more than one project or solution file. -->

<!-- :::editable-content name="postOutputDescription"::: -->
<!--
Expand Down
5 changes: 4 additions & 1 deletion docs/msbuild/errors/msb1012.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "MSB1012 diagnostic code"
description: Learn about the possible causes of the MSB1012 build error, and get troubleshooting tips.
ms.date: 01/14/2025
ms.date: 05/16/2025
ms.topic: "error-reference"
f1_keywords:
- MSB1012
Expand All @@ -26,7 +26,10 @@ This article describes the MSB1012 error code.

## Message text

<!-- :::editable-content name="messageText"::: -->
`MSB1012: Specify a response file.`
<!-- :::editable-content-end::: -->
<!-- MSB1012: Specify a response file. -->

<!-- :::editable-content name="postOutputDescription"::: -->
<!--
Expand Down
Loading
0