@@ -100,7 +100,7 @@ protected override void OnBuildInitialized()
100
100
101
101
Log . Information ( "Building version: {Version}" , Version ) ;
102
102
103
- TargetProject = Solution . GetProject ( SourceDirectory / TargetProjectName / $ " { TargetLibName } .csproj" ) ;
103
+ TargetProject = Solution . GetProject ( TargetLibName ) ;
104
104
TargetProject . NotNull ( "TargetProject could not be loaded!" ) ;
105
105
106
106
TargetFrameworks = TargetProject . GetTargetFrameworks ( ) ;
@@ -113,7 +113,7 @@ protected override void OnBuildInitialized()
113
113
. Before ( Restore )
114
114
. Executes ( ( ) =>
115
115
{
116
- SourceDirectory . GlobDirectories ( "**/bin" , "**/obj" ) . ForEach ( DeleteDirectory ) ;
116
+ SourceDirectory . GlobDirectories ( "**/bin" , "**/obj" ) . ForEach ( x => x . DeleteDirectory ( ) ) ;
117
117
} ) ;
118
118
119
119
Target Restore => _ => _
@@ -130,6 +130,7 @@ protected override void OnBuildInitialized()
130
130
DotNetBuild ( s => s
131
131
. SetProjectFile ( Solution )
132
132
. SetConfiguration ( Configuration )
133
+ . SetContinuousIntegrationBuild ( IsServerBuild )
133
134
. EnableNoRestore ( ) ) ;
134
135
} ) ;
135
136
@@ -143,6 +144,7 @@ protected override void OnBuildInitialized()
143
144
. EnableNoRestore ( )
144
145
. EnableNoBuild ( )
145
146
. SetProcessEnvironmentVariable ( "prefetched" , "false" )
147
+ . When ( GitHubActions . Instance is not null , x => x . SetLoggers ( "GitHubActions" ) )
146
148
) ;
147
149
148
150
DotNetTest ( s => s
@@ -151,6 +153,7 @@ protected override void OnBuildInitialized()
151
153
. EnableNoRestore ( )
152
154
. EnableNoBuild ( )
153
155
. SetProcessEnvironmentVariable ( "prefetched" , "true" )
156
+ . When ( GitHubActions . Instance is not null , x => x . SetLoggers ( "GitHubActions" ) )
154
157
) ;
155
158
} ) ;
156
159
@@ -183,9 +186,9 @@ protected override void OnBuildInitialized()
183
186
. SetTargetPath ( nuspec )
184
187
. SetVersion ( Version )
185
188
. SetOutputDirectory ( NugetDirectory )
186
- . SetSymbols ( true )
187
- . SetSymbolPackageFormat ( " snupkg" )
188
- . AddProperty ( "Configuration" , Configuration )
189
+ . EnableSymbols ( )
190
+ . SetSymbolPackageFormat ( NuGetSymbolPackageFormat . snupkg )
191
+ . SetConfiguration ( Configuration )
189
192
) ;
190
193
} ) ;
191
194
@@ -202,7 +205,7 @@ protected override void OnBuildInitialized()
202
205
throw new BuildAbortedException ( "Could not resolve the NuGet API key." ) ;
203
206
}
204
207
205
- foreach ( var nupkg in GlobFiles ( NugetDirectory , "*.nupkg" ) )
208
+ foreach ( var nupkg in NugetDirectory . GlobFiles ( "*.nupkg" ) )
206
209
{
207
210
NuGetPush ( s => s
208
211
. SetTargetPath ( nupkg )
0 commit comments