question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Build fails when using sdk version 7.0.200

See original GitHub issue

Describe the bug

Project fails to build when the sdk version 7.0.200 is used:

error NETSDK1194: The "--output" option isn't supported when building a solution.

Works fine with version 7.0.102 however.

To Reproduce

apt-get update
apt-get install -y --no-install-recommends dotnet-sdk-7.0 //<-- may or may not actually install version 7.0.200 depending on used source repos, Azure Pipeline pulls 200
dotnet restore "service.sln"
dotnet build "service.sln" -c Release -o /app/build --no-restore

We may close this issue if:

  • the repro project you share with us is complex. We can’t investigate custom projects, so don’t point us to such, please.
  • if we will not be able to repro the behavior you’re reporting –>

Exceptions (if any)

error NETSDK1194: The "--output" option isn't supported when building a solution.

Workaround

Downgrade to previous package:

apt-get install -y dotnet-sdk-7.0=7.0.103-1 

This however breaks testing, and is not a solution.

Further technical details

  • ASP.Net service
  • Ubuntu Docker base image
  • fails in Azure Pipeline

Issue Analytics

  • State:closed
  • Created 7 months ago
  • Reactions:18
  • Comments:28 (5 by maintainers)

github_iconTop GitHub Comments

13reactions
EvilVircommented, Feb 22, 2023

Do I understand correctly that you removed the very useful and important feature, that allowed flexibility, because some random guys had overwritten their files with it? And you did that in stable, production ready release?

Are you serious? What’s wrong with defining the output path? Those for whom solution wide output doesn’t work should reach for workarounds (like building each project separately and into different folder or not using —output flag), not everyone else!

There are tools and pipelines built around this flag, this is well known and expected behavior. If someone blames own misconfiguration on optional flag, then flag alone is least of their problems.

Please bring back original functionality.

12reactions
buvinghausencommented, Feb 15, 2023

Just bizarro land that you would merge in a breaking change for something that has literally worked without issue for almost 6 years at this point…

Read more comments on GitHub >

github_iconTop Results From Across the Web

NETSDK1045: The current .NET SDK does not support ...
This error occurs when the build tools can't find the version of the .NET SDK that's needed to build a project. This is...
Read more >
error NETSDK1194: The "--output" option isn't supported ...
The --output option is disallowed because all outputs of all built projects would be copied into the specified directory, which isn't compatible ...
Read more >
Azure Function Project Build Fails in NCrunch Only
Anyway, the NCrunch build fails with this error: ... in the solution itself, as far as I can tell that targets the 7.0.200...
Read more >
error NETSDK1194 Solution : r/azuredevops
Hello,. I had some error to deploy my asp.net core app, it's appear the .net sdk version 7 use to compile change this...
Read more >
Pack Failed: error NETSDK1194: Issue running dotnet publish ...
NET Error: /usr/share/dotnet/sdk/7.0.200/Current/SolutionFile/ImportAfter/ ... The simplest fix would be to use an older SDK version:
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found