From c352bfe34f7e4edcc5abc2d194789dbeb28b0cff Mon Sep 17 00:00:00 2001 From: Rick Anderson <3605364+Rick-Anderson@users.noreply.github.com> Date: Mon, 18 Nov 2024 16:33:48 -1000 Subject: [PATCH 1/6] add missing markup /7 --- aspnetcore/razor-pages/ui-class.md | 12 ++++++++---- aspnetcore/razor-pages/ui-class/remove.xml | 16 ++++++++++++++++ 2 files changed, 24 insertions(+), 4 deletions(-) create mode 100644 aspnetcore/razor-pages/ui-class/remove.xml diff --git a/aspnetcore/razor-pages/ui-class.md b/aspnetcore/razor-pages/ui-class.md index 8f7067942b14..945ca6e0494c 100644 --- a/aspnetcore/razor-pages/ui-class.md +++ b/aspnetcore/razor-pages/ui-class.md @@ -122,19 +122,19 @@ In the following example, the `lib.css` stylesheet in the `wwwroot` folder isn't To include TypeScript files in an RCL: -1. Reference the [`Microsoft.TypeScript.MSBuild`](https://www.nuget.org/packages/Microsoft.TypeScript.MSBuild) NuGet package in the project. +* Reference the [`Microsoft.TypeScript.MSBuild`](https://www.nuget.org/packages/Microsoft.TypeScript.MSBuild) NuGet package in the project. [!INCLUDE[](~/includes/package-reference.md)] -1. Place the TypeScript files (`.ts`) outside of the `wwwroot` folder. For example, place the files in a `Client` folder. +* Place the TypeScript files (`.ts`) outside of the `wwwroot` folder. For example, place the files in a `Client` folder. -1. Configure the TypeScript build output for the `wwwroot` folder. Set the `TypescriptOutDir` property inside of a `PropertyGroup` in the project file: +* Configure the TypeScript build output for the `wwwroot` folder. Set the `TypescriptOutDir` property inside of a `PropertyGroup` in the project file: ```xml wwwroot ``` -1. Include the TypeScript target as a dependency of the `PrepareForBuildDependsOn` target by adding the following target inside of a `PropertyGroup` in the project file: +* Include the TypeScript target as a dependency of the `PrepareForBuildDependsOn` target by adding the following target inside of a `PropertyGroup` in the project file: ```xml @@ -143,6 +143,10 @@ To include TypeScript files in an RCL: ``` +* Add the following highlighted markup to the project file: + +[!code-xml[](~/razor-pages/ui-class/remove.xml?highlight=6-9,13)] + ### Consume content from a referenced RCL The files included in the `wwwroot` folder of the RCL are exposed to either the RCL or the consuming app under the prefix `_content/{PACKAGE ID}/`. For example, a library with an assembly name of `Razor.Class.Lib` and without a `` specified in its project file results in a path to static content at `_content/Razor.Class.Lib/`. When producing a NuGet package and the assembly name isn't the same as the package ID ([``](/nuget/create-packages/creating-a-package-msbuild#set-properties) in the library's project file), use the package ID as specified in the project file for `{PACKAGE ID}`. diff --git a/aspnetcore/razor-pages/ui-class/remove.xml b/aspnetcore/razor-pages/ui-class/remove.xml new file mode 100644 index 000000000000..90587efa4200 --- /dev/null +++ b/aspnetcore/razor-pages/ui-class/remove.xml @@ -0,0 +1,16 @@ + + + + + // Markup removed for brevity. + + CompileTypeScriptWithTSConfig; + GetTypeScriptOutputForPublishing;$(PrepareForBuildDependsOn) + + + + + + H> + + From 1615db20290dc1405f12c18b934f9e554e5f0bbb Mon Sep 17 00:00:00 2001 From: Rick Anderson <3605364+Rick-Anderson@users.noreply.github.com> Date: Mon, 18 Nov 2024 16:37:45 -1000 Subject: [PATCH 2/6] add missing markup /7 --- aspnetcore/razor-pages/ui-class.md | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/aspnetcore/razor-pages/ui-class.md b/aspnetcore/razor-pages/ui-class.md index 945ca6e0494c..d93a8863dc0c 100644 --- a/aspnetcore/razor-pages/ui-class.md +++ b/aspnetcore/razor-pages/ui-class.md @@ -134,16 +134,7 @@ To include TypeScript files in an RCL: wwwroot ``` -* Include the TypeScript target as a dependency of the `PrepareForBuildDependsOn` target by adding the following target inside of a `PropertyGroup` in the project file: - - ```xml - - CompileTypeScript; - GetTypeScriptOutputForPublishing;$(PrepareForBuildDependsOn) - - ``` - -* Add the following highlighted markup to the project file: +* Remove the output in the `wwwroot folder` and include the TypeScript target as a dependency of the `PrepareForBuildDependsOn` target by adding the following target inside of a `PropertyGroup` in the project file: [!code-xml[](~/razor-pages/ui-class/remove.xml?highlight=6-9,13)] From fb53596badb72901c4530ed98464a17430e105bd Mon Sep 17 00:00:00 2001 From: Rick Anderson <3605364+Rick-Anderson@users.noreply.github.com> Date: Mon, 18 Nov 2024 16:45:37 -1000 Subject: [PATCH 3/6] add missing markup /7 --- aspnetcore/razor-pages/ui-class.md | 12 ++++-------- aspnetcore/razor-pages/ui-class/remove.xml | 1 + 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/aspnetcore/razor-pages/ui-class.md b/aspnetcore/razor-pages/ui-class.md index d93a8863dc0c..c33b5c7c74ad 100644 --- a/aspnetcore/razor-pages/ui-class.md +++ b/aspnetcore/razor-pages/ui-class.md @@ -127,14 +127,10 @@ To include TypeScript files in an RCL: [!INCLUDE[](~/includes/package-reference.md)] * Place the TypeScript files (`.ts`) outside of the `wwwroot` folder. For example, place the files in a `Client` folder. - -* Configure the TypeScript build output for the `wwwroot` folder. Set the `TypescriptOutDir` property inside of a `PropertyGroup` in the project file: - - ```xml - wwwroot - ``` - -* Remove the output in the `wwwroot folder` and include the TypeScript target as a dependency of the `PrepareForBuildDependsOn` target by adding the following target inside of a `PropertyGroup` in the project file: +* Add the following markup to the project file: + * Configure the TypeScript build output for the `wwwroot` folder with the `TypescriptOutDir` property inside. + * Include the TypeScript target as a dependency of the `PrepareForBuildDependsOn` target by adding the following target inside of a `PropertyGroup` in the project file. + * Remove the output in the `wwwroot folder`. [!code-xml[](~/razor-pages/ui-class/remove.xml?highlight=6-9,13)] diff --git a/aspnetcore/razor-pages/ui-class/remove.xml b/aspnetcore/razor-pages/ui-class/remove.xml index 90587efa4200..d1c34e0f97aa 100644 --- a/aspnetcore/razor-pages/ui-class/remove.xml +++ b/aspnetcore/razor-pages/ui-class/remove.xml @@ -3,6 +3,7 @@ // Markup removed for brevity. + wwwroot CompileTypeScriptWithTSConfig; GetTypeScriptOutputForPublishing;$(PrepareForBuildDependsOn) From ae7d1a542fffe4efcc662c8b49e17116e8cf33d6 Mon Sep 17 00:00:00 2001 From: Rick Anderson <3605364+Rick-Anderson@users.noreply.github.com> Date: Mon, 18 Nov 2024 16:52:23 -1000 Subject: [PATCH 4/6] add missing markup /7 --- aspnetcore/razor-pages/ui-class.md | 4 ++-- aspnetcore/razor-pages/ui-class/remove.xml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/aspnetcore/razor-pages/ui-class.md b/aspnetcore/razor-pages/ui-class.md index c33b5c7c74ad..684c2034c466 100644 --- a/aspnetcore/razor-pages/ui-class.md +++ b/aspnetcore/razor-pages/ui-class.md @@ -128,8 +128,8 @@ To include TypeScript files in an RCL: * Place the TypeScript files (`.ts`) outside of the `wwwroot` folder. For example, place the files in a `Client` folder. * Add the following markup to the project file: - * Configure the TypeScript build output for the `wwwroot` folder with the `TypescriptOutDir` property inside. - * Include the TypeScript target as a dependency of the `PrepareForBuildDependsOn` target by adding the following target inside of a `PropertyGroup` in the project file. + * Configure the TypeScript build output for the `wwwroot` folder with the `TypescriptOutDir` property. + * Include the TypeScript target as a dependency of the `PrepareForBuildDependsOn` target. * Remove the output in the `wwwroot folder`. [!code-xml[](~/razor-pages/ui-class/remove.xml?highlight=6-9,13)] diff --git a/aspnetcore/razor-pages/ui-class/remove.xml b/aspnetcore/razor-pages/ui-class/remove.xml index d1c34e0f97aa..e385a7a924d9 100644 --- a/aspnetcore/razor-pages/ui-class/remove.xml +++ b/aspnetcore/razor-pages/ui-class/remove.xml @@ -11,7 +11,7 @@ - + H> From d721322a420bb0d64c13d0a580b24ea9c65ca1ff Mon Sep 17 00:00:00 2001 From: Rick Anderson <3605364+Rick-Anderson@users.noreply.github.com> Date: Mon, 18 Nov 2024 16:53:32 -1000 Subject: [PATCH 5/6] add missing markup /7 --- aspnetcore/razor-pages/ui-class.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aspnetcore/razor-pages/ui-class.md b/aspnetcore/razor-pages/ui-class.md index 684c2034c466..32e9e60afeb0 100644 --- a/aspnetcore/razor-pages/ui-class.md +++ b/aspnetcore/razor-pages/ui-class.md @@ -132,7 +132,7 @@ To include TypeScript files in an RCL: * Include the TypeScript target as a dependency of the `PrepareForBuildDependsOn` target. * Remove the output in the `wwwroot folder`. -[!code-xml[](~/razor-pages/ui-class/remove.xml?highlight=6-9,13)] +[!code-xml[](~/razor-pages/ui-class/remove.xml?highlight=6-10,14)] ### Consume content from a referenced RCL From b3260e62b28cec19afb9024cb04347cc77cf9818 Mon Sep 17 00:00:00 2001 From: Rick Anderson <3605364+Rick-Anderson@users.noreply.github.com> Date: Mon, 18 Nov 2024 17:13:35 -1000 Subject: [PATCH 6/6] add missing markup /7 --- aspnetcore/razor-pages/ui-class/remove.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aspnetcore/razor-pages/ui-class/remove.xml b/aspnetcore/razor-pages/ui-class/remove.xml index e385a7a924d9..7b98ee50acc5 100644 --- a/aspnetcore/razor-pages/ui-class/remove.xml +++ b/aspnetcore/razor-pages/ui-class/remove.xml @@ -12,6 +12,6 @@ - H> +