Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

running dotnet pack in a GitHub action results in MSB4236

Abierto
#397 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
25/100
Tipo de issue
Error
Claridad
Necesita aclaración
Estado de actividad
Estancado
Stack tecnológico
csharp, github-actions, powershell

Línea de trabajo

Comienza con src/CloudTek.Automation.Shell/CloudTek.Automation.Shell.csproj y el workflow de GitHub Actions que ejecuta dotnet pack. Compara los entornos local y de GitHub Actions y, a continuación, sigue la pila de resolución de orígenes de NuGet que se muestra en el error. Se considerará terminado cuando el proyecto se empaquete correctamente tanto en GitHub Action como localmente, sin que se produzca el fallo indicado.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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?

Lenguaje dominante
C#
Estrellas
513
Forks
94
Merge medio
49 min
PR fusionados (30 d)
1

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de microsoft/MSBuildSdks

Todos los issues de microsoft/MSBuildSdks

Issues similares

Más issues de C#

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.