-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Publishing console app with WPF app as dependency in self-contained emits broken AppHost #16715
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
Tagging subscribers to this area: @agocke, @vitek-karas, @VSadov Issue DetailsVersionsPS> dotnet --version
5.0.201 Problem(s)
Repro StepsPlease see a full reproduction of the bugs in this repository: https://github.com/mjcheetham/bug-wpfconsole Simplified Repromkdir test
cd test
dotnet new console -n cli
dotnet new wpf -n wpfapp Edit <PropertyGroup>
- <TargetFramework>net5.0</TargetFramework>
+ <TargetFramework>net5.0-windows</TargetFramework>
</PropertyGroup> dotnet add cli reference wpfapp
dotnet publish cli -r win-x86
.\cli\bin\Debug\net5.0-windows\win-x86\publish\wpfapp.exe
# No window appears RemarksNote that publishing not self contained and not as a single file works OK. The problems occur in handling of AppHost vs SuperHost, and in passing of all properties to the child
|
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
I tried this with 6 Preview 4 nightly and the wpfapp pops up a dialog that it's missing a shared framework. #15117 would make this an explicit failure in the SDK. publishing with |
Feels like #15117 would be a pretty poor "fix" for this scenario. The same scenario that works today in .NET Framework and .NET Core/5.x with FD deployments would be an error in 5/6.x. #16184 sounds like it would be a better "fix", if not 100% correct, at least produces a working set of executables. The definition of "100% correct" is ill-defined the way publishing and the self-contained deployment model has been designed. All the assumptions so far have been a single top-level application, without thought for multi-executable "products" that share code. |
Versions
Problem(s)
Publishing an application (as self contained) that has another application project (not a class library) as a dependency does not pass through the chosen runtime identifier to child projects.
Publishing (as a single-file) a console application that has a WPF application/project as a dependency emits a broken AppHost for the child project.
Repro Steps
Please see a full reproduction of the bugs in this repository:
https://github.com/mjcheetham/bug-wpfconsole
Simplified Repro
Edit
cli\cli.csproj
:Remarks
Note that publishing not self contained and not as a single file works OK. The problems occur in handling of AppHost vs SuperHost, and in passing of all properties to the child
Publish
targets.The text was updated successfully, but these errors were encountered: