Skip to content
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

OutputPath issues with default net6.0-macos project #12174

Open
kdubau opened this issue Jul 22, 2021 · 2 comments
Open

OutputPath issues with default net6.0-macos project #12174

kdubau opened this issue Jul 22, 2021 · 2 comments
Labels
bug If an issue is a bug or a pull request a bug fix dotnet An issue or pull request related to .NET (6) macOS Issues affecting Xamarin.Mac
Milestone

Comments

@kdubau
Copy link
Member

kdubau commented Jul 22, 2021

Steps to Reproduce

  1. dotnet new macos
  2. add <RuntimeIdentifier>osx-x64</RuntimeIdentifier> to thee csproj because .NET 6 error NETSDK1102: Optimizing assemblies for size is not supported for the selected publish configuration #12000 is still. an issue.
  3. dotnet build /bl
  4. looks at the outputs in bin/Debug

Expected Behavior

  • Everything is under the runtime directory
  • There is only 1 app bundle, with all files
  • No publish directory

Actual Behavior

  • Some stuff is under the runtime directory, some directly under debug
  • There are two .app bundles, one if them is definitely partial/corrupt
  • Some files in a publish directory

See my comments inline with the tree output below.

bin/Debug/
└── net6.0-macos
    ├── osx-x64     <--------------- If I understand correctly every single file should be under this directory
    │   ├── Microsoft.*.dll
    │   ├── Microsoft.macOS.registrar.a
    │   ├── Microsoft.macOS.registrar.coreclr.a
    │   ├── System.*.dll
    │   ├── WindowsBase.dll
    │   ├── Xamarin.Mac.dll
    │   ├── libSystem.Globalization.Native.dylib
    │   ├── libSystem.IO.Compression.Native.dylib
    │   ├── libSystem.Native.dylib
    │   ├── libSystem.Net.Security.Native.dylib
    │   ├── libSystem.Security.Cryptography.Native.Apple.dylib
    │   ├── libSystem.Security.Cryptography.Native.OpenSsl.dylib
    │   ├── libcoreclr.dylib
    │   ├── libdbgshim.dylib
    │   ├── libhostfxr.dylib
    │   ├── libhostpolicy.dylib
    │   ├── libmono-component-diagnostics_tracing-static.a
    │   ├── libmono-component-diagnostics_tracing-stub-static.a
    │   ├── libmono-component-hot_reload-static.a
    │   ├── libmono-component-hot_reload-stub-static.a
    │   ├── libmscordbi.dylib
    │   ├── libxamarin-dotnet-coreclr-debug.a
    │   ├── libxamarin-dotnet-coreclr-debug.dylib
    │   ├── libxamarin-dotnet-coreclr.a
    │   ├── libxamarin-dotnet-coreclr.dylib
    │   ├── libxamarin-dotnet-debug.a
    │   ├── libxamarin-dotnet-debug.dylib
    │   ├── libxamarin-dotnet.a
    │   ├── libxamarin-dotnet.dylib
    │   ├── mscorlib.dll
    │   ├── netstandard.dll
    │   ├── publish     <----------- Not entirely sure about this, the files look duped, and I didn't publish
    │   │   ├── Microsoft.macOS.registrar.a
    │   │   ├── Microsoft.macOS.registrar.coreclr.a
    │   │   ├── libmono-component-diagnostics_tracing-static.a
    │   │   ├── libmono-component-diagnostics_tracing-stub-static.a
    │   │   ├── libmono-component-hot_reload-static.a
    │   │   ├── libmono-component-hot_reload-stub-static.a
    │   │   ├── libxamarin-dotnet-coreclr-debug.a
    │   │   ├── libxamarin-dotnet-coreclr.a
    │   │   ├── libxamarin-dotnet-debug.a
    │   │   ├── libxamarin-dotnet.a
    │   │   ├── test-macos-app
    │   │   └── test-macos-app.runtimeconfig.json
    │   ├── ref
    │   │   └── test-macos-app.dll
    │   ├── test-macos-app
    │   ├── test-macos-app.app     <--------------- I believe the "correct" .app bundle
    │   │   └── Contents
    │   │       ├── Info.plist
    │   │       ├── MacOS
    │   │       │   └── test-macos-app
    │   │       ├── MonoBundle
    │   │       │   ├── Microsoft.*.dll
    │   │       │   ├── System.*.dll
    │   │       │   ├── WindowsBase.dll
    │   │       │   ├── Xamarin.Mac.dll
    │   │       │   ├── libSystem.Globalization.Native.dylib
    │   │       │   ├── libSystem.IO.Compression.Native.dylib
    │   │       │   ├── libSystem.Native.dylib
    │   │       │   ├── libSystem.Net.Security.Native.dylib
    │   │       │   ├── libSystem.Security.Cryptography.Native.Apple.dylib
    │   │       │   ├── libSystem.Security.Cryptography.Native.OpenSsl.dylib
    │   │       │   ├── libcoreclr.dylib
    │   │       │   ├── libdbgshim.dylib
    │   │       │   ├── libhostfxr.dylib
    │   │       │   ├── libhostpolicy.dylib
    │   │       │   ├── libmscordbi.dylib
    │   │       │   ├── mscorlib.dll
    │   │       │   ├── netstandard.dll
    │   │       │   ├── runtimeconfig.bin
    │   │       │   ├── test-macos-app.dll
    │   │       │   └── test-macos-app.pdb
    │   │       ├── PkgInfo
    │   │       └── Resources
    │   │           ├── AppIcon.icns
    │   │           ├── Assets.car
    │   │           └── Main.storyboardc
    │   │               ├── Info.plist
    │   │               ├── MainMenu.nib
    │   │               ├── NSWindowController-B8D-0N-5wS.nib
    │   │               └── XfG-lQ-9wD-view-m2S-Jp-Qdl.nib
    │   ├── test-macos-app.dll
    │   ├── test-macos-app.pdb
    │   └── test-macos-app.runtimeconfig.json
    ├── publish     <------------------------------- It's empty but not expecting to see this.
    ├── ref              <-------------------------- Again, not under runtime directory.
    │   └── test-macos-app.dll
    ├── test-macos-app.app   <----------------------- A second, very partial/incomplete, .app bundle
    │   └── Contents
    │       ├── Info.plist
    │       ├── MonoBundle
    │       │   └── runtimeconfig.bin
    │       ├── PkgInfo
    │       └── Resources
    │           ├── AppIcon.icns
    │           ├── Assets.car
    │           └── Main.storyboardc
    │               ├── Info.plist
    │               ├── MainMenu.nib
    │               ├── NSWindowController-B8D-0N-5wS.nib
    │               └── XfG-lQ-9wD-view-m2S-Jp-Qdl.nib
    ├── test-macos-app.dll    <------------------ More not under runtime directory.
    ├── test-macos-app.pdb
    └── test-macos-app.runtimeconfig.json

