Bug 35080 - Cannot build Android unit test target with a release configuration
Summary: Cannot build Android unit test target with a release configuration
Status: RESOLVED NORESPONSE
Alias: None
Product: Android
Classification: Xamarin
Component: BCL Class Libraries ()
Version: unspecified
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Radek Doulik
URL:
Depends on:
Blocks:
 
Reported: 2015-10-20 04:41 UTC by Martin Nygren
Modified: 2017-06-28 11:46 UTC (History)
3 users (show)

Tags: BZCU
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and 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 Links.

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.

Related Links:
Status:
RESOLVED NORESPONSE

Description Martin Nygren 2015-10-20 04:41:46 UTC
Recently I had to track down a bug that occurred when building for release but not in debug builds. After some investigation it was clear that it would be a lot quicker to reproduce the problem if I could trigger the problem from a unit test. Attempting to build the unit test target with a release configuration did, however, give a compile time error.

Steps to reproduce:

- Create a unit test target.
- Add a unit test.
- Try to archive the test target for release.

Fails with the error message:
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets: Error: Error executing task GenerateJavaStubs: The type 'Xamarin.Android.NUnitLite.TestResultActivity' needs to have a public default constructor. (ColleaguesApi.Tests)
Comment 1 Al Clark [MSFT] 2015-10-21 06:56:31 UTC
Could you please confirm your full version information:

Xamarin Studio in OS X
"Xamarin Studio -> About Xamarin Studio -> Show Details -> Copy Information [button]"

If you could also attach a sample application that exhibits the problem that would be great!
Comment 2 Jonathan Pryor 2015-10-23 15:01:25 UTC
Radek: Is it possible that the linker is removing the default constructor from Xamarin.Android.NUnitLite.TestResultActivity?
Comment 3 Adam Hartley [MSFT] 2017-06-28 11:46:39 UTC
Because we have not received a reply to our request for more information we are closing this issue. If you are still encountering this issue, please reopen the ticket with the requested information. Thanks!