@@ -24,47 +24,53 @@ partial class Build
2424 packagesDirectory . CreateOrCleanDirectory ( ) ;
2525
2626 List < string > packages = new ( ) ;
27- Directory . CreateDirectory ( packagesDirectory / "Main" ) ;
28- foreach ( Project mainProject in MainProjects )
27+ if ( BuildScope != BuildScope . CoreOnly )
2928 {
30- foreach ( string package in
31- Directory . EnumerateFiles ( mainProject . Directory / "bin" , "*.nupkg" ,
32- SearchOption . AllDirectories ) )
29+ Directory . CreateDirectory ( packagesDirectory / "Main" ) ;
30+ foreach ( Project mainProject in MainProjects )
3331 {
34- File . Move ( package , packagesDirectory / "Main" / Path . GetFileName ( package ) ) ;
35- Debug ( "Found nuget package: {PackagePath}" , package ) ;
36- packages . Add ( Path . GetFileName ( package ) ) ;
37- }
32+ foreach ( string package in
33+ Directory . EnumerateFiles ( mainProject . Directory / "bin" , "*.nupkg" ,
34+ SearchOption . AllDirectories ) )
35+ {
36+ File . Move ( package , packagesDirectory / "Main" / Path . GetFileName ( package ) ) ;
37+ Debug ( "Found nuget package: {PackagePath}" , package ) ;
38+ packages . Add ( Path . GetFileName ( package ) ) ;
39+ }
3840
39- foreach ( string symbolPackage in
40- Directory . EnumerateFiles ( mainProject . Directory / "bin" , "*.snupkg" ,
41- SearchOption . AllDirectories ) )
42- {
43- File . Move ( symbolPackage ,
44- packagesDirectory / "Main" / Path . GetFileName ( symbolPackage ) ) ;
45- Debug ( "Found symbol package: {PackagePath}" , symbolPackage ) ;
41+ foreach ( string symbolPackage in
42+ Directory . EnumerateFiles ( mainProject . Directory / "bin" , "*.snupkg" ,
43+ SearchOption . AllDirectories ) )
44+ {
45+ File . Move ( symbolPackage ,
46+ packagesDirectory / "Main" / Path . GetFileName ( symbolPackage ) ) ;
47+ Debug ( "Found symbol package: {PackagePath}" , symbolPackage ) ;
48+ }
4649 }
4750 }
4851
49- Directory . CreateDirectory ( packagesDirectory / "Core" ) ;
50- foreach ( Project coreProject in CoreProjects )
52+ if ( BuildScope != BuildScope . MainOnly )
5153 {
52- foreach ( string package in
53- Directory . EnumerateFiles ( coreProject . Directory / "bin" , "*.nupkg" ,
54- SearchOption . AllDirectories ) )
54+ Directory . CreateDirectory ( packagesDirectory / "Core" ) ;
55+ foreach ( Project coreProject in CoreProjects )
5556 {
56- File . Move ( package , packagesDirectory / "Core" / Path . GetFileName ( package ) ) ;
57- Debug ( "Found nuget package: {PackagePath}" , package ) ;
58- packages . Add ( Path . GetFileName ( package ) ) ;
59- }
57+ foreach ( string package in
58+ Directory . EnumerateFiles ( coreProject . Directory / "bin" , "*.nupkg" ,
59+ SearchOption . AllDirectories ) )
60+ {
61+ File . Move ( package , packagesDirectory / "Core" / Path . GetFileName ( package ) ) ;
62+ Debug ( "Found nuget package: {PackagePath}" , package ) ;
63+ packages . Add ( Path . GetFileName ( package ) ) ;
64+ }
6065
61- foreach ( string symbolPackage in
62- Directory . EnumerateFiles ( coreProject . Directory / "bin" , "*.snupkg" ,
63- SearchOption . AllDirectories ) )
64- {
65- File . Move ( symbolPackage ,
66- packagesDirectory / "Core" / Path . GetFileName ( symbolPackage ) ) ;
67- Debug ( "Found symbol package: {PackagePath}" , symbolPackage ) ;
66+ foreach ( string symbolPackage in
67+ Directory . EnumerateFiles ( coreProject . Directory / "bin" , "*.snupkg" ,
68+ SearchOption . AllDirectories ) )
69+ {
70+ File . Move ( symbolPackage ,
71+ packagesDirectory / "Core" / Path . GetFileName ( symbolPackage ) ) ;
72+ Debug ( "Found symbol package: {PackagePath}" , symbolPackage ) ;
73+ }
6874 }
6975 }
7076
0 commit comments