@@ -85,27 +85,23 @@ public static BuildScript WithDotNet(IAutobuilder<AutobuildOptionsShared> builde
85
85
var installScript = DownloadDotNet ( builder , installDir , ensureDotNetAvailable ) ;
86
86
return BuildScript . Bind ( installScript , installed =>
87
87
{
88
- Dictionary < string , string > ? env ;
88
+ var env = new Dictionary < string , string >
89
+ {
90
+ { "DOTNET_SKIP_FIRST_TIME_EXPERIENCE" , "true" } ,
91
+ { "MSBUILDDISABLENODEREUSE" , "1" }
92
+ } ;
89
93
if ( installed == 0 )
90
94
{
91
95
// The installation succeeded, so use the newly installed .NET Core
92
96
var path = builder . Actions . GetEnvironmentVariable ( "PATH" ) ;
93
97
var delim = builder . Actions . IsWindows ( ) ? ";" : ":" ;
94
- env = new Dictionary < string , string > {
95
- { "DOTNET_MULTILEVEL_LOOKUP" , "false" } , // prevent look up of other .NET Core SDKs
96
- { "DOTNET_SKIP_FIRST_TIME_EXPERIENCE" , "true" } ,
97
- { "MSBUILDDISABLENODEREUSE" , "1" } ,
98
- { "PATH" , installDir + delim + path }
99
- } ;
98
+ env . Add ( "DOTNET_MULTILEVEL_LOOKUP" , "false" ) ; // prevent look up of other .NET Core SDKs
99
+ env . Add ( "PATH" , installDir + delim + path ) ;
100
100
}
101
101
else
102
102
{
103
103
// The .NET SDK was not installed, either because the installation failed or because it was already installed.
104
104
installDir = null ;
105
- env = new Dictionary < string , string > {
106
- { "DOTNET_SKIP_FIRST_TIME_EXPERIENCE" , "true" } ,
107
- { "MSBUILDDISABLENODEREUSE" , "1" }
108
- } ;
109
105
}
110
106
111
107
return f ( installDir , env ) ;
@@ -163,8 +159,7 @@ private static BuildScript DownloadDotNet(IAutobuilder<AutobuildOptionsShared> b
163
159
164
160
if ( ensureDotNetAvailable )
165
161
{
166
- const string latestDotNetSdkVersion = "8.0.101" ;
167
- return DownloadDotNetVersion ( builder , installDir , latestDotNetSdkVersion , needExactVersion : false ) ;
162
+ return DownloadDotNetVersion ( builder , installDir , Constants . LatestDotNetSdkVersion , needExactVersion : false ) ;
168
163
}
169
164
170
165
return BuildScript . Failure ;
0 commit comments