1- return new CakeHost ( )
1+ using Cake . Common . Tools . DotNet ;
2+ using Cake . Common . Tools . DotNet . Build ;
3+ using Cake . Common . Tools . DotNet . NuGet . Push ;
4+ using Cake . Common . Tools . DotNet . Pack ;
5+ using Cake . Common . Tools . DotNet . Test ;
6+
7+ return new CakeHost ( )
28 . UseContext < BuildContext > ( )
39 . Run ( args ) ;
410
@@ -41,11 +47,11 @@ public sealed class BuildTask : FrostingTask<BuildContext>
4147{
4248 public override void Run ( BuildContext context )
4349 {
44- context . DotNetCoreBuild ( context . SlnFilePath ,
45- new DotNetCoreBuildSettings
46- {
47- Configuration = context . BuildConfiguration
48- } ) ;
50+ context . DotNetBuild ( context . SlnFilePath ,
51+ new DotNetBuildSettings
52+ {
53+ Configuration = context . BuildConfiguration
54+ } ) ;
4955 }
5056}
5157
@@ -56,7 +62,7 @@ public override void Run(BuildContext context)
5662 {
5763 const string testResults = "results.trx" ;
5864
59- var settings = new DotNetCoreTestSettings
65+ var settings = new DotNetTestSettings
6066 {
6167 NoRestore = ! context . ForceRestore ,
6268 NoBuild = ! context . ForceBuild ,
@@ -115,7 +121,7 @@ public override void Run(BuildContext context)
115121 {
116122 string testFilePrefix = targetFramework . Replace ( "." , "-" ) ;
117123 settings . ArgumentCustomization = args => args . Append ( $ " --logger \" trx;LogFileName={ testFilePrefix } _{ testResults } \" ") ;
118- context . DotNetCoreTest ( testProjectPath , settings ) ;
124+ context . DotNetTest ( testProjectPath , settings ) ;
119125 }
120126 context . Warning ( "==============================================================" ) ;
121127 }
@@ -137,16 +143,16 @@ public override void Run(BuildContext context)
137143
138144 FilePath packageCsProj = context . PackageIdProjMap [ context . PackageId ] ;
139145
140- var settings = new DotNetCorePackSettings
146+ var settings = new DotNetPackSettings
141147 {
142148 Configuration = context . BuildConfiguration ,
143149 OutputDirectory = context . ArtifactOutput ,
144- MSBuildSettings = new DotNetCoreMSBuildSettings ( )
150+ MSBuildSettings = new DotNetMSBuildSettings ( )
145151 } ;
146152
147153 settings . MSBuildSettings . SetVersion ( context . PackageVersion ) ;
148154
149- context . DotNetCorePack ( packageCsProj . FullPath , settings ) ;
155+ context . DotNetPack ( packageCsProj . FullPath , settings ) ;
150156 }
151157
152158 private static void ValidatePackageVersion ( BuildContext context )
@@ -201,7 +207,7 @@ public override void Run(BuildContext context)
201207 string packageSecret = context . PackageSecret ;
202208 string packageSource = context . PackageSourceMap [ context . PackageSource ] ;
203209
204- context . DotNetCoreNuGetPush ( packageFile . Path . FullPath , new DotNetCoreNuGetPushSettings ( )
210+ context . DotNetNuGetPush ( packageFile . Path . FullPath , new DotNetNuGetPushSettings ( )
205211 {
206212 ApiKey = packageSecret ,
207213 Source = packageSource ,
0 commit comments