当前位置:论坛首页 > Linux面板 > 求助

【已完成】从去年到今年Net创建网站我还是没有学会使用

发表在 Linux面板前天 18:30 [复制链接] 3 61

为了能快速了解并处理您的问题,请提供以下基础信息:
面板、插件版本:bt11.3和bt10.02这两个我都做了测试
系统版本:debian12.12
问题描述:Net建站从去年9月份左右推出之后,我测试就没有成功过,不知道是什么原因,是不是我还没有学会?我每次测试按照官方视频教程使用的blog.core做的测试
相关截图(日志、错误):
/www/server/dotnet/8.0.100/sdk/8.0.100/NuGet.targets(424,5): error MSB4018: “WarnForInvalidProjectsTask”任务意外失败。 [/www/wwwroot/Blog.Core-master/Blog.Core.Api/Blog.Core.Api.csproj]
/www/server/dotnet/8.0.100/sdk/8.0.100/NuGet.targets(424,5): error MSB4018: System.InvalidOperationException: 未设置必需的环境变量“HOME”。请尝试设置“DOTNET_CLI_HOME”或“HOME”并再次运行该操作 [/www/wwwroot/Blog.Core-master/Blog.Core.Api/Blog.Core.Api.csproj]
/www/server/dotnet/8.0.100/sdk/8.0.100/NuGet.targets(424,5): error MSB4018: at NuGet.Common.NuGetEnvironment.GetValueOrThrowMissingEnvVarsDotnet(Func`1 getValue, String home, String dotnetHome) [/www/wwwroot/Blog.Core-master/Blog.Core.Api/Blog.Core.Api.csproj]
/www/server/dotnet/8.0.100/sdk/8.0.100/NuGet.targets(424,5): error MSB4018: at NuGet.Common.NuGetEnvironment.GetHome() [/www/wwwroot/Blog.Core-master/Blog.Core.Api/Blog.Core.Api.csproj]
/www/server/dotnet/8.0.100/sdk/8.0.100/NuGet.targets(424,5): error MSB4018: at NuGet.Common.NuGetEnvironment.<>c.<.cctor>b__20_0() [/www/wwwroot/Blog.Core-master/Blog.Core.Api/Blog.Core.Api.csproj]
/www/server/dotnet/8.0.100/sdk/8.0.100/NuGet.targets(424,5): error MSB4018: at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode) [/www/wwwroot/Blog.Core-master/Blog.Core.Api/Blog.Core.Api.csproj]
/www/server/dotnet/8.0.100/sdk/8.0.100/NuGet.targets(424,5): error MSB4018: at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor) [/www/wwwroot/Blog.Core-master/Blog.Core.Api/Blog.Core.Api.csproj]
/www/server/dotnet/8.0.100/sdk/8.0.100/NuGet.targets(424,5): error MSB4018: at System.Lazy`1.CreateValue() [/www/wwwroot/Blog.Core-master/Blog.Core.Api/Blog.Core.Api.csproj]
/www/server/dotnet/8.0.100/sdk/8.0.100/NuGet.targets(424,5): error MSB4018: at NuGet.Common.NuGetEnvironment.GetFolderPath(SpecialFolder folder) [/www/wwwroot/Blog.Core-master/Blog.Core.Api/Blog.Core.Api.csproj]
/www/server/dotnet/8.0.100/sdk/8.0.100/NuGet.targets(424,5): error MSB4018: at NuGet.Common.NuGetEnvironment.GetFolderPath(NuGetFolderPath folder) [/www/wwwroot/Blog.Core-master/Blog.Core.Api/Blog.Core.Api.csproj]
/www/server/dotnet/8.0.100/sdk/8.0.100/NuGet.targets(424,5): error MSB4018: at NuGet.Common.PathUtility.CheckIfFileSystemIsCaseInsensitive() [/www/wwwroot/Blog.Core-master/Blog.Core.Api/Blog.Core.Api.csproj]
/www/server/dotnet/8.0.100/sdk/8.0.100/NuGet.targets(424,5): error MSB4018: at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode) [/www/wwwroot/Blog.Core-master/Blog.Core.Api/Blog.Core.Api.csproj]
/www/server/dotnet/8.0.100/sdk/8.0.100/NuGet.targets(424,5): error MSB4018: at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor) [/www/wwwroot/Blog.Core-master/Blog.Core.Api/Blog.Core.Api.csproj]
/www/server/dotnet/8.0.100/sdk/8.0.100/NuGet.targets(424,5): error MSB4018: at System.Lazy`1.CreateValue() [/www/wwwroot/Blog.Core-master/Blog.Core.Api/Blog.Core.Api.csproj]
/www/server/dotnet/8.0.100/sdk/8.0.100/NuGet.targets(424,5): error MSB4018: at NuGet.Common.PathUtility.get_IsFileSystemCaseInsensitive() [/www/wwwroot/Blog.Core-master/Blog.Core.Api/Blog.Core.Api.csproj]
/www/server/dotnet/8.0.100/sdk/8.0.100/NuGet.targets(424,5): error MSB4018: at NuGet.Common.PathUtility.GetStringComparerBasedOnOS() [/www/wwwroot/Blog.Core-master/Blog.Core.Api/Blog.Core.Api.csproj]
/www/server/dotnet/8.0.100/sdk/8.0.100/NuGet.targets(424,5): error MSB4018: at NuGet.Build.Tasks.WarnForInvalidProjectsTask.Execute() [/www/wwwroot/Blog.Core-master/Blog.Core.Api/Blog.Core.Api.csproj]
/www/server/dotnet/8.0.100/sdk/8.0.100/NuGet.targets(424,5): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [/www/wwwroot/Blog.Core-master/Blog.Core.Api/Blog.Core.Api.csproj]
/www/server/dotnet/8.0.100/sdk/8.0.100/NuGet.targets(424,5): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask) [/www/wwwroot/Blog.Core-master/Blog.Core.Api/Blog.Core.Api.csproj]
生成失败。请修复生成错误并重新运行。

可能就是我一直没有学会,从去年到现在。到底怎么用堡塔linux面板创建net网站呢?第一次创建都是正常成功的,就是重新启动后,就无法正常运行了,重启后,运行日志如上,我是哪里操作错了?
使用道具 举报 只看该作者 回复
发表于 昨天 10:58 | 显示全部楼层
未设置必需的环境变量“HOME”。请尝试设置“DOTNET_CLI_HOME”或“HOME”并再次运行该操作
这块是核心的原因
设置好对应的环境变量先
root用户启动,设置export HOME=/root,export DOTNET_CLI_HOME=/root/.dotnet
使用道具 举报 回复 支持 反对
发表于 昨天 13:34 | 显示全部楼层
本帖最后由 Eiffi 于 2025-12-8 14:13 编辑
阿珂 发表于 2025-12-8 10:58
未设置必需的环境变量“HOME”。请尝试设置“DOTNET_CLI_HOME”或“HOME”并再次运行该操作
这块是核心的原 ...

那为什么首次创建网站的时候,运行就是正常的。等重新启动后,第二次运行的时候,才出现该参数问题?能不能堡塔面板在创建的时候,自动添加这些缺少的设置?以简化用户不懂linux操作的繁琐
使用道具 举报 回复 支持 反对
发表于 16 分钟前 | 显示全部楼层
重复发帖,此贴关闭
使用道具 举报 回复 支持 反对
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

普通问题处理

论坛响应时间:72小时

问题处理方式:排队(仅解答)

工作时间:白班:9:00 - 18:00

紧急运维服务

响应时间:3分钟

问题处理方式:宝塔专家1对1服务

工作时间:工作日:9:00 - 18:30

宝塔专业团队为您解决服务器疑难问题

点击联系技术分析

工作时间:09:00至18:30

快速回复 返回顶部 返回列表