Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

running dotnet pack in a GitHub action results in MSB4236

オープン
#397 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
csharp, github-actions, powershell

調査の方向性

src/CloudTek.Automation.Shell/CloudTek.Automation.Shell.csproj と dotnet pack を実行する GitHub Actions ワークフローから始めます。ローカル環境と GitHub Actions 環境を比較し、その後、エラーに表示されている NuGet のソース解決スタックを追跡します。GitHub Action とローカルの両方で、報告された失敗が発生せずにプロジェクトを正常にパッケージ化できれば完了です。

索引モデルが issue の本文から書いたものです。

説明

I have a .csproj project used to hold powershell scripts:

<Project Sdk="Microsoft.Build.NoTargets">
  <PropertyGroup>
    <TargetFramework>net6.0</TargetFramework>
    <VersionPrefix>1.0.0</VersionPrefix>
    <Authors>mmisztal1980</Authors>
    <Company>cloud-tek</Company>
    <PackageTags>k8s kubernetes powershell automation</PackageTags>
    <RepositoryUrl>https://github.com/cloud-tek/automation</RepositoryUrl>
    <Description>
      This package contains reusable kubernetes powershell automation
    </Description>
  </PropertyGroup>

  <ItemGroup>
    <Content Include="*.ps*1">
      <Pack>true</Pack>
      <PackagePath>.</PackagePath>
    </Content>
  </ItemGroup>
</Project>

When running dotnet pack locally, the project builds fine.
When running dotnet pack in a github action, I'm getting a:

