Skip to content

Commit 8f1fe72

Browse files
authored
Update BuildContent target in csproj example
The current contents of the BuildContent target were incorrect.
1 parent 1a98d76 commit 8f1fe72

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

articles/getting_started/content_pipeline/content_builder_project.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,14 +153,14 @@ Per platform/game project:
153153
To complete the process, add the following `Target` section to your `csproj` (before the final ```</Project>``` entry):
154154

155155
```xml
156-
<Target Name="BuildContent" BeforeTargets="Build">
156+
<Target Name="BuildContent" BeforeTargets="BeforeCompile">
157157
<PropertyGroup>
158158
<ContentOutput>$(ProjectDir)$(OutputPath)</ContentOutput>
159159
<ContentTemp>$(ProjectDir)$(IntermediateOutputPath)</ContentTemp>
160160
<ContentArgs>build -p $(MonoGamePlatform) -s Assets -o $(ContentOutput) -i $(ContentTemp)</ContentArgs>
161161
</PropertyGroup>
162-
<MSBuild Projects="..\Content\Content.csproj" Targets="Build;Run"
163-
Properties="RunArguments=$(ContentArgs);" />
162+
<MSBuild Projects="..\Content\Content.csproj" Targets="Build" RemoveProperties="Configuration;TargetFramework;RuntimeIdentifier;RuntimeIdentifiers" />
163+
<Exec Command="$(ContentCommand) $(ContentArgs)" WorkingDirectory="$(MSBuildThisFileDirectory)..\" CustomErrorRegularExpression="\[E\] .+" CustomWarningRegularExpression="\[W\] .+" />
164164
</Target>
165165
```
166166

0 commit comments

Comments
 (0)