Cake.exe : error CS0234: The type or namespace name 'DotNet' does not exist in the namespace 'Cake.Common.Tools' #3850
Unanswered
dhanrajshimpi123
asked this question in
Extension Q&A
Replies: 1 comment 3 replies
-
|
@dhanrajshimpi123 Sorry to hear to you're having problems. Can you please run |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi All
We are getting error Cake.exe : error CS0234: The type or namespace name 'DotNet' does not exist in the namespace 'Cake.Common.Tools'
We are trying to build dotnetcore3.1 app using CAKE 2.1.0. Also we have install .NET 6 & .NET CORE 3.1 on machine where we run Build.Cake script.
Here is the code snippet of build.cake script.
#addin nuget:?package=Cake.Services&version=1.0.1
#addin nuget:?package=Cake.Powershell&version=1.0.1
#tool nuget:?package=OctopusTools&version=6.13.1
#tool dotnet:?package=Cake.Tool&version=2.1.0
#region Namespaces
using Newtonsoft.Json;
using Cake.Common.Tools.OctopusDeploy;
using Cake.Common.Tools.DotNet.Build;
using Cake.Common.IO;
using Cake.Core.IO;
using Cake.Common.Tools.NuGet.Restore;
Task("Build")
.IsDependentOn("Restore-NuGet-Packages")
.Does((context) =>
{
var buildSettings = new DotNetBuildSettings()
{
Configuration = context.Configuration,
NoRestore = true
};
==================
Error Log:
PS D:\WKH-LRP\CloudServices\Builds\CIBS\EngagementEngine> .\build.ps1
Preparing to run build script...
Running build script...
Tool Cake.Tool is already installed, with required version.
Cake.exe : error CS0234: The type or namespace name 'DotNet' does not exist in the namespace 'Cake.Common.Tools' (are you missing an assembly reference?)
At D:\WKH-LRP\CloudServices\Builds\CIBS\EngagementEngine\build.ps1:241 char:1
D:/WKH-LRP/CloudServices/Builds/CIBS/EngagementEngine/build.cake(131,27): error CS0246: The type or namespace name 'DotNetBuildSettings' could not be found (are you missing a using directive or an assembly reference?)
D:/WKH-LRP/CloudServices/Builds/CIBS/EngagementEngine/build.cake(142,3): error CS0103: The name 'DotNetBuild' does not exist in the current context
D:/WKH-LRP/CloudServices/Builds/CIBS/EngagementEngine/build.cake(146,29): error CS0246: The type or namespace name 'DotNetPublishSettings' could not be found (are you missing a using directive or an assembly reference?)
D:/WKH-LRP/CloudServices/Builds/CIBS/EngagementEngine/build.cake(153,3): error CS0103: The name 'DotNetPublish' does not exist in the current context
Error: Error(s) occurred when compiling build script:
error CS0234: The type or namespace name 'DotNet' does not exist in the namespace 'Cake.Common.Tools' (are you missing an assembly reference?)
D:/WKH-LRP/CloudServices/Builds/CIBS/EngagementEngine/build.cake(131,27): error CS0246: The type or namespace name 'DotNetBuildSettings' could not be found (are you missing a using directive or an assembly reference?)
D:/WKH-LRP/CloudServices/Builds/CIBS/EngagementEngine/build.cake(142,3): error CS0103: The name 'DotNetBuild' does not exist in the current context
D:/WKH-LRP/CloudServices/Builds/CIBS/EngagementEngine/build.cake(146,29): error CS0246: The type or namespace name 'DotNetPublishSettings' could not be found (are you missing a using directive or an assembly reference?)
D:/WKH-LRP/CloudServices/Builds/CIBS/EngagementEngine/build.cake(153,3): error CS0103: The name 'DotNetPublish' does not exist in the current context
Beta Was this translation helpful? Give feedback.
All reactions