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.

Net5.0 RC2: When building a solution with a target runtime ID an error is given

See original GitHub issue

In previous versions of dotnet core, you could build a solution with the runtime flag -r and it would build for that target (ex. dotnet build -c Release -r win-x64. Now however with RC2 it appears to echo out the error:

error NETSDK1134: Building a solution with a specific RuntimeIdentifier is not supported. If you would like to publish for a single RID, specifiy the RID at the individual project level instead. 

If this is the new normal, is there a replacement method for cross-compiling an entire solution for multiple platforms?

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:48
  • Comments:36 (4 by maintainers)

github_iconTop GitHub Comments

22reactions
svdHerocommented, Nov 16, 2020

Interestingly enough a dotnet test MySolution.sln -c Release -r win-x64 works fine without any error. It also builds the whole solution with the specified runtime before executing all unit tests. How is that different from dotnet build MySolution.sln -c Release -r win-x64??? 😕

Both should be possible.

16reactions
qidydlcommented, Mar 16, 2021

This is especially confusing because dotnet build --help still lists this as an available option.

  -r, --runtime <RUNTIME_IDENTIFIER>    The target runtime to build for.

Options should not be listed if they are no longer supported.

Read more comments on GitHub >

github_iconTop Results From Across the Web

RuntimeIdentifier not available in dependent project when ...
Why is msbuild doing this and how can I pass the RuntimeIdentifier information to the DAL project when building/publishing the main project? ....
Read more >
Azure Devops Build failing for .Net 5 when using multiple ...
I have a project that builds using the following frameworks: <TargetFrameworks>netstandard2.0;netstandard2.1;net5.0</TargetFrameworks>.
Read more >
NET SDK error list - .NET CLI
This is a complete list of the errors that you might get from the .NET SDK while developing .NET apps. If more info...
Read more >
Untitled
A runtime identifier must be specified in order to publish this project WebThe ... Net5.0 RC2: When building a solution with a target...
Read more >
Fixing build warning NETSSDK1138 when ...
In this short post I describe how to get rid of the following build warning: C:\Program Files\dotnet\sdk\5.0.100\Sdks\Microsoft.NET.
Read more >

github_iconTop Related Medium Post

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