Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
Created attachment 22607 [details]
Diagnostic build output from msbuild and xbuild.
It appears that using msbuild to build a program does not include .nib files from referenced assemblies in the same solution. This is a breaking change in behavior compared to xbuild.
The following GitHub repo contains the code used for this bug report:
The attached file contains build output (diagnostic) from building twice - once with msbuild, once with xbuild. This project has a long history -- the .xib files were created in Xcode 4.x on a Mac OS X 10.7 computer with the last compatible Xamarin Studio. The .cs code has since been migrated from MonoMac to Xamarin.Mac, and builds correctly in the last Xamarin Studio's default settings. It does not work correctly when built in Visual Studio for Mac.
When the solution Locutus/Locutus.XamMac.git.sln at the above depot is built with **msbuild**, the resulting program, LtoFlash, will *ONLY* contain .nib files for corresponding .xib files directly in the LtoFlash project in the application bundle's Resources. The program cannot launch, as nearly all of the visuals are defined in assemblies in the solution that are referred to by the LtoFlash project.
If you build the solution with xbuild, the .nib files from assemblies referred to by the LtoFlash project *will* be included in the application bundle, and the application can launch.
How are you building the project with xbuild or msbuild?
The build output seems to use projects and solutions which are not available from the VINTage.git repository:
Can you attach the information from the About dialog - show details page?
The solution at GitHub is just a renamed copy of the one that was built.
As described in the bug report, when the solution is built with msbuild, the .nibs are not copied into the app resource bundle. This is regardless of whether built in the IDE or via command line.
The Visual Studio for Mac info:
=== Visual Studio Community 2017 for Mac ===
Version 7.0.1 (build 24)
Installation UUID: bf1ed5cd-6210-42cb-908c-e63a0d9f0528
Mono 22.214.171.124 (2017-02/5077205) (64-bit)
GTK+ 2.24.23 (Raleigh theme)
Package version: 500010001
=== NuGet ===
=== .NET Core ===
Runtime: Not installed
SDK: Not installed
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/msbuild/15.0/bin/Sdks
=== Xamarin.Profiler ===
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler
=== Apple Developer Tools ===
Xcode 8.3.2 (12175)
=== Xamarin.iOS ===
Version: 10.10.0.36 (Visual Studio Community)
Build date: 2017-05-22 16:30:53-0400
=== Xamarin.Android ===
Version: 126.96.36.199 (Visual Studio Community)
Android SDK: /Users/steveno/Library/Developer/Xamarin/android-sdk-macosx
Supported Android versions:
6.0 (API level 23)
SDK Tools Version: 25.1.2
SDK Platform Tools Version: 24.0.0
SDK Build Tools Version: 23.0.2
Java SDK: /usr
java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)
Android Designer EPL code available here:
=== Xamarin.Mac ===
Version: 188.8.131.52 (Visual Studio Community)
=== Xamarin Inspector ===
Build date: Fri, 21 Apr 2017 17:57:12 GMT
=== Build Information ===
Release ID: 700010024
Git revision: 7ab1ca2ced6f584e56b7a0d4d321d00775cd95c9
Build date: 2017-05-19 05:44:51-04
Xamarin addins: 08d17158f3365beee5e60f67999e607cce4b3f93
Build lane: monodevelop-lion-d15-2
=== Operating System ===
Mac OS X 10.12.5
Darwin 16.6.0 Darwin Kernel Version 16.6.0
Fri Apr 14 16:21:16 PDT 2017
This GitHub link may be easier to use:
The reason I asked about how the project was being built was because the projects seem to be MonoMac projects, which as far as I know do not support being compiled with MSBuild nor xbuild. If I try to use xbuild or msbuild from the command line I get errors about missing MonoMac.targets.
I can see some of the projects import these files:
<Import Project="$(MSBuildExtensionsPath)\Mono\MonoMac\v0.0\Mono.MonoMac.targets" />
Building inside the IDE does not use MSBuild or xbuild as far as I can see. That requires going into the MonoMac project options and checking the "Use MSBuild build engine (unsupported for this project type)" in Build - General. Doing that and then you get the same errors about the missing MonoMac.targets.
You're using the wrong solution. The *.Mac.sln are MonoMac.
You need to use Locutus.XamMac.git.sln.
I can repro it now with VSMac 7.0.1. Building with msbuild only the MainMenu.nib and MainWindow.nib are included in the app bundle. Building with xbuild all the .nib files are added to the app bundle.
*** This bug has been marked as a duplicate of bug 55147 ***