@@ -131,7 +131,7 @@ private string BuildLocalApp([CallerMemberName] string testName = "TestName", st
131131 . Execute ( )
132132 . Should ( ) . Pass ( ) ;
133133
134- new DotnetCommand ( _testOutput , "publish" , "-bl" , "MinimalTestApp" , "-r" , rid , "-f" , tfm )
134+ new DotnetCommand ( _testOutput , "publish" , "-bl" , "MinimalTestApp" , "-r" , rid , "-f" , tfm , "-c" , "Debug" )
135135 . WithWorkingDirectory ( workingDirectory )
136136 . Execute ( )
137137 . Should ( ) . Pass ( ) ;
@@ -141,11 +141,12 @@ private string BuildLocalApp([CallerMemberName] string testName = "TestName", st
141141 }
142142
143143 [ DockerDaemonAvailableTheory ]
144- [ InlineData ( false ) ]
144+ //ignored until is in: https://github.com/dotnet/sdk/pull/31488 to avoid adding Microsoft.NET.Build.Containers v0.4.0 to feeds
145+ //[InlineData(false)]
145146 [ InlineData ( true ) ]
146147 public async Task EndToEnd_NoAPI_Web ( bool addPackageReference )
147148 {
148- DirectoryInfo newProjectDir = new DirectoryInfo ( Path . Combine ( TestSettings . TestArtifactsDirectory , "CreateNewImageTest ") ) ;
149+ DirectoryInfo newProjectDir = new DirectoryInfo ( Path . Combine ( TestSettings . TestArtifactsDirectory , $ "CreateNewImageTest_ { addPackageReference } ") ) ;
149150 DirectoryInfo privateNuGetAssets = new DirectoryInfo ( Path . Combine ( TestSettings . TestArtifactsDirectory , "ContainerNuGet" ) ) ;
150151
151152 if ( newProjectDir . Exists )
@@ -182,10 +183,7 @@ public async Task EndToEnd_NoAPI_Web(bool addPackageReference)
182183
183184 if ( addPackageReference )
184185 {
185- new DotnetCommand ( _testOutput , "new" , "nugetconfig" )
186- . WithWorkingDirectory ( newProjectDir . FullName )
187- . Execute ( )
188- . Should ( ) . Pass ( ) ;
186+ File . Copy ( Path . Combine ( TestContext . Current . TestExecutionDirectory , "NuGet.config" ) , Path . Combine ( newProjectDir . FullName , "NuGet.config" ) ) ;
189187
190188 new DotnetCommand ( _testOutput , "nuget" , "add" , "source" , packagedir . FullName , "--name" , "local-temp" )
191189 . WithEnvironmentVariable ( "NUGET_PACKAGES" , privateNuGetAssets . FullName )
@@ -194,7 +192,7 @@ public async Task EndToEnd_NoAPI_Web(bool addPackageReference)
194192 . Should ( ) . Pass ( ) ;
195193
196194 // Add package to the project
197- new DotnetCommand ( _testOutput , "add" , "package" , "Microsoft.NET.Build.Containers" , "--prerelease " , "-f ", ToolsetInfo . CurrentTargetFramework )
195+ new DotnetCommand ( _testOutput , "add" , "package" , "Microsoft.NET.Build.Containers" , "-f " , ToolsetInfo . CurrentTargetFramework , "-v ", TestContext . Current . ToolsetUnderTest . SdkVersion )
198196 . WithEnvironmentVariable ( "NUGET_PACKAGES" , privateNuGetAssets . FullName )
199197 . WithWorkingDirectory ( newProjectDir . FullName )
200198 . Execute ( )
@@ -318,18 +316,14 @@ public void EndToEnd_NoAPI_Console()
318316 Assert . Fail ( "No nupkg found in expected package folder. You may need to rerun the build" ) ;
319317 }
320318
321-
322319 new DotnetCommand ( _testOutput , "new" , "console" , "-f" , ToolsetInfo . CurrentTargetFramework )
323320 . WithWorkingDirectory ( newProjectDir . FullName )
324321 // do not pollute the primary/global NuGet package store with the private package(s)
325322 . WithEnvironmentVariable ( "NUGET_PACKAGES" , privateNuGetAssets . FullName )
326323 . Execute ( )
327324 . Should ( ) . Pass ( ) ;
328325
329- new DotnetCommand ( _testOutput , "new" , "nugetconfig" )
330- . WithWorkingDirectory ( newProjectDir . FullName )
331- . Execute ( )
332- . Should ( ) . Pass ( ) ;
326+ File . Copy ( Path . Combine ( TestContext . Current . TestExecutionDirectory , "NuGet.config" ) , Path . Combine ( newProjectDir . FullName , "NuGet.config" ) ) ;
333327
334328 new DotnetCommand ( _testOutput , "nuget" , "add" , "source" , packagedir . FullName , "--name" , "local-temp" )
335329 . WithEnvironmentVariable ( "NUGET_PACKAGES" , privateNuGetAssets . FullName )
@@ -338,7 +332,7 @@ public void EndToEnd_NoAPI_Console()
338332 . Should ( ) . Pass ( ) ;
339333
340334 // Add package to the project
341- new DotnetCommand ( _testOutput , "add" , "package" , "Microsoft.NET.Build.Containers" , "--prerelease " , "-f ", ToolsetInfo . CurrentTargetFramework )
335+ new DotnetCommand ( _testOutput , "add" , "package" , "Microsoft.NET.Build.Containers" , "-f " , ToolsetInfo . CurrentTargetFramework , "-v ", TestContext . Current . ToolsetUnderTest . SdkVersion )
342336 . WithEnvironmentVariable ( "NUGET_PACKAGES" , privateNuGetAssets . FullName )
343337 . WithWorkingDirectory ( newProjectDir . FullName )
344338 . Execute ( )
0 commit comments