I got it to work after adjusting the project path, hope it helps someone:
steps:
- task: DotNetCoreCLI@2
displayName: Publish
inputs:
command: publish
publishWebProjects: false
projects: src/PROJECTNAME.Web.Mvc/PROJECTNAME.Web.Mvc.csproj
arguments: ' --output $(Build.ArtifactStagingDirectory)'
zipAfterPublish: True
Any update?
Followed the original documentation, and then followed your advice above and still running in to the following error:
Build, and restore tasks all run fine.
MSBUILD : error MSB1003: Specify a project or solution file. The current working directory does not contain a project or solution file
##[debug] /home/vsts/work/1/a/**
/opt/hostedtoolcache/dotnet/dotnet publish /home/vsts/work/1/s/**/MBT.Web.Mvc.csproj --configuration Release --framework net6.0 --runtime linux-x64 --self-contained --output /home/vsts/work/1/a/**
Microsoft (R) Build Engine version 17.1.0+ae57d105c for .NET
Copyright (C) Microsoft Corporation. All rights reserved.
MSBUILD : error MSB1003: Specify a project or solution file. The current working directory does not contain a project or solution file.
##[debug]Exit code 1 received from tool '/opt/hostedtoolcache/dotnet/dotnet'
##[debug]STDIO streams have closed for tool '/opt/hostedtoolcache/dotnet/dotnet'
##[error]Error: The process '/opt/hostedtoolcache/dotnet/dotnet' failed with exit code 1
##[debug]Processed: ##vso[task.issue type=error;]Error: The process '/opt/hostedtoolcache/dotnet/dotnet' failed with exit code 1
##[debug]which '/opt/hostedtoolcache/dotnet/dotnet'
##[debug]found: '/opt/hostedtoolcache/dotnet/dotnet'
##[debug]/opt/hostedtoolcache/dotnet/dotnet arg: publish
##[debug]/opt/hostedtoolcache/dotnet/dotnet arg: /home/vsts/work/1/s/src/MBT.Web.Mvc/MBT.Web.Mvc.csproj
##[debug]modifyOutputPath=true
##[debug]/opt/hostedtoolcache/dotnet/dotnet arg: --configuration Release --framework net6.0 --runtime linux-x64 --self-contained --output /home/vsts/work/1/a/MBT.Web.Mvc
##[debug]exec tool: /opt/hostedtoolcache/dotnet/dotnet
##[debug]arguments:
##[debug] publish
##[debug] /home/vsts/work/1/s/src/MBT.Web.Mvc/MBT.Web.Mvc.csproj
##[debug] --configuration
##[debug] Release
##[debug] --framework
##[debug] net6.0
##[debug] --runtime
##[debug] linux-x64
##[debug] --self-contained
##[debug] --output
##[debug] /home/vsts/work/1/a/MBT.Web.Mvc
/opt/hostedtoolcache/dotnet/dotnet publish /home/vsts/work/1/s/src/MBT.Web.Mvc/MBT.Web.Mvc.csproj --configuration Release --framework net6.0 --runtime linux-x64 --self-contained --output /home/vsts/work/1/a/MBT.Web.Mvc
Microsoft (R) Build Engine version 17.1.0+ae57d105c for .NET
Copyright (C) Microsoft Corporation. All rights reserved.
dotnet --list-sdks returns:
6.0.200 [/opt/hostedtoolcache/dotnet/sdk]
We've had a azure pipeline that has been working and after upgrading to the latest version of ABP, it is currently failing on the publish command. dotnet restore and build work fine as they did previously. It is hosted on image: ubuntu-20.04
Error if I specifically target the project in the build task:
MSBUILD : error MSB1003: Specify a project or solution file. The current working directory does not contain a project or solution file.
##[error]Error: The process '/opt/hostedtoolcache/dotnet/dotnet' failed with exit code 1
/opt/hostedtoolcache/dotnet/dotnet publish /home/vsts/work/1/s/src/MBT.Web.Mvc/MBT.Web.Mvc.csproj --configuration Release --output /home/vsts/work/1/a/MBT.Web.Mvc
Microsoft (R) Build Engine version 17.1.0+ae57d105c for .NET
Copyright (C) Microsoft Corporation. All rights reserved.
Determining projects to restore...
Restored /home/vsts/work/1/s/src/MBT.GraphQL/MBT.GraphQL.csproj (in 3.36 sec).
Restored /home/vsts/work/1/s/src/MBT.Web.Core/MBT.Web.Core.csproj (in 3.4 sec).
Restored /home/vsts/work/1/s/src/MBT.EntityFrameworkCore/MBT.EntityFrameworkCore.csproj (in 575 ms).
Restored /home/vsts/work/1/s/src/MBT.Core/MBT.Core.csproj (in 490 ms).
Restored /home/vsts/work/1/s/src/MBT.Core.Shared/MBT.Core.Shared.csproj (in 188 ms).
Restored /home/vsts/work/1/s/src/MBT.Application/MBT.Application.csproj (in 596 ms).
Restored /home/vsts/work/1/s/src/MBT.Application.Shared/MBT.Application.Shared.csproj (in 130 ms).
/home/vsts/work/1/s/src/MBT.Web.Mvc/MBT.Web.Mvc.csproj : error NU1605: Detected package downgrade: System.Net.NameResolution from 4.3.0 to 4.0.0. Reference the package directly from the project to select a different version.
/home/vsts/work/1/s/src/MBT.Web.Mvc/MBT.Web.Mvc.csproj : error NU1605: MBT.Web.Mvc -> MBT.Web.Core -> MBT.Application -> SSH.NET 2016.1.0 -> System.Net.Sockets 4.1.0 -> runtime.unix.System.Net.Sockets 4.3.0 -> System.Net.NameResolution (>= 4.3.0)
/home/vsts/work/1/s/src/MBT.Web.Mvc/MBT.Web.Mvc.csproj : error NU1605: MBT.Web.Mvc -> MBT.Web.Core -> MBT.Application -> SSH.NET 2016.1.0 -> System.Net.NameResolution (>= 4.0.0)
Failed to restore /home/vsts/work/1/s/src/MBT.Web.Mvc/MBT.Web.Mvc.csproj (in 4 sec).
##[error]Error: The process '/opt/hostedtoolcache/dotnet/dotnet' failed with exit code 1
##[warning].NET 5 has some compatibility issues with older Nuget versions(<=5.7), so if you are using an older Nuget version(and not dotnet cli) to restore, then the dotnet cli commands (e.g. dotnet build) which rely on such restored packages might fail. To mitigate such error, you can either: (1) - Use dotnet cli to restore, (2) - Use Nuget version 5.8 to restore, (3) - Use global.json using an older sdk version(<=3) to build
Info: Azure Pipelines hosted agents have been updated and now contain .Net 5.x SDK/Runtime along with the older .Net Core version which are currently lts. Unless you have locked down a SDK version for your project(s), 5.x SDK might be picked up which might have breaking behavior as compared to previous versions. You can learn more about the breaking changes here: https://docs.microsoft.com/en-us/dotnet/core/tools/ and https://docs.microsoft.com/en-us/dotnet/core/compatibility/ . To learn about more such changes and troubleshoot, refer here: https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/build/dotnet-core-cli?view=azure-devops#troubleshooting
##[error]Dotnet command failed with non-zero exit code on the following projects : /home/vsts/work/1/s/**/MBT.Web.Mvc.csproj,/home/vsts/work/1/s/src/MBT.Web.Mvc/MBT.Web.Mvc.csproj
Finishing: Publish
Error if I use previous config:
MBT.Web.Mvc -> /home/vsts/work/1/a/MBT.Web.Mvc/
##[warning].NET 5 has some compatibility issues with older Nuget versions(<=5.7), so if you are using an older Nuget version(and not dotnet cli) to restore, then the dotnet cli commands (e.g. dotnet build) which rely on such restored packages might fail. To mitigate such error, you can either: (1) - Use dotnet cli to restore, (2) - Use Nuget version 5.8 to restore, (3) - Use global.json using an older sdk version(<=3) to build
Info: Azure Pipelines hosted agents have been updated and now contain .Net 5.x SDK/Runtime along with the older .Net Core version which are currently lts. Unless you have locked down a SDK version for your project(s), 5.x SDK might be picked up which might have breaking behavior as compared to previous versions. You can learn more about the breaking changes here: https://docs.microsoft.com/en-us/dotnet/core/tools/ and https://docs.microsoft.com/en-us/dotnet/core/compatibility/ . To learn about more such changes and troubleshoot, refer here: https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/build/dotnet-core-cli?view=azure-devops#troubleshooting
##[error]Dotnet command failed with non-zero exit code on the following projects : /home/vsts/work/1/s/**/MBT.Web.Mvc.csproj
Finishing: Publish
Let me know if you have any questions
In our project, we need filter dropdown values and MapBoxMapLoadLimitPerTenant to validate a map load. currently i'm getting this data by calling:
$.getJSON('/App/Jobs/GetJobsWidgetModelData'
Later in the widget JS file I'm calling:
_commonService.updateAndGetMapBoxLoadCount
which actually uses value of MapBoxMapLoadLimitPerTenant and shows a custom error. However, there is inconsistency with which API call will finish first.
in short, I want initialized data from razor view to widget's js(customisable dashboard) file. Could you help me find a solution?
Thanks Ryan
@derirmusa
Thank you, I will test this and let you know if I have any issues.
Could you please update me on this issue? I have also sent emails with zero answers.
Hello,
I have recently purchased this and unable to fix this issue on my own.
I have sent the project via email with zero response (9 Days ago).
Could you please get back to me ASAP.
Kind Regards Ryan
I have sent the project via email. Could you get back to me asap.
Thanks Ryan
Apologies for bumping this again, I can clearly see there is high number of support tickets.