Bug 11170 - Xamarin Develop failing to build due to MSBuild AddTrialSplashScreenResources
Summary: Xamarin Develop failing to build due to MSBuild AddTrialSplashScreenResources
Status: VERIFIED FIXED
Alias: None
Product: Android
Classification: Xamarin
Component: MSBuild ()
Version: 4.6.x
Hardware: PC Windows
: Highest critical
Target Milestone: 4.8 (async)
Assignee: Atsushi Eno
URL:
Depends on:
Blocks:
 
Reported: 2013-03-14 16:54 UTC by Terje Kvannli
Modified: 2013-07-09 16:29 UTC (History)
8 users (show)

Tags:
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:
VERIFIED FIXED

Description Terje Kvannli 2013-03-14 16:54:47 UTC
Description of Problem:
The Licensed version of Xamarin Develop Business throws an MSBuild excception when building Andriod App. The App was compilable, but suddenly stopped working.


Exception:
C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(3,3): Error MSB4018: The "AddTrialSplashScreenResources" task failed unexpectedly.

System.NullReferenceException: Object reference not set to an instance of an object.

   at Xamarin.Android.Tasks.AddTrialSplashScreenResources.AddTrialSplashScreenResource(String resourceDir, String temp)

   at Xamarin.Android.Tasks.AddTrialSplashScreenResources.Execute()

   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()

   at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__20.MoveNext() (MSB4018) (My.Mobile.App.Android)
Comment 1 Miguel de Icaza [MSFT] 2013-05-22 16:00:04 UTC
If this is a business license, why are we executing the AddTrialSpalshScreen task?
Comment 2 Atsushi Eno 2013-05-30 03:00:41 UTC
This needs bug verification of existence and impact, as we have never heard of such an issue before, and if such issue existed then there should be a lot of people affected.

Could you first try the latest version, and if still reproduces could you provide reproducible project? (you can attach files privately)

There is possibility XA did not really run in Business license: it is possible that there is some issue and the license is shown as "Business" not "Trial" for users, while it is, including the possibility that the license authentication failure and therefore running XA under Trial (while there is valid license).

-

Seeing AddTrialSplashScreen task itself is non-issue, it *is* executed and simply returns if it's not Trial.
Comment 3 Egbert Teeselink 2013-06-14 09:43:18 UTC
If it's any help, I encountered this bug after putting incorrect XML content in a newly made Resources\Values\Styles.xml file.

I had 

  <?xml version="1.0" encoding="utf-8" ?>
  <style name="Theme.BestLightTheme" parent="android:Theme.Light.NoTitleBar">
    
  </style>

in it, which should've been

  <?xml version="1.0" encoding="utf-8" ?>
  <resources>
    <style name="Theme.BestLightTheme" parent="android:Theme.Light.NoTitleBar">
    
    </style>
  </resources>

The compiler gave me no additional information, only the exception just as the original author reported. Note: I *am* using the trail license.
Comment 4 Atsushi Eno 2013-06-17 06:04:31 UTC
That's a helpful input, thanks for letting us know. I made a fix so that our build will accordingly report wrong XML element name in the next major release.

[master aee19c6]
Comment 6 PJ 2013-06-27 15:48:38 UTC
4.7.11 (alpha) and later releases should be reporting the wrong XML element name on build. 

Terje, I hope you are not still experiencing this issue! If so, perhaps you could REOPEN and attach a project that is triggering the bug? It looks like you had just activated a new Android business subscription on the 14th, so you may have just needed to do a 'Rebuild All'. If you experience an issue like this in the future please contact our awesome support team by emailing support@xamarin.com or visiting our support chatroom at http://chat.xamarin.com/ .
Comment 7 narayanp 2013-07-09 08:33:14 UTC
Today I have checked this issue with following builds:

All Mac
X.S 4.0.9(build 15)
Mono 3.1.1
Xamarin.Android 4.7.11-42

[License is Business on disk]
And we followed the steps in comment#3 and we observed that when we are using the wrong code in Resources/Values/Strings.xml then we are getting build error as mentioned in gist: https://gist.github.com/atin360/4971a4b444bfbc1b5c56. While when we type correct code in Strings.xml file then application build and run successfully.
Comment 8 PJ 2013-07-09 16:29:02 UTC
Looks great Lal, the error is detected on build and is reasonably descriptive.