BundlerMinifier icon indicating copy to clipboard operation
BundlerMinifier copied to clipboard

Unable to run dotnet bundle under Azure Devops for .NET Core 3.0

Open bartekkois opened this issue 4 years ago • 5 comments

Installed product versions

  • Azure Devops
  • .NET Core 3.0 app
  • BundlerMinifier.Core 3.2.435

Description

After migrating web app to .NET Core 3.0 and BundlerMinifier.Core to 3.2.435 dotnet bundle under Azure Devops crashes with the following error:

Task         : .NET Core
Description  : Build, test, package, or publish a dotnet application, or run a custom dotnet command
Version      : 2.158.0
Author       : Microsoft Corporation
Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/build/dotnet-core-cli
==============================================================================
[command]/opt/hostedtoolcache/dotnet/dotnet publish /home/vsts/work/1/s/src/GPONMonitor/GPONMonitor.csproj --configuration Release --output /home/vsts/work/1/a/GPONMonitor
Microsoft (R) Build Engine version 16.3.0+0f4c62fea for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

  Restore completed in 17.96 ms for /home/vsts/work/1/s/src/GPONMonitor/GPONMonitor.csproj.
  Restore completed in 37.9 ms for /home/vsts/work/1/s/src/GPONMonitor/GPONMonitor.csproj.
  Restore completed in 39.52 ms for /home/vsts/work/1/s/src/GPONMonitor/GPONMonitor.csproj.
  GPONMonitor -> /home/vsts/work/1/s/src/GPONMonitor/bin/Release/netcoreapp3.0/GPONMonitor.dll
  GPONMonitor -> /home/vsts/work/1/s/src/GPONMonitor/bin/Release/netcoreapp3.0/GPONMonitor.Views.dll
  It was not possible to find any compatible framework version
  The specified framework 'Microsoft.NETCore.App', version '2.0.0' was not found.
    - The following frameworks were found:
        3.0.0 at [/opt/hostedtoolcache/dotnet/shared/Microsoft.NETCore.App]
  
  You can resolve the problem by installing the specified framework and/or SDK.
  
  The .NET Core frameworks can be found at:
    - https://aka.ms/dotnet-download
/home/vsts/work/1/s/src/GPONMonitor/GPONMonitor.csproj(37,5): error MSB3073: The command "dotnet bundle" exited with code 150.
##[error]Error: The process '/opt/hostedtoolcache/dotnet/dotnet' failed with exit code 1
##[error]Dotnet command failed with non-zero exit code on the following projects : /home/vsts/work/1/s/src/GPONMonitor/GPONMonitor.csproj

Steps to recreate

  1. Build code from repository: https://github.com/bartekkois/GPONMonitor under Azure Devops

bartekkois avatar Oct 26 '19 08:10 bartekkois

Likely related to #450, as I also have this issue in my repro there.

martincostello avatar Oct 30 '19 10:10 martincostello

@martincostello look here https://github.com/dotnet/cli/issues/10288

saber-wang avatar Nov 05 '19 09:11 saber-wang

Initially I was getting this exact error. I was able to work around this issue by adding a Use .Net Core task after my Build task and before my Publish task. I set Version to 2.2.106, and set Package to install to SDK (includes runtime). I tried first just having Package to install be Runtime but that didn't work.

I have no idea if this information is helpful for finding a final fix, but at least for now I can build and publish without dotnet bundle failing.

eriksendc avatar Apr 14 '20 20:04 eriksendc

Note that I posted another comment in issue 450 as well.

eriksendc avatar Apr 14 '20 20:04 eriksendc

This libary has so many issues, is it deprecated? Nothing seems to be fixed or maintained

TLA020 avatar Sep 30 '20 19:09 TLA020