dotnet build and/or dotnet publish Project AProject B's .runtimeconfig.json is included in the bin directory of Project A.
Project B's .runtimeconfig.json is not in the bin directory of Project A.
dotnet --info output:
```
.NET Core SDK (reflecting any global.json):
Version: 2.1.500
Commit: b68b931422
Runtime Environment:
OS Name: Windows
OS Version: 10.0.17763
OS Platform: Windows
RID: win10-x64
Base Path: C:Program Filesdotnetsdk2.1.500
Host (useful for support):
Version: 2.1.6
Commit: 3f4f8eebd8
.NET Core SDKs installed:
2.1.2 [C:Program Filesdotnetsdk]
2.1.4 [C:Program Filesdotnetsdk]
2.1.102 [C:Program Filesdotnetsdk]
2.1.103 [C:Program Filesdotnetsdk]
2.1.104 [C:Program Filesdotnetsdk]
2.1.200 [C:Program Filesdotnetsdk]
2.1.201 [C:Program Filesdotnetsdk]
2.1.202 [C:Program Filesdotnetsdk]
2.1.400 [C:Program Filesdotnetsdk]
2.1.401 [C:Program Filesdotnetsdk]
2.1.402 [C:Program Filesdotnetsdk]
2.1.403 [C:Program Filesdotnetsdk]
2.1.500 [C:Program Filesdotnetsdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.4 [C:Program FilesdotnetsharedMicrosoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.5 [C:Program FilesdotnetsharedMicrosoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.6 [C:Program FilesdotnetsharedMicrosoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.4 [C:Program FilesdotnetsharedMicrosoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.5 [C:Program FilesdotnetsharedMicrosoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.6 [C:Program FilesdotnetsharedMicrosoft.AspNetCore.App]
Microsoft.NETCore.App 2.0.3 [C:Program FilesdotnetsharedMicrosoft.NETCore.App]
Microsoft.NETCore.App 2.0.5 [C:Program FilesdotnetsharedMicrosoft.NETCore.App]
Microsoft.NETCore.App 2.0.6 [C:Program FilesdotnetsharedMicrosoft.NETCore.App]
Microsoft.NETCore.App 2.0.7 [C:Program FilesdotnetsharedMicrosoft.NETCore.App]
Microsoft.NETCore.App 2.0.9 [C:Program FilesdotnetsharedMicrosoft.NETCore.App]
Microsoft.NETCore.App 2.1.2 [C:Program FilesdotnetsharedMicrosoft.NETCore.App]
Microsoft.NETCore.App 2.1.3-servicing-26724-03 [C:Program FilesdotnetsharedMicrosoft.NETCore.App]
Microsoft.NETCore.App 2.1.4 [C:Program FilesdotnetsharedMicrosoft.NETCore.App]
Microsoft.NETCore.App 2.1.5 [C:Program FilesdotnetsharedMicrosoft.NETCore.App]
Microsoft.NETCore.App 2.1.6 [C:Program FilesdotnetsharedMicrosoft.NETCore.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download
````
This is by design.
We don't have a notion of a P2P reference as an exe.
If you want to publish both apps, you need to publish each of them separately.
Darn, I have a project that needs separate executable's in a single bin, with each executable being sourced in its own project. Sucks that I have to manually copy over those files using Build Events.
Though I guess I could make them self contained binaries.
You can also specify the output folder when publishing to be the same, so that no copy is necessary.
However, we don't really recommend bin placing two separate applications in the same folder, as they may have dependencies on the same assembly but at different versions and they may stomp on each other and cause the app to fail during runtime.
I needed to do something similar recently so I just added it as a sample here:
https://github.com/dasMulli/AdvancedMSBuildDemos/tree/master/PublishedAppP2PReference
See MainApp which ""references"" two sub-apps and produces an output / publish layout putten them in different subdirectories
Most helpful comment
I needed to do something similar recently so I just added it as a sample here:
https://github.com/dasMulli/AdvancedMSBuildDemos/tree/master/PublishedAppP2PReference
See MainApp which ""references"" two sub-apps and produces an output / publish layout putten them in different subdirectories