File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed
Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change 1212 <TypespecAdditionalOptions Condition =" '$(GenerateTestProject)' != '' AND '$(TypespecAdditionalOptions)' == ''" >generate-test-project=true</TypespecAdditionalOptions >
1313 <_TypespecAdditionalOptions Condition =" '$(TypespecAdditionalOptions)' != ''" >--emitter-options "$(TypespecAdditionalOptions)"</_TypespecAdditionalOptions >
1414 <_LocalSpecRepo Condition =" '$(LocalSpecRepo)' != ''" >--local-spec-repo $(LocalSpecRepo)</_LocalSpecRepo >
15+ <SkipTspClientInstall Condition =" '$(SkipTspClientInstall)' == ''" >false</SkipTspClientInstall >
1516 </PropertyGroup >
1617
1718 <!-- For projects using the new TypeSpec generator, we don't include the Autorest dependency which pulls in the GenerateCode target.
1819 So we need to add it here. -->
20+ <Target Name =" InstallTspClient" Condition =" '$(TypeSpecInput)' != ''" >
21+ <Exec Command =" npm ci --prefix $(_TspClientDir)" />
22+ </Target >
23+
1924 <Target Name =" GenerateCode" Condition =" '$(TypeSpecInput)' != ''" >
2025 <Error Text =" You used skipped sync but didn't have the TempTypeSpecFiles in your project directory. Please run 'dotnet build /t:GenerateCode /p:SaveInputs=true' without SkipSync first at least once" Condition =" '$(SkipSync)' == 'true' AND !Exists('$(MSBuildProjectDirectory)/../TempTypeSpecFiles')" />
21- <Exec Command = " npm ci --prefix $(_TspClientDir) " />
26+ <CallTarget Condition = " '$(SkipTspClientInstall)' != 'true' " Targets = " InstallTspClient " />
2227 <Exec Condition =" '$(SkipSync)' == 'true'" Command =" $(_TypeSpecProjectGenerateCommand) $(_SaveInputs) $(_TypespecAdditionalOptions) $(_Trace)" />
2328 <Exec Condition =" '$(SkipSync)' != 'true'" Command =" $(_TypeSpecProjectSyncAndGenerateCommand) $(_SaveInputs) $(_LocalSpecRepo) $(_TypespecAdditionalOptions) $(_Trace)" />
2429 </Target >
Original file line number Diff line number Diff line change 9999 </Target >
100100
101101
102- <Target Name =" GenerateCode" >
102+ <Target Name =" InstallTspClient" >
103+ <MSBuild Projects =" @(ProjectReference)"
104+ Targets =" InstallTspClient"
105+ BuildInParallel =" false"
106+ SkipNonexistentProjects =" false"
107+ SkipNonexistentTargets =" true" />
108+ </Target >
109+
110+ <Target Name =" GenerateCode" DependsOnTargets =" InstallTspClient" >
103111 <MSBuild Projects =" @(ProjectReference)"
104112 Targets =" GenerateCode"
113+ Properties =" SkipTspClientInstall=true"
105114 BuildInParallel =" $(BuildInParallel)"
106115 SkipNonexistentProjects =" false"
107116 SkipNonexistentTargets =" true" />
You can’t perform that action at this time.
0 commit comments