-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Milestone
Description
The solution is here: https://github.com/orloffm/failingpublish
The first project is a netcoreapp2.0
exe
, the second is a test netcoreapp2.0
project for it. The solution dotnet build
s, but when I do
dotnet publish -c Release --self-contained -r win-x64
I get the following:
Microsoft (R) Build Engine version 15.5.179.9764 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.
Restore completed in 43.37 ms for C:\dev\failing_build\a\a.csproj.
Restore completed in 75.49 ms for C:\dev\failing_build\a.tests\a.tests.csproj.
C:\Program Files\dotnet\sdk\2.1.3\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.RuntimeIdentifierInference.targets(116,5): error : It is not supported to build or publish a self-contained application without specifying a RuntimeIdentifier. Please either specify a RuntimeIdentifier or set SelfContained to false. [C:\dev\failing_build\a\a.csproj]
a -> C:\dev\failing_build\a\bin\Release\netcoreapp2.0\win-x64\a.dll
a -> C:\dev\failing_build\a\bin\Release\netcoreapp2.0\win-x64\publish\
If I remove the test project from the solution, it works fine:
Microsoft (R) Build Engine version 15.5.179.9764 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.
Restore completed in 43.62 ms for C:\dev\failing_build\a\a.csproj.
a -> C:\dev\failing_build\a\bin\Release\netcoreapp2.0\win-x64\a.dll
a -> C:\dev\failing_build\a\bin\Release\netcoreapp2.0\win-x64\publish\
I expect it to work, as this is almost a copy of a https://github.com/dotnet/docs/tree/master/samples/core/getting-started/unit-testing-using-dotnet-test, but with the main project switched to netcoreapp2.0
.
george-chakhidze and BrandonBoone
Metadata
Metadata
Assignees
Labels
No labels