@@ -407,14 +407,10 @@ public async Task EndToEnd_MultiProjectSolution()
407
407
. Execute ( )
408
408
. Should ( ) . Pass ( ) ;
409
409
410
- // Add 'EnableSdkContainerSupport' property to the ConsoleApp and set TFM
410
+ // set TFM for the console app
411
411
using ( FileStream stream = File . Open ( Path . Join ( newSolutionDir . FullName , "ConsoleApp" , "ConsoleApp.csproj" ) , FileMode . Open , FileAccess . ReadWrite ) )
412
412
{
413
413
XDocument document = await XDocument . LoadAsync ( stream , LoadOptions . None , CancellationToken . None ) ;
414
- document
415
- . Descendants ( )
416
- . First ( e => e . Name . LocalName == "PropertyGroup" ) ?
417
- . Add ( new XElement ( "EnableSdkContainerSupport" , "true" ) ) ;
418
414
document
419
415
. Descendants ( )
420
416
. First ( e => e . Name . LocalName == "TargetFramework" )
@@ -452,6 +448,8 @@ public async Task EndToEnd_MultiProjectSolution()
452
448
[ InlineData ( "webapi" , true ) ]
453
449
[ InlineData ( "worker" , false ) ]
454
450
[ InlineData ( "worker" , true ) ]
451
+ [ InlineData ( "console" , true ) ]
452
+ [ InlineData ( "console" , false ) ]
455
453
public async Task EndToEnd_NoAPI_ProjectType ( string projectType , bool addPackageReference )
456
454
{
457
455
DirectoryInfo newProjectDir = new ( Path . Combine ( TestSettings . TestArtifactsDirectory , $ "CreateNewImageTest_{ projectType } _{ addPackageReference } ") ) ;
@@ -503,7 +501,6 @@ public async Task EndToEnd_NoAPI_ProjectType(string projectType, bool addPackage
503
501
var project = XDocument . Load ( projectPath ) ;
504
502
var ns = project . Root ? . Name . Namespace ?? throw new InvalidOperationException ( "Project file is empty" ) ;
505
503
506
- project . Root ? . Add ( new XElement ( "PropertyGroup" , new XElement ( "EnableSDKContainerSupport" , "true" ) ) ) ;
507
504
project . Save ( projectPath ) ;
508
505
}
509
506
@@ -677,8 +674,7 @@ public void EndToEnd_NoAPI_Console(string baseImage)
677
674
$ "/p:ContainerBaseImage={ baseImage } ",
678
675
$ "/p:ContainerRegistry={ DockerRegistryManager . LocalRegistry } ",
679
676
$ "/p:ContainerRepository={ imageName } ",
680
- $ "/p:ContainerImageTag={ imageTag } ",
681
- "/p:EnableSdkContainerSupport=true" )
677
+ $ "/p:ContainerImageTag={ imageTag } ")
682
678
. WithEnvironmentVariable ( "NUGET_PACKAGES" , privateNuGetAssets . FullName )
683
679
. WithWorkingDirectory ( newProjectDir . FullName )
684
680
. Execute ( )
@@ -718,8 +714,7 @@ public void EndToEnd_SingleArch_NoRid()
718
714
"/t:PublishContainer" ,
719
715
$ "/p:ContainerBaseImage={ DockerRegistryManager . FullyQualifiedBaseImageAspNet } ",
720
716
$ "/p:ContainerRepository={ imageName } ",
721
- $ "/p:ContainerImageTag={ imageTag } ",
722
- "/p:EnableSdkContainerSupport=true" )
717
+ $ "/p:ContainerImageTag={ imageTag } ")
723
718
. WithWorkingDirectory ( newProjectDir . FullName )
724
719
. Execute ( ) ;
725
720
commandResult . Should ( ) . Pass ( ) ;
@@ -754,8 +749,7 @@ public void EndToEndMultiArch_LocalRegistry(string imageName)
754
749
"/p:RuntimeIdentifiers=\" linux-x64;linux-arm64\" " ,
755
750
$ "/p:ContainerBaseImage={ DockerRegistryManager . FullyQualifiedBaseImageAspNet } ",
756
751
$ "/p:ContainerRepository={ imageName } ",
757
- $ "/p:ContainerImageTag={ tag } ",
758
- "/p:EnableSdkContainerSupport=true" )
752
+ $ "/p:ContainerImageTag={ tag } ")
759
753
. WithWorkingDirectory ( newProjectDir . FullName )
760
754
. Execute ( ) ;
761
755
@@ -818,7 +812,6 @@ public void MultiArchStillAllowsSingleRID()
818
812
$ "/p:ContainerBaseImage={ DockerRegistryManager . FullyQualifiedBaseImageAspNet } ",
819
813
$ "/p:ContainerRepository={ imageName } ",
820
814
$ "/p:ContainerImageTag={ imageTag } ",
821
- "/p:EnableSdkContainerSupport=true" ,
822
815
"/bl" )
823
816
. WithWorkingDirectory ( newProjectDir . FullName )
824
817
. Execute ( ) ;
@@ -868,7 +861,6 @@ public void MultiArchStillAllowsSingleRIDUsingJustRIDProperties()
868
861
$ "/p:ContainerBaseImage={ DockerRegistryManager . FullyQualifiedBaseImageAspNet } ",
869
862
$ "/p:ContainerRepository={ imageName } ",
870
863
$ "/p:ContainerImageTag={ imageTag } ",
871
- "/p:EnableSdkContainerSupport=true" ,
872
864
"/bl" )
873
865
. WithWorkingDirectory ( newProjectDir . FullName )
874
866
. Execute ( ) ;
@@ -941,8 +933,7 @@ public void EndToEndMultiArch_ArchivePublishing(string imageName)
941
933
$ "/p:ContainerArchiveOutputPath={ archiveOutput } ",
942
934
$ "/p:ContainerBaseImage={ DockerRegistryManager . FullyQualifiedBaseImageAspNet } ",
943
935
$ "/p:ContainerRepository={ imageName } ",
944
- $ "/p:ContainerImageTag={ tag } ",
945
- "/p:EnableSdkContainerSupport=true" )
936
+ $ "/p:ContainerImageTag={ tag } ")
946
937
. WithWorkingDirectory ( newProjectDir . FullName )
947
938
. Execute ( ) ;
948
939
@@ -1012,8 +1003,7 @@ public void EndToEndMultiArch_RemoteRegistry()
1012
1003
$ "/p:ContainerBaseImage={ DockerRegistryManager . FullyQualifiedBaseImageAspNet } ",
1013
1004
$ "/p:ContainerRegistry={ registry } ",
1014
1005
$ "/p:ContainerRepository={ imageName } ",
1015
- $ "/p:ContainerImageTag={ imageTag } ",
1016
- "/p:EnableSdkContainerSupport=true" )
1006
+ $ "/p:ContainerImageTag={ imageTag } ")
1017
1007
. WithWorkingDirectory ( newProjectDir . FullName )
1018
1008
. Execute ( ) ;
1019
1009
@@ -1044,7 +1034,7 @@ public void EndToEndMultiArch_RemoteRegistry()
1044
1034
imageFromRegistry )
1045
1035
. Execute ( )
1046
1036
. Should ( ) . Pass ( ) ;
1047
-
1037
+
1048
1038
// Run the containers
1049
1039
ContainerCli . RunCommand (
1050
1040
_testOutput ,
@@ -1087,8 +1077,7 @@ public void EndToEndMultiArch_ContainerRuntimeIdentifiersOverridesRuntimeIdentif
1087
1077
"/p:ContainerRuntimeIdentifiers=linux-arm64" ,
1088
1078
$ "/p:ContainerBaseImage={ DockerRegistryManager . FullyQualifiedBaseImageAspNet } ",
1089
1079
$ "/p:ContainerRepository={ imageName } ",
1090
- $ "/p:ContainerImageTag={ imageTag } ",
1091
- "/p:EnableSdkContainerSupport=true" )
1080
+ $ "/p:ContainerImageTag={ imageTag } ")
1092
1081
. WithWorkingDirectory ( newProjectDir . FullName )
1093
1082
. Execute ( ) ;
1094
1083
@@ -1138,8 +1127,7 @@ public void EndToEndMultiArch_EnvVariables()
1138
1127
"/p:RuntimeIdentifiers=\" linux-x64;linux-arm64\" " ,
1139
1128
$ "/p:ContainerBaseImage={ DockerRegistryManager . FullyQualifiedBaseImageAspNet } ",
1140
1129
$ "/p:ContainerRepository={ imageName } ",
1141
- $ "/p:ContainerImageTag={ tag } ",
1142
- "/p:EnableSdkContainerSupport=true" )
1130
+ $ "/p:ContainerImageTag={ tag } ")
1143
1131
. WithWorkingDirectory ( newProjectDir . FullName )
1144
1132
. Execute ( )
1145
1133
. Should ( ) . Pass ( ) ;
@@ -1203,8 +1191,7 @@ public void EndToEndMultiArch_Ports()
1203
1191
"/p:RuntimeIdentifiers=\" linux-x64;linux-arm64\" " ,
1204
1192
$ "/p:ContainerBaseImage={ DockerRegistryManager . FullyQualifiedBaseImageAspNet } ",
1205
1193
$ "/p:ContainerRepository={ imageName } ",
1206
- $ "/p:ContainerImageTag={ tag } ",
1207
- "/p:EnableSdkContainerSupport=true" )
1194
+ $ "/p:ContainerImageTag={ tag } ")
1208
1195
. WithWorkingDirectory ( newProjectDir . FullName )
1209
1196
. Execute ( )
1210
1197
. Should ( ) . Pass ( ) ;
@@ -1290,8 +1277,7 @@ public void EndToEndMultiArch_Labels()
1290
1277
"/p:RuntimeIdentifiers=\" linux-x64;linux-arm64\" " ,
1291
1278
$ "/p:ContainerBaseImage={ DockerRegistryManager . FullyQualifiedBaseImageAspNet } ",
1292
1279
$ "/p:ContainerRepository={ imageName } ",
1293
- $ "/p:ContainerImageTag={ tag } ",
1294
- "/p:EnableSdkContainerSupport=true" )
1280
+ $ "/p:ContainerImageTag={ tag } ")
1295
1281
. WithWorkingDirectory ( newProjectDir . FullName )
1296
1282
. Execute ( )
1297
1283
. Should ( ) . Pass ( ) ;
0 commit comments