Skip to content

Commit

Permalink
added workaround to get a binary in the bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
chucker committed May 24, 2021
1 parent dc61918 commit ca4f7b4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
4 changes: 0 additions & 4 deletions Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,5 @@
<string>© chucker</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>NSMainStoryboardFile</key>
<string>Main</string>
<key>XSAppIconAssets</key>
<string>Assets.xcassets/AppIcon.appiconset</string>
</dict>
</plist>
3 changes: 2 additions & 1 deletion Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ static void Main(string[] args)
var str = new NSString("test");
var num = new NSNumber(123.45);

Console.WriteLine($"s has float value {num.FloatValue}");
Console.WriteLine($"str has string value {(string)str}");
Console.WriteLine($"num has float value {num.FloatValue}");
}
}
}
6 changes: 5 additions & 1 deletion net6-console-mac-sample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@
<RuntimeIdentifier>osx-x64</RuntimeIdentifier>
<RootNamespace>net6_console_mac_sample</RootNamespace>

<PublishTrimmed>false</PublishTrimmed>
<!--
WORKAROUND to get the bundle to contain a binary
see https://github.com/xamarin/xamarin-macios/issues/11094
-->
<SelfContained>true</SelfContained>
</PropertyGroup>

</Project>

0 comments on commit ca4f7b4

Please sign in to comment.