Error: /home/runner/work/automation/automation/src/CloudTek.Automation.Shell/CloudTek.Automation.Shell.csproj : error : System.AggregateException: One or more errors occurred. (Object reference not set to an instance of an object.)
  08:54:22 [ERR] /home/runner/work/automation/automation/src/CloudTek.Automation.Shell/CloudTek.Automation.Shell.csproj : error : System.AggregateException: One or more errors occurred. (Object reference not set to an instance of an object.)
  Error: /home/runner/work/automation/automation/src/CloudTek.Automation.Shell/CloudTek.Automation.Shell.csproj : error :  ---> System.NullReferenceException: Object reference not set to an instance of an object.
  08:54:22 [ERR] /home/runner/work/automation/automation/src/CloudTek.Automation.Shell/CloudTek.Automation.Shell.csproj : error :  ---> System.NullReferenceException: Object reference not set to an instance of an object.
  Error: /home/runner/work/automation/automation/src/CloudTek.Automation.Shell/CloudTek.Automation.Shell.csproj : error :    at NuGet.Protocol.ServiceIndexResourceV3Provider.GetServiceIndexResourceV3(SourceRepository source, DateTime utcNow, ILogger log, CancellationToken token)
  08:54:22 [ERR] /home/runner/work/automation/automation/src/CloudTek.Automation.Shell/CloudTek.Automation.Shell.csproj : error :    at NuGet.Protocol.ServiceIndexResourceV3Provider.GetServiceIndexResourceV3(SourceRepository source, DateTime utcNow, ILogger log, CancellationToken token)
  Error: /home/runner/work/automation/automation/src/CloudTek.Automation.Shell/CloudTek.Automation.Shell.csproj : error :    at NuGet.Protocol.ServiceIndexResourceV3Provider.TryCreate(SourceRepository source, CancellationToken token)
  08:54:22 [ERR] /home/runner/work/automation/automation/src/CloudTek.Automation.Shell/CloudTek.Automation.Shell.csproj : error :    at NuGet.Protocol.ServiceIndexResourceV3Provider.TryCreate(SourceRepository source, CancellationToken token)
  Error: /home/runner/work/automation/automation/src/CloudTek.Automation.Shell/CloudTek.Automation.Shell.csproj : error :    at NuGet.Protocol.Core.Types.SourceRepository.GetResourceAsync[T](CancellationToken token)
  08:54:22 [ERR] /home/runner/work/automation/automation/src/CloudTek.Automation.Shell/CloudTek.Automation.Shell.csproj : error :    at NuGet.Protocol.Core.Types.SourceRepository.GetResourceAsync[T](CancellationToken token)
  Error: /home/runner/work/automation/automation/src/CloudTek.Automation.Shell/CloudTek.Automation.Shell.csproj : error :    at NuGet.Protocol.Core.Types.SourceRepository.GetResourceAsync[T]()
  08:54:22 [ERR] /home/runner/work/automation/automation/src/CloudTek.Automation.Shell/CloudTek.Automation.Shell.csproj : error :    at NuGet.Protocol.Core.Types.SourceRepository.GetResourceAsync[T]()
  Error: /home/runner/work/automation/automation/src/CloudTek.Automation.Shell/CloudTek.Automation.Shell.csproj : error :    at NuGet.Protocol.HttpFileSystemBasedFindPackageByIdResourceProvider.TryCreate(SourceRepository sourceRepository, CancellationToken token)
  08:54:22 [ERR] /home/runner/work/automation/automation/src/CloudTek.Automation.Shell/CloudTek.Automation.Shell.csproj : error :    at NuGet.Protocol.HttpFileSystemBasedFindPackageByIdResourceProvider.TryCreate(SourceRepository sourceRepository, CancellationToken token)
  Error: /home/runner/work/automation/automation/src/CloudTek.Automation.Shell/CloudTek.Automation.Shell.csproj : error :    at NuGet.Protocol.Core.Types.SourceRepository.GetResourceAsync[T](CancellationToken token)
  08:54:22 [ERR] /home/runner/work/automation/automation/src/CloudTek.Automation.Shell/CloudTek.Automation.Shell.csproj : error :    at NuGet.Protocol.Core.Types.SourceRepository.GetResourceAsync[T](CancellationToken token)
  Error: /home/runner/work/automation/automation/src/CloudTek.Automation.Shell/CloudTek.Automation.Shell.csproj : error :    at NuGet.Protocol.Core.Types.SourceRepository.GetResourceAsync[T]()
  08:54:22 [ERR] /home/runner/work/automation/automation/src/CloudTek.Automation.Shell/CloudTek.Automation.Shell.csproj : error :    at NuGet.Protocol.Core.Types.SourceRepository.GetResourceAsync[T]()
  Error: /home/runner/work/automation/automation/src/CloudTek.Automation.Shell/CloudTek.Automation.Shell.csproj : error :    at NuGet.Commands.SourceRepositoryDependencyProvider.EnsureResource()
  08:54:22 [ERR] /home/runner/work/automation/automation/src/CloudTek.Automation.Shell/CloudTek.Automation.Shell.csproj : error :    at NuGet.Commands.SourceRepositoryDependencyProvider.EnsureResource()
  Error: /home/runner/work/automation/automation/src/CloudTek.Automation.Shell/CloudTek.Automation.Shell.csproj : error :    at NuGet.Commands.SourceRepositoryDependencyProvider.FindLibraryCoreAsync(LibraryRange libraryRange, SourceCacheContext cacheContext, ILogger logger, CancellationToken cancellationToken)
  08:54:22 [ERR] /home/runner/work/automation/automation/src/CloudTek.Automation.Shell/CloudTek.Automation.Shell.csproj : error :    at NuGet.Commands.SourceRepositoryDependencyProvider.FindLibraryCoreAsync(LibraryRange libraryRange, SourceCacheContext cacheContext, ILogger logger, CancellationToken cancellationToken)
  Error: /home/runner/work/automation/automation/src/CloudTek.Automation.Shell/CloudTek.Automation.Shell.csproj : error :    at NuGet.Commands.SourceRepositoryDependencyProvider.<>c__DisplayClass21_0.<<FindLibraryAsync>b__0>d.MoveNext()
  08:54:22 [ERR] /home/runner/work/automation/automation/src/CloudTek.Automation.Shell/CloudTek.Automation.Shell.csproj : error :    at NuGet.Commands.SourceRepositoryDependencyProvider.<>c__DisplayClass21_0.<<FindLibraryAsync>b__0>d.MoveNext()
  Error: /home/runner/work/automation/automation/src/CloudTek.Automation.Shell/CloudTek.Automation.Shell.csproj : error : --- End of stack trace from previous location ---
  08:54:22 [ERR] /home/runner/work/automation/automation/src/CloudTek.Automation.Shell/CloudTek.Automation.Shell.csproj : error : --- End of stack trace from previous location ---
  Error: /home/runner/work/automation/automation/src/CloudTek.Automation.Shell/CloudTek.Automation.Shell.csproj : error :    at NuGet.Commands.SourceRepositoryDependencyProvider.FindLibraryAsync(LibraryRange libraryRange, NuGetFramework targetFramework, SourceCacheContext cacheContext, ILogger logger, CancellationToken cancellationToken)
  08:54:22 [ERR] /home/runner/work/automation/automation/src/CloudTek.Automation.Shell/CloudTek.Automation.Shell.csproj : error :    at NuGet.Commands.SourceRepositoryDependencyProvider.FindLibraryAsync(LibraryRange libraryRange, NuGetFramework targetFramework, SourceCacheContext cacheContext, ILogger logger, CancellationToken cancellationToken)
  Error: /home/runner/work/automation/automation/src/CloudTek.Automation.Shell/CloudTek.Automation.Shell.csproj : error :    at NuGet.DependencyResolver.ResolverUtility.<FindLibraryFromSourcesAsync>g__FindLibraryFromProviderAsync|9_0(IRemoteDependencyProvider provider, LibraryRange libraryRange, NuGetFramework framework, SourceCacheContext cacheContext, ILogger logger, CancellationToken token)
  08:54:22 [ERR] /home/runner/work/automation/automation/src/CloudTek.Automation.Shell/CloudTek.Automation.Shell.csproj : error :    at NuGet.DependencyResolver.ResolverUtility.<FindLibraryFromSourcesAsync>g__FindLibraryFromProviderAsync|9_0(IRemoteDependencyProvider provider, LibraryRange libraryRange, NuGetFramework framework, SourceCacheContext cacheContext, ILogger logger, CancellationToken token)
  Error: /home/runner/work/automation/automation/src/CloudTek.Automation.Shell/CloudTek.Automation.Shell.csproj : error :    at NuGet.DependencyResolver.ResolverUtility.FindLibraryFromSourcesAsync(LibraryRange libraryRange, IEnumerable`1 providers, NuGetFramework framework, SourceCacheContext cacheContext, ILogger logger, CancellationToken token)
  08:54:22 [ERR] /home/runner/work/automation/automation/src/CloudTek.Automation.Shell/CloudTek.Automation.Shell.csproj : error :    at NuGet.DependencyResolver.ResolverUtility.FindLibraryFromSourcesAsync(LibraryRange libraryRange, IEnumerable`1 providers, NuGetFramework framework, SourceCacheContext cacheContext, ILogger logger, CancellationToken token)
  Error: /home/runner/work/automation/automation/src/CloudTek.Automation.Shell/CloudTek.Automation.Shell.csproj : error :    at NuGet.DependencyResolver.ResolverUtility.FindLibraryByVersionAsync(LibraryRange libraryRange, NuGetFramework framework, IEnumerable`1 providers, SourceCacheContext cacheContext, ILogger logger, CancellationToken token)
  08:54:22 [ERR] /home/runner/work/automation/automation/src/CloudTek.Automation.Shell/CloudTek.Automation.Shell.csproj : error :    at NuGet.DependencyResolver.ResolverUtility.FindLibraryByVersionAsync(LibraryRange libraryRange, NuGetFramework framework, IEnumerable`1 providers, SourceCacheContext cacheContext, ILogger logger, CancellationToken token)
  Error: /home/runner/work/automation/automation/src/CloudTek.Automation.Shell/CloudTek.Automation.Shell.csproj : error :    at NuGet.DependencyResolver.ResolverUtility.FindPackageLibraryMatchAsync(LibraryRange libraryRange, NuGetFramework framework, IEnumerable`1 remoteProviders, IEnumerable`1 localProviders, SourceCacheContext cacheContext, ILogger logger, CancellationToken cancellationToken)
  08:54:22 [ERR] /home/runner/work/automation/automation/src/CloudTek.Automation.Shell/CloudTek.Automation.Shell.csproj : error :    at NuGet.DependencyResolver.ResolverUtility.FindPackageLibraryMatchAsync(LibraryRange libraryRange, NuGetFramework framework, IEnumerable`1 remoteProviders, IEnumerable`1 localProviders, SourceCacheContext cacheContext, ILogger logger, CancellationToken cancellationToken)
  Error: /home/runner/work/automation/automation/src/CloudTek.Automation.Shell/CloudTek.Automation.Shell.csproj : error :    at NuGet.DependencyResolver.ResolverUtility.FindLibraryMatchAsync(LibraryRange libraryRange, NuGetFramework framework, String runtimeIdentifier, IEnumerable`1 remoteProviders, IEnumerable`1 localProviders, IEnumerable`1 projectProviders, IDictionary`2 lockFileLibraries, SourceCacheContext cacheContext, ILogger logger, CancellationToken cancellationToken)
  08:54:22 [ERR] /home/runner/work/automation/automation/src/CloudTek.Automation.Shell/CloudTek.Automation.Shell.csproj : error :    at NuGet.DependencyResolver.ResolverUtility.FindLibraryMatchAsync(LibraryRange libraryRange, NuGetFramework framework, String runtimeIdentifier, IEnumerable`1 remoteProviders, IEnumerable`1 localProviders, IEnumerable`1 projectProviders, IDictionary`2 lockFileLibraries, SourceCacheContext cacheContext, ILogger logger, CancellationToken cancellationToken)
  Error: /home/runner/work/automation/automation/src/CloudTek.Automation.Shell/CloudTek.Automation.Shell.csproj : error :    at NuGet.DependencyResolver.ResolverUtility.FindLibraryEntryAsync(LibraryRange libraryRange, NuGetFramework framework, String runtimeIdentifier, RemoteWalkContext context, CancellationToken cancellationToken)
  08:54:22 [ERR] /home/runner/work/automation/automation/src/CloudTek.Automation.Shell/CloudTek.Automation.Shell.csproj : error :    at NuGet.DependencyResolver.ResolverUtility.FindLibraryEntryAsync(LibraryRange libraryRange, NuGetFramework framework, String runtimeIdentifier, RemoteWalkContext context, CancellationToken cancellationToken)
  Error: /home/runner/work/automation/automation/src/CloudTek.Automation.Shell/CloudTek.Automation.Shell.csproj : error :    at NuGet.DependencyResolver.RemoteDependencyWalker.CreateGraphNode(LibraryRange libraryRange, NuGetFramework framework, String runtimeName, RuntimeGraph runtimeGraph, Func`2 predicate, GraphEdge`1 outerEdge, TransitiveCentralPackageVersions transitiveCentralPackageVersions)
  08:54:22 [ERR] /home/runner/work/automation/automation/src/CloudTek.Automation.Shell/CloudTek.Automation.Shell.csproj : error :    at NuGet.DependencyResolver.RemoteDependencyWalker.CreateGraphNode(LibraryRange libraryRange, NuGetFramework framework, String runtimeName, RuntimeGraph runtimeGraph, Func`2 predicate, GraphEdge`1 outerEdge, TransitiveCentralPackageVersions transitiveCentralPackageVersions)
  Error: /home/runner/work/automation/automation/src/CloudTek.Automation.Shell/CloudTek.Automation.Shell.csproj : error :    at NuGet.DependencyResolver.RemoteDependencyWalker.CreateGraphNode(LibraryRange libraryRange, NuGetFramework framework, String runtimeName, RuntimeGraph runtimeGraph, Func`2 predicate, GraphEdge`1 outerEdge, TransitiveCentralPackageVersions transitiveCentralPackageVersions)
  08:54:22 [ERR] /home/runner/work/automation/automation/src/CloudTek.Automation.Shell/CloudTek.Automation.Shell.csproj : error :    at NuGet.DependencyResolver.RemoteDependencyWalker.CreateGraphNode(LibraryRange libraryRange, NuGetFramework framework, String runtimeName, RuntimeGraph runtimeGraph, Func`2 predicate, GraphEdge`1 outerEdge, TransitiveCentralPackageVersions transitiveCentralPackageVersions)
  Error: /home/runner/work/automation/automation/src/CloudTek.Automation.Shell/CloudTek.Automation.Shell.csproj : error :    at NuGet.DependencyResolver.RemoteDependencyWalker.WalkAsync(LibraryRange library, NuGetFramework framework, String runtimeIdentifier, RuntimeGraph runtimeGraph, Boolean recursive)
  08:54:22 [ERR] /home/runner/work/automation/automation/src/CloudTek.Automation.Shell/CloudTek.Automation.Shell.csproj : error :    at NuGet.DependencyResolver.RemoteDependencyWalker.WalkAsync(LibraryRange library, NuGetFramework framework, String runtimeIdentifier, RuntimeGraph runtimeGraph, Boolean recursive)
  Error: /home/runner/work/automation/automation/src/CloudTek.Automation.Shell/CloudTek.Automation.Shell.csproj : error :    at NuGet.Commands.ProjectRestoreCommand.WalkDependenciesAsync(LibraryRange projectRange, NuGetFramework framework, String runtimeIdentifier, RuntimeGraph runtimeGraph, RemoteDependencyWalker walker, RemoteWalkContext context, CancellationToken token)
  08:54:22 [ERR] /home/runner/work/automation/automation/src/CloudTek.Automation.Shell/CloudTek.Automation.Shell.csproj : error :    at NuGet.Commands.ProjectRestoreCommand.WalkDependenciesAsync(LibraryRange projectRange, NuGetFramework framework, String runtimeIdentifier, RuntimeGraph runtimeGraph, RemoteDependencyWalker walker, RemoteWalkContext context, CancellationToken token)
  Error: /home/runner/work/automation/automation/src/CloudTek.Automation.Shell/CloudTek.Automation.Shell.csproj : error :    at NuGet.Commands.ProjectRestoreCommand.TryRestoreAsync(LibraryRange projectRange, IEnumerable`1 frameworkRuntimePairs, NuGetv3LocalRepository userPackageFolder, IReadOnlyList`1 fallbackPackageFolders, RemoteDependencyWalker remoteWalker, RemoteWalkContext context, Boolean forceRuntimeGraphCreation, CancellationToken token, TelemetryActivity telemetryActivity, String telemetryPrefix)
  08:54:22 [ERR] /home/runner/work/automation/automation/src/CloudTek.Automation.Shell/CloudTek.Automation.Shell.csproj : error :    at NuGet.Commands.ProjectRestoreCommand.TryRestoreAsync(LibraryRange projectRange, IEnumerable`1 frameworkRuntimePairs, NuGetv3LocalRepository userPackageFolder, IReadOnlyList`1 fallbackPackageFolders, RemoteDependencyWalker remoteWalker, RemoteWalkContext context, Boolean forceRuntimeGraphCreation, CancellationToken token, TelemetryActivity telemetryActivity, String telemetryPrefix)
  Error: /home/runner/work/automation/automation/src/CloudTek.Automation.Shell/CloudTek.Automation.Shell.csproj : error :    at NuGet.Commands.RestoreCommand.ExecuteRestoreAsync(NuGetv3LocalRepository userPackageFolder, IReadOnlyList`1 fallbackPackageFolders, RemoteWalkContext context, CancellationToken token, TelemetryActivity telemetryActivity)
  08:54:22 [ERR] /home/runner/work/automation/automation/src/CloudTek.Automation.Shell/CloudTek.Automation.Shell.csproj : error :    at NuGet.Commands.RestoreCommand.ExecuteRestoreAsync(NuGetv3LocalRepository userPackageFolder, IReadOnlyList`1 fallbackPackageFolders, RemoteWalkContext context, CancellationToken token, TelemetryActivity telemetryActivity)
  Error: /home/runner/work/automation/automation/src/CloudTek.Automation.Shell/CloudTek.Automation.Shell.csproj : error :    at NuGet.Commands.RestoreCommand.ExecuteAsync(CancellationToken token)
  08:54:22 [ERR] /home/runner/work/automation/automation/src/CloudTek.Automation.Shell/CloudTek.Automation.Shell.csproj : error :    at NuGet.Commands.RestoreCommand.ExecuteAsync(CancellationToken token)
  Error: /home/runner/work/automation/automation/src/CloudTek.Automation.Shell/CloudTek.Automation.Shell.csproj : error :    at NuGet.Commands.RestoreRunner.ExecuteAsync(RestoreSummaryRequest summaryRequest, CancellationToken token)
  08:54:22 [ERR] /home/runner/work/automation/automation/src/CloudTek.Automation.Shell/CloudTek.Automation.Shell.csproj : error :    at NuGet.Commands.RestoreRunner.ExecuteAsync(RestoreSummaryRequest summaryRequest, CancellationToken token)
  Error: /home/runner/work/automation/automation/src/CloudTek.Automation.Shell/CloudTek.Automation.Shell.csproj : error :    at NuGet.Commands.RestoreRunner.CompleteTaskAsync(List`1 restoreTasks)
  08:54:22 [ERR] /home/runner/work/automation/automation/src/CloudTek.Automation.Shell/CloudTek.Automation.Shell.csproj : error :    at NuGet.Commands.RestoreRunner.CompleteTaskAsync(List`1 restoreTasks)
  Error: /home/runner/work/automation/automation/src/CloudTek.Automation.Shell/CloudTek.Automation.Shell.csproj : error :    at NuGet.Commands.RestoreRunner.RunWithoutCommit(IEnumerable`1 restoreRequests, RestoreArgs restoreContext)
  08:54:22 [ERR] /home/runner/work/automation/automation/src/CloudTek.Automation.Shell/CloudTek.Automation.Shell.csproj : error :    at NuGet.Commands.RestoreRunner.RunWithoutCommit(IEnumerable`1 restoreRequests, RestoreArgs restoreContext)
  Error: /home/runner/work/automation/automation/src/CloudTek.Automation.Shell/CloudTek.Automation.Shell.csproj : error :    --- End of inner exception stack trace ---
  08:54:22 [ERR] /home/runner/work/automation/automation/src/CloudTek.Automation.Shell/CloudTek.Automation.Shell.csproj : error :    --- End of inner exception stack trace ---
  Error: /home/runner/work/automation/automation/src/CloudTek.Automation.Shell/CloudTek.Automation.Shell.csproj : error :    at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
  08:54:22 [ERR] /home/runner/work/automation/automation/src/CloudTek.Automation.Shell/CloudTek.Automation.Shell.csproj : error :    at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
  Error: /home/runner/work/automation/automation/src/CloudTek.Automation.Shell/CloudTek.Automation.Shell.csproj : error :    at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
  08:54:22 [ERR] /home/runner/work/automation/automation/src/CloudTek.Automation.Shell/CloudTek.Automation.Shell.csproj : error :    at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
  Error: /home/runner/work/automation/automation/src/CloudTek.Automation.Shell/CloudTek.Automation.Shell.csproj : error :    at System.Threading.Tasks.Task`1.get_Result()
  08:54:22 [ERR] /home/runner/work/automation/automation/src/CloudTek.Automation.Shell/CloudTek.Automation.Shell.csproj : error :    at System.Threading.Tasks.Task`1.get_Result()
  Error: /home/runner/work/automation/automation/src/CloudTek.Automation.Shell/CloudTek.Automation.Shell.csproj : error :    at Microsoft.Build.NuGetSdkResolver.NuGetSdkResolver.NuGetAbstraction.GetSdkResult(SdkReference sdk, Object nuGetVersion, SdkResolverContext context, SdkResultFactory factory)
  08:54:22 [ERR] /home/runner/work/automation/automation/src/CloudTek.Automation.Shell/CloudTek.Automation.Shell.csproj : error :    at Microsoft.Build.NuGetSdkResolver.NuGetSdkResolver.NuGetAbstraction.GetSdkResult(SdkReference sdk, Object nuGetVersion, SdkResolverContext context, SdkResultFactory factory)
  Error: /home/runner/work/automation/automation/src/CloudTek.Automation.Shell/CloudTek.Automation.Shell.csproj : error MSB4236: The SDK 'Microsoft.Build.NoTargets' specified could not be found.
  08:54:22 [ERR] /home/runner/work/automation/automation/src/CloudTek.Automation.Shell/CloudTek.Automation.Shell.csproj : error MSB4236: The SDK 'Microsoft.Build.NoTargets' specified could not be found.
  Error: Target "Pack" failed
  08:54:22 [ERR] Target Pack failed
  Nuke.Common.Tooling.ProcessException: Process 'dotnet' exited with code 1.
     > /home/runner/.dotnet/dotnet pack /home/runner/work/automation/automation/src/CloudTek.Automation.Shell/CloudTek.Automation.Shell.csproj --configuration Release --output /home/runner/work/automation/automation/artifacts/packages/CloudTek.Automation.Shell /property:Version=0.1.52 /property:FileVersion=0.1.52.0 /property:AssemblyVersion=0.1.52.0
     @ /home/runner/work/automation/automation
  
     at Nuke.Common.Tooling.ProcessExtensions.AssertZeroExitCode(IProcess process)
     at Nuke.Common.Tools.DotNet.DotNetTasks.DotNetPack(DotNetPackSettings toolSettings)
     at Nuke.Common.Tools.DotNet.DotNetTasks.DotNetPack(Configure`1 configurator)
     at CloudTek.Build.SmartBuild.<get_Pack>b__30_3(Artifact artifact)
     at Nuke.Common.Utilities.Collections.EnumerableExtensions.ForEach[T](IEnumerable`1 enumerable, Action`1 action)
     at CloudTek.Build.SmartBuild.<get_Pack>b__30_1()
     at Nuke.Common.Execution.BuildExecutor.<>c.<Execute>b__4_2(Action x)
     at Nuke.Common.Utilities.Collections.EnumerableExtensions.ForEach[T](IEnumerable`1 enumerable, Action`1 action)
     at Nuke.Common.Execution.BuildExecutor.Execute(NukeBuild build, ExecutableTarget target, IReadOnlyCollection`1 previouslyExecutedTargets, Boolean failureMode)

The root of the project contains a global.json file:

{
  "tools": { "dotnet": "6.0.401" },
  "msbuild-sdks": { "Microsoft.Build.NoTargets": "3.5.6" }
}

Can anyone explain the phenomenon?

主要言語
C#
スター
513
フォーク
94
平均マージ
49分
マージ済み PR(30日)
1

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

microsoft/MSBuildSdks のほかの issue

microsoft/MSBuildSdks の issue をすべて見る

似ている issue

C# の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。