@@ -31,11 +31,6 @@ var mongoDbDriverPackageName = "MongoDB.Driver";
3131
3232var solutionFile = solutionDirectory . CombineWithFilePath ( "CSharpDriver.sln" ) ;
3333var solutionFullPath = solutionFile . FullPath ;
34- var srcProjectNames = new [ ]
35- {
36- "MongoDB.Bson" ,
37- "MongoDB.Driver"
38- } ;
3934
4035Task( "Default" )
4136 . IsDependentOn ( "Test" ) ;
@@ -70,13 +65,6 @@ Task("Build")
7065 }
7166 } ;
7267
73- if ( buildConfig . IsReleaseMode )
74- {
75- Console . WriteLine ( "Build continuousIntegration is enabled" ) ;
76- settings . MSBuildSettings = new DotNetMSBuildSettings ( ) ;
77- // configure deterministic build for better compatibility with debug symbols (used in Package/Build tasks). Affects: *.nupkg
78- settings . MSBuildSettings . SetContinuousIntegrationBuild ( continuousIntegrationBuild : true ) ;
79- }
8068 DotNetBuild ( solutionFullPath , settings ) ;
8169 } ) ;
8270
@@ -132,10 +120,6 @@ Task("Test")
132120 } )
133121 . DeferOnError ( ) ;
134122
135- Task( "TestNet472" ) . IsDependentOn ( "Test" ) ;
136- Task( "TestNetStandard21" ) . IsDependentOn ( "Test" ) ;
137- Task( "TestNet60" ) . IsDependentOn ( "Test" ) ;
138-
139123Task( "TestAwsAuthentication" )
140124 . IsDependentOn ( "Build" )
141125 . DoesForEach (
@@ -184,10 +168,6 @@ Task("TestGssapi")
184168 action : ( BuildConfig buildConfig , Path testProject ) =>
185169 RunTests ( buildConfig , testProject , filter : "Category=\" GssapiMechanism\" " ) ) ;
186170
187- Task( "TestGssapiNet472" ) . IsDependentOn ( "TestGssapi" ) ;
188- Task( "TestGssapiNetStandard21" ) . IsDependentOn ( "TestGssapi" ) ;
189- Task( "TestGssapiNet60" ) . IsDependentOn ( "TestGssapi" ) ;
190-
191171Task( "TestMongoDbOidc" )
192172 . IsDependentOn ( "Build" )
193173 . DoesForEach (
@@ -208,35 +188,20 @@ Task("TestLoadBalanced")
208188 action : ( BuildConfig buildConfig , Path testProject ) =>
209189 RunTests ( buildConfig , testProject , filter : "Category=\" SupportLoadBalancing\" " ) ) ;
210190
211- Task( "TestLoadBalancedNetStandard21" ) . IsDependentOn ( "TestLoadBalanced" ) ;
212- Task( "TestLoadBalancedNet60" ) . IsDependentOn ( "TestLoadBalanced" ) ;
213-
214- Task( "TestSocks5ProxyNet472" ) . IsDependentOn ( "TestSocks5Proxy" ) ;
215- Task( "TestSocks5ProxyNetStandard21" ) . IsDependentOn ( "TestSocks5Proxy" ) ;
216- Task( "TestSocks5ProxyNet60" ) . IsDependentOn ( "TestSocks5Proxy" ) ;
217-
218191Task( "TestCsfleWithMockedKms" )
219192 . IsDependentOn ( "TestLibMongoCrypt" )
220193 . DoesForEach (
221194 items : GetFiles ( "./**/*.Tests.csproj" ) ,
222195 action : ( BuildConfig buildConfig , Path testProject ) =>
223196 RunTests ( buildConfig , testProject , filter : "Category=\" CSFLE\" " ) ) ;
224197
225- Task( "TestCsfleWithMockedKmsNet472" ) . IsDependentOn ( "TestCsfleWithMockedKms" ) ;
226- Task( "TestCsfleWithMockedKmsNetStandard21" ) . IsDependentOn ( "TestCsfleWithMockedKms" ) ;
227- Task( "TestCsfleWithMockedKmsNet60" ) . IsDependentOn ( "TestCsfleWithMockedKms" ) ;
228-
229198Task( "TestCsfleWithMongocryptd" )
230199 . IsDependentOn ( "TestLibMongoCrypt" )
231200 . DoesForEach (
232201 items : GetFiles ( "./**/*.Tests.csproj" ) ,
233202 action : ( BuildConfig buildConfig , Path testProject ) =>
234203 RunTests ( buildConfig , testProject , filter : "Category=\" CSFLE\" " ) ) ;
235204
236- Task( "TestCsfleWithMongocryptdNet472" ) . IsDependentOn ( "TestCsfleWithMongocryptd" ) ;
237- Task( "TestCsfleWithMongocryptdNetStandard21" ) . IsDependentOn ( "TestCsfleWithMongocryptd" ) ;
238- Task( "TestCsfleWithMongocryptdNet60" ) . IsDependentOn ( "TestCsfleWithMongocryptd" ) ;
239-
240205Task( "TestCsfleWithAzureKms" )
241206 . IsDependentOn ( "TestLibMongoCrypt" )
242207 . DoesForEach (
@@ -258,8 +223,6 @@ Task("TestX509")
258223 action : ( BuildConfig buildConfig , Path testProject ) =>
259224 RunTests ( buildConfig , testProject , filter : "Category=\" X509\" " ) ) ;
260225
261- Task( "TestX509Net60" ) . IsDependentOn ( "TestX509" ) ;
262-
263226Task( "TestSocks5Proxy" )
264227 . IsDependentOn ( "Build" )
265228 . DoesForEach (
@@ -376,12 +339,6 @@ Task("SmokeTests")
376339 } ) ;
377340 } ) ;
378341
379- Task( "SmokeTestsNet472" ) . IsDependentOn ( "SmokeTests" ) ;
380- Task( "SmokeTestsNetCoreApp31" ) . IsDependentOn ( "SmokeTests" ) ;
381- Task( "SmokeTestsNet50" ) . IsDependentOn ( "SmokeTests" ) ;
382- Task( "SmokeTestsNet60" ) . IsDependentOn ( "SmokeTests" ) ;
383- Task( "SmokeTestsNet80" ) . IsDependentOn ( "SmokeTests" ) ;
384-
385342Setup< BuildConfig > (
386343 setupContext =>
387344 {
@@ -392,37 +349,28 @@ Setup<BuildConfig>(
392349 var unknownArchitecture => throw new Exception ( $ "Unknown CPU architecture: { unknownArchitecture } .")
393350 } ;
394351
395- var lowerTarget = target . ToLowerInvariant ( ) ;
396- var framework = lowerTarget switch
352+ var framework = Environment . GetEnvironmentVariable ( "FRAMEWORK" ) ;
353+ if ( string . Equals ( framework , "netstandard2.1" , StringComparison . InvariantCultureIgnoreCase ) )
397354 {
398- string s when s . EndsWith ( "netstandard21" ) || s . EndsWith ( "netcoreapp31" ) => "netcoreapp3.1" ,
399- string s when s . EndsWith ( "net472" ) => "net472" ,
400- string s when s . EndsWith ( "net50" ) => "net5.0" ,
401- string s when s . EndsWith ( "net60" ) => "net6.0" ,
402- string s when s . EndsWith ( "net80" ) => "net8.0" ,
403- _ => null
404- } ;
405-
406- var isReleaseMode = lowerTarget . StartsWith ( "package" ) || lowerTarget == "release" ;
407- var packageVersion = lowerTarget . StartsWith ( "smoketests" ) ? Environment . GetEnvironmentVariable ( "PACKAGE_VERSION" ) : gitVersion . LegacySemVer ;
355+ framework = "netcoreapp3.1" ;
356+ }
408357
409- Console . WriteLine ( $ "Framework: { framework ?? "null (not set)" } , TargetPlatform: { targetPlatform } , IsReleaseMode: { isReleaseMode } , PackageVersion: { packageVersion } ") ;
358+ var packageVersion = target . ToLowerInvariant ( ) . StartsWith ( "smoketests" ) ? Environment . GetEnvironmentVariable ( "PACKAGE_VERSION" ) : gitVersion . LegacySemVer ;
359+ Console . WriteLine ( $ "Framework: { framework ?? "null (not set)" } , TargetPlatform: { targetPlatform } , PackageVersion: { packageVersion } ") ;
410360
411- return new BuildConfig ( isReleaseMode , framework , targetPlatform , packageVersion ) ;
361+ return new BuildConfig ( framework , targetPlatform , packageVersion ) ;
412362 } ) ;
413363
414364RunTarget( target ) ;
415365
416366public class BuildConfig
417367{
418- public bool IsReleaseMode { get ; }
419368 public string Framework { get ; }
420369 public string PackageVersion { get ; }
421370 public string TargetPlatform { get ; }
422371
423- public BuildConfig ( bool isReleaseMode , string framework , string targetPlatform , string packageVersion )
372+ public BuildConfig( string framework , string targetPlatform , string packageVersion )
424373 {
425- IsReleaseMode = isReleaseMode ;
426374 Framework = framework;
427375 TargetPlatform = targetPlatform;
428376 PackageVersion = packageVersion;
0 commit comments