Environment

.NET SDK (reflecting any global.json):
 Version:   6.0.100-preview.6.21355.2
 Commit:    7f8e0d76c0

Runtime Environment:
 OS Name:     Mac OS X
 OS Version:  11.4
 OS Platform: Darwin
 RID:         osx.11.0-x64
 Base Path:   /usr/local/share/dotnet/sdk/6.0.100-preview.6.21355.2/

Host (useful for support):
  Version: 6.0.0-preview.6.21352.12
  Commit:  770d630b28

Build Logs

Binary log although it's super easy to repro :) msbuild.binlog.zip

@rolfbjarne rolfbjarne added bug If an issue is a bug or a pull request a bug fix dotnet An issue or pull request related to .NET (6) dotnet-pri0 .NET 6: required for stable release macOS Issues affecting Xamarin.Mac labels Jul 22, 2021
@rolfbjarne rolfbjarne modified the milestone: .NET 6 Jul 22, 2021
@kdubau
Copy link
Member Author

kdubau commented Jul 22, 2021

Pretty much the same issues when building with CoreCLR runtime with <UseMonoRuntime>false</UseMonoRuntime>: msbuild.binlog.zip

@rolfbjarne
Copy link
Member

This is the location of the correct app bundle (when building for a single RuntimeIdentifier):

bin/Debug/net6.0-macos/osx-x64/test-macos-app.app

If you're building for multiple RuntimeIdentifiers (RuntimeIdentifiers=osx-x64;osx-arm64), this will be the correct app bundle:

bin/Debug/net6.0-macos/test-macos-app.app

We'll look into all the other files to see what's happening.

@rolfbjarne rolfbjarne added dotnet-pri3 .NET 6: wishlist for stable release and removed dotnet-pri0 .NET 6: required for stable release labels Aug 17, 2021
@rolfbjarne rolfbjarne modified the milestones: .NET 6, .NET 7 Jan 25, 2022
@rolfbjarne rolfbjarne modified the milestones: .NET 7, .NET 8 Aug 26, 2022
@rolfbjarne rolfbjarne removed the dotnet-pri3 .NET 6: wishlist for stable release label Aug 26, 2022
@rolfbjarne rolfbjarne modified the milestones: .NET 8, .NET 9 Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug If an issue is a bug or a pull request a bug fix dotnet An issue or pull request related to .NET (6) macOS Issues affecting Xamarin.Mac
Projects
Status: Technical Debt
Development

No branches or pull requests

2 participants