Bug 60943 - Build adds phantom png image resource references and then fails
Summary: Build adds phantom png image resource references and then fails
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: iOS ()
Version: unspecified
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2017-12-01 14:53 UTC by Miha Markic
Modified: 2017-12-02 09:04 UTC (History)
5 users (show)

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 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:

Description Miha Markic 2017-12-01 14:53:50 UTC
I'm getting this error upon build:
\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(1198,3): error : File not found: /Users/miha/Library/Caches/Xamarin/mtbs/builds/[PROJECTNAME]/6655ce25066753d7977902ebb81003f2/Resources/Default.xcassets/FrontpageFour.imageset/Image4.png

Could be related to upgrade of both XCode to 9.1 and OS to High Sierra.

Odd thing is that I don't even reference any png files (look at Contents.json) below.

MSBuild output this odd list of assets for given directory:
5>  ACTool: 2017-12-01T15:34:15.0200287+01:00 - Serializing intputs
5>  ACTool: 2017-12-01T15:34:15.0320275+01:00 - Executing
5>  Sending Message Xamarin.Messaging.MessageStatusMessage to topic xma/message-status
5>  Sending Request Xamarin.Messaging.Build.Contracts.ExecuteTaskMessage to topic xvs/Build/[PROJECTNAME]/6655ce2%2FACTool
5>  Sending Message Xamarin.Messaging.MessageStatusMessage to topic xma/message-status
5>  Received Response of Xamarin.Messaging.Build.Contracts.ExecuteTaskMessage to topic build24940miha/response/xvs/Build/[PROJECTNAME]/6655ce2%2FACTool
5>  ACTool: 2017-12-01T15:34:15.0642144+01:00 - Logging messages
5>  ACTool Task
5>    AppManifest: Info.plist
5>    DeviceModel: <null>
5>    DeviceOSVersion: <null>
5>    EnableOnDemandResources: True
5>    ImageAssets:
5>      Resources/Default.xcassets/FrontpageFour.imageset/Contents.json
5>      Resources/Default.xcassets/FrontpageFour.imageset/Image4.jpg
5>      Resources/Default.xcassets/FrontpageFour.imageset/Image4.png
5>      Resources/Default.xcassets/FrontpageFour.imageset/Image4@2x.jpg
5>      Resources/Default.xcassets/FrontpageFour.imageset/Image4@3x.jpg
5>      Resources/Default.xcassets/FrontpageFour.imageset/Slide_Ipad_1536x2048_delicatessa.jpg
5>      Resources/Default.xcassets/FrontpageFour.imageset/Slide_Ipad_768x1024_delicatessa.jpg

For some reason it lists Image4.png. Other similar directories might list other unreferenced images.

  "images": [
      "scale": "1x",
      "idiom": "iphone",
      "filename": "Image4.jpg"
      "scale": "2x",
      "idiom": "iphone",
      "filename": "Image4@2x.jpg"
      "scale": "3x",
      "idiom": "iphone",
      "filename": "Image4@3x.jpg"
      "idiom": "iphone"
      "idiom": "ipad"
      "scale": "1x",
      "idiom": "ipad",
      "filename": "Slide_Ipad_768x1024_delicatessa.jpg"
      "scale": "2x",
      "idiom": "ipad",
      "filename": "Slide_Ipad_1536x2048_delicatessa.jpg"
      "scale": "3x",
      "idiom": "ipad"
  "properties": {
    "template-rendering-intent": "original"
  "info": {
    "version": 1,
    "author": ""

Microsoft Visual Studio Enterprise 2017 
Version 15.4.5
Microsoft .NET Framework
Version 4.7.02556

Installed Version: Enterprise

Architecture Diagrams and Analysis Tools   00369-90200-01701-AA812
Microsoft Architecture Diagrams and Analysis Tools

Visual Basic 2017   00369-90200-01701-AA812
Microsoft Visual Basic 2017

Visual C# 2017   00369-90200-01701-AA812
Microsoft Visual C# 2017

Visual C++ 2017   00369-90200-01701-AA812
Microsoft Visual C++ 2017

Application Insights Tools for Visual Studio Package   8.9.00809.2
Application Insights Tools for Visual Studio

ASP.NET and Web Tools 2017   15.0.30925.0
ASP.NET and Web Tools 2017

ASP.NET Core Razor Language Services   1.0
Provides languages services for ASP.NET Core Razor.

ASP.NET Web Frameworks and Tools 2017   5.2.50921.0
For additional information, visit https://www.asp.net/

Azure App Service Tools v3.0.0   15.0.30915.0
Azure App Service Tools v3.0.0

Cake for Visual Studio
Adds support for the Cake build tool in Visual Studio 2015 and 2017. Includes support for the Task Runner Explorer, new templates and bootstrapping important Cake files.

CodeRush for Roslyn
DevExpress CodeRush for Roslyn package.

CodeRush for Roslyn Tool Windows
DevExpress CodeRush for Roslyn Tool Windows package.

Common Azure Tools   1.10
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

CreateLayoutWizard   1.0
Create layout wizard.

DevExpress.DeploymentTool   1.0
A useful tool for deploying DevExpress assemblies.

DevExpress.Win.LayoutAssistant Extension   1.0
DevExpress.Win.LayoutAssistant Visual Studio Extension Detailed Info

A Visual Studio Extension that brings the GitHub Flow into Visual Studio.

JavaScript Language Service   2.0
JavaScript Language Service

JavaScript Project System   2.0
JavaScript Project System

JavaScript UWP Project System   2.0
JavaScript UWP Project System

Markdown Editor   1.11.214
A full featured Markdown editor with live preview and syntax highlighting. Supports GitHub flavored Markdown.

Merq   1.1.17-rc (cba4571)
Command Bus, Event Stream and Async Manager for Visual Studio extensions.

Microsoft Continuous Delivery Tools for Visual Studio   0.3
Simplifying the configuration of continuous build integration and continuous build delivery from within the Visual Studio IDE.

Microsoft JVM Debugger   1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

Microsoft MI-Based Debugger   1.0
Provides support for connecting Visual Studio to MI compatible debuggers

Microsoft Visual C++ Wizards   1.0
Microsoft Visual C++ Wizards

Microsoft Visual Studio VC Package   1.0
Microsoft Visual Studio VC Package

Mono Debugging for Visual Studio   4.7.4-pre (c2d89eb)
Support for debugging Mono processes with Visual Studio.

NuGet Package Manager   4.4.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

Project File Tools   1.0.1
Provides Intellisense and other tooling for XML based project files such as .csproj and .vbproj files.

SlowCheetah - XML config transforms   1.0
This package enables you to transform your app.config or any other XML file based on the build configuration. It also adds additional tooling to help you create XML transforms.

SQL Server Data Tools   15.1.61707.200
Microsoft SQL Server Data Tools

Syntax Visualizer   1.0
An extension for visualizing Roslyn SyntaxTrees.

TypeScript tools for Visual Studio

Visual Studio Code Debug Adapter Host Package   1.0
Interop layer for hosting Visual Studio Code debug adapters in Visual Studio

Visual Studio Tools for Universal Windows Apps   15.0.27004.2010
The Visual Studio Tools for Universal Windows apps allow you to build a single universal app experience that can reach every device running Windows 10: phone, tablet, PC, and more. It includes the Microsoft Windows 10 Software Development Kit.

VisualStudio.IoT   1.0
Package with IoT components for Visual Studio

VisualStudio.Mac   1.0
Mac Extension for Visual Studio

Web Compiler   1.11.326
Compiler for LESS, Sass and CoffeeScript files

WiX Toolset Visual Studio Extension
WiX Toolset Visual Studio Extension version
Copyright (c) .NET Foundation and contributors. All rights reserved.

Xamarin (34c1b6c)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android SDK (HEAD/c2a33d8ea)
Xamarin.Android Reference Assemblies and MSBuild support.

Xamarin.iOS and Xamarin.Mac SDK (51128b8)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.

XtraReports package   1.0
XtraReports package
Comment 1 Miha Markic 2017-12-02 09:04:46 UTC
With support's help I found the reason.
I manually edited Content.json (since there is no IDE support for adding .jpg) and was working fine until now.
However, there were references to those phantom files in .csproj. I guess they were left there when I manually edited .json.
(VS never complained or showed they are missing in i.e. Solution Explorer).
I removed those and it builds now.
Perhaps an official support to add .jpg files would be beneficial in cases like this.