@@ -19,7 +19,6 @@ $templatedProjectDefinitionsMarker = "[TemplatedProjectDefinitions]";
1919$templatedSharedTestProjectSelfDefinitionsMarker = " [TemplatedSharedTestProjectDefinitions]" ;
2020$templatedSharedTestUwpProjectSelfDefinitionsMarker = " [TemplatedSharedTestUwpProjectDefinitions]" ;
2121$templatedSharedTestWinAppSdkProjectSelfDefinitionsMarker = " [TemplatedSharedTestWinAppSdkProjectDefinitions]" ;
22- $templatedSampleProjectReferencesDefinitionMarker = " [TemplatedSampleProjectReferences]"
2322
2423$sampleProjectTypeGuid = " 9A19103F-16F7-4668-BE54-9A1E7A4F7556" ;
2524$sharedProjectTypeGuid = " D954291E-2A0B-460D-934E-DC6B0785DB48" ;
@@ -28,9 +27,6 @@ $libProjectTypeGuid = $sampleProjectTypeGuid;
2827$solutionTemplatePath = ' common/Toolkit.Labs.All.sln.template' ;
2928$generatedSolutionFilePath = ' Toolkit.Labs.All.sln'
3029
31- $sampleRefsPropsTemplatePath = ' common/Labs.SampleRefs.props.template' ;
32- $generatedSampleRefsPropsPath = ' common/Labs.SampleRefs.props' ;
33-
3430function CreateProjectConfiguration {
3531 param (
3632 [string ]$projectGuid
@@ -248,40 +244,5 @@ $solutionTemplate = $solutionTemplate -replace "(?m)^\s*`r`n", "";
248244Set-Content - Path $generatedSolutionFilePath - Value $solutionTemplate ;
249245Write-Output " Solution generated at $generatedSolutionFilePath " ;
250246
251- # Execute ProjectReference generation for all heads
252- $sampleRefsPropsTemplate = Get-Content - Path $sampleRefsPropsTemplatePath ;
253- Write-Output " Loaded sample ProjectReference template from $sampleRefsPropsTemplatePath " ;
254-
255- # Add sample projects
256- foreach ($sampleProjectPath in Get-ChildItem - Recurse - Path ' labs/*/samples/*.Sample/*.Sample.csproj' ) {
257- $relativePath = Resolve-Path - Relative - Path $sampleProjectPath ;
258- $relativePath = $relativePath.TrimStart (' .\' );
259- $projectName = [System.IO.Path ]::GetFileNameWithoutExtension($relativePath );
260-
261- Write-Host " Adding $projectName to project references" ;
262-
263- $projectReferenceDefinition = " <ProjectReference Include=`"`$ (RepositoryDirectory)$relativePath `" />" ;
264-
265- $sampleRefsPropsTemplate = $sampleRefsPropsTemplate -replace [regex ]::escape($templatedSampleProjectReferencesDefinitionMarker ), ($templatedSampleProjectReferencesDefinitionMarker + "
266- " + $projectReferenceDefinition );
267- }
268-
269- # Add library projects
270- foreach ($sampleProjectPath in Get-ChildItem - Recurse - Path ' labs/*/src/*.csproj' ) {
271- $relativePath = Resolve-Path - Relative - Path $sampleProjectPath ;
272- $relativePath = $relativePath.TrimStart (' .\' );
273- $projectName = [System.IO.Path ]::GetFileNameWithoutExtension($relativePath );
274-
275- Write-Host " Adding $projectName to project references" ;
276-
277- $projectReferenceDefinition = " <ProjectReference Include=`"`$ (RepositoryDirectory)$relativePath `" />" ;
278-
279- $sampleRefsPropsTemplate = $sampleRefsPropsTemplate -replace [regex ]::escape($templatedSampleProjectReferencesDefinitionMarker ), ($templatedSampleProjectReferencesDefinitionMarker + "
280- " + $projectReferenceDefinition );
281- }
282-
283- $sampleRefsPropsTemplate = $sampleRefsPropsTemplate -replace [regex ]::escape($templatedSampleProjectReferencesDefinitionMarker ), " " ;
284-
285- # Save
286- Set-Content - Path $generatedSampleRefsPropsPath - Value $sampleRefsPropsTemplate ;
287- Write-Output " Sample project references generated at $generatedSampleRefsPropsPath " ;
247+ # Run sample discovery
248+ & ./ DiscoverSamples.ps1
0 commit comments