We are developing Asp.Net core v2.2 .netcore Web API Application and following CI in our company.
We have tried below code in Cake Script but facing below error while compilation.
Error:
error NETSDK1045: The current .NET SDK does not support targeting .NET Core 2.2. Either target .NET Core 2.1 or lower, or use a version of the .NET SDK that supports .NET Core 2.2
Cake Script:
Task("Build")
.IsDependentOn("Clean")
.IsDependentOn("Restore")
.Does(() => {
try {
MSBuild(solutionFile , settings => settings.SetConfiguration(configuration));
}
catch(Exception ex) {
throw new Exception(String.Format("Please fix the project compilation failures"));
}
});
Cake Version : 0.23.0
How to set the -framework property value .netcoreapp2.2 in Msbuild Action or anyother method to compile this ?