Cannot build web desktop web application without specifying RuntimeIdentifier.
See original GitHub issueYou can repro this by doing the following:
dotnet new -t web
- Convert the project to net451
dotnet restore
dotnet build
Here’s a project with 1 & 2 already done: Repro.zip
Once doing that you get:
Build FAILED.
"C:\Users\nimullen\Documents\temp\web\src\web\web.csproj" (Build target) (1) ->
"C:\Users\nimullen\Documents\temp\web\src\web\web.csproj" (Build target) (1:2) ->
(CheckRuntimeIdentifier target) ->
C:\Users\nimullen\.nuget\packages\microsoft.net.sdk\1.0.0-alpha-20161029-1\build\Microsoft.NET.RuntimeIdentifierInference.targets(45,5): error : RuntimeIdentifier must be set for .NETFramework executables. Consider RuntimeIdentifier=win7-x86 or RuntimeIdentifier=win7-x64. [C:\Users\nimullen\Documents\temp\web\src\web\web.csproj]
0 Warning(s)
1 Error(s)
This used to be possible in project.json
land so I’d think it would be the same in msbuild land. If this issue happens to be “by design” then we’ll need to fix the CLI migration to specify a RuntimeIdentifier
when migrating an executable desktop application.
/cc @livarcocc mostly for the last sentence.
Issue Analytics
- State:
- Created 7 years ago
- Comments:15 (9 by maintainers)
Top Results From Across the Web
`RuntimeIdentifier` warning if self-contained is unspecified ...
NET SDK defaults the build, publish, and run outputs to be self-contained applications. The default without specifying a RuntimeIdentifier ...
Read more >error NETSDK1031: It is not supported to build or publish a ...
I am running following command to publish .NET CORE 5.0 web api project using command line on windows 10 box. c:\test\Service>dotnet publish -c ......
Read more >Mobile Applications Can't build in Blazor Maui Hybrid ...
I developed Maui Blazor Hybrid Application. Then, Desktop Application clearly works. But, Mobile doesn't work, It Generates the following ...
Read more >Dotnet build linux. The answer you're looking for is basically
Dotnet build linux. The answer you're looking for is basically: To build your . Missing linux 64 folder. Build : 2d61d0b043915bc948ebf98836fefe9ba942be11.
Read more >Publish a .NET Application | Office File API
Method 1 (Edit the project file). Specify the Runtime Identifier and set the PublishSingleFile option to true in your project file. xml.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
That requirement was removed after RC4.
This is awful. I have no working environment now for over 24 hours. VS2017 gives me dozens of errors and I can’t get VS2015 to work any more. There must be a utility that allows us to see what versions are compatible. I have tried to use Core.EF and when I add that to my project it complains about incompatibility. And now nothing works. This is just awful.