xamarin / xamarin-macios

.NET for iOS, Mac Catalyst, macOS, and tvOS provide open-source bindings of the Apple SDKs for use with .NET managed languages such as C#
Other
2.48k stars 514 forks source link

Error: Failed to compile the generated registrar code. #9459

Closed Dave-Quick closed 4 years ago

Dave-Quick commented 4 years ago

Steps to Reproduce

  1. Set Debug mode, .iOS
  2. Press F5.
  3. Build failed with error: Failed to compile the generated registrar code.

Expected Behavior

A running application.

Actual Behavior

Build failed with error: Failed to compile the generated registrar code.

Environment

Microsoft Visual Studio Community 2017 Version 15.9.4 VisualStudio.15.Release/15.9.4+28307.222 Microsoft .NET Framework Version 4.8.03752

Installed Version: Community

Visual C++ 2017 00369-60000-00001-AA987 Microsoft Visual C++ 2017

Application Insights Tools for Visual Studio Package 8.14.11009.1 Application Insights Tools for Visual Studio

ASP.NET and Web Tools 2017 15.9.04012.0 ASP.NET and Web Tools 2017

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

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

Azure App Service Tools v3.0.0 15.9.03024.0 Azure App Service Tools v3.0.0

Azure Data Lake Node 1.0 This package contains the Data Lake integration nodes for Server Explorer.

Azure Data Lake Tools for Visual Studio 2.3.3000.2 Microsoft Azure Data Lake Tools for Visual Studio

Azure Functions and Web Jobs Tools 15.9.02046.0 Azure Functions and Web Jobs Tools

Azure Stream Analytics Tools for Visual Studio 2.3.3000.2 Microsoft Azure Stream Analytics Tools for Visual Studio

C# Tools 2.10.0-beta2-63501-03+b9fb1610c87cccc8ceb74a770dba261a58e39c4a C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

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

Cookiecutter 15.9.18254.1 Provides tools for finding, instantiating and customizing templates in cookiecutter format.

Extensibility Message Bus 1.1.49 (remotes/origin/d15-8@ee674f3) Provides common messaging-based MEF services for loosely coupled Visual Studio extension components communication and integration.

Fabric.DiagnosticEvents 1.0 Fabric Diagnostic Events

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

Microsoft Azure HDInsight Azure Node 2.3.3000.2 HDInsight Node under Azure Node

Microsoft Azure Hive Query Language Service 2.3.3000.2 Language service for Hive query

Microsoft Azure Service Fabric Tools for Visual Studio 2.4 Microsoft Azure Service Fabric Tools for Visual Studio

Microsoft Azure Stream Analytics Language Service 2.3.3000.2 Language service for Azure Stream Analytics

Microsoft Azure Stream Analytics Node 1.0 Azure Stream Analytics Node under Azure Node

Microsoft Azure Tools 2.9 Microsoft Azure Tools for Microsoft Visual Studio 2017 - v2.9.10730.2

Microsoft Continuous Delivery Tools for Visual Studio 0.4 Simplifying the configuration of Azure DevOps pipelines 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 Library Manager 1.0 Install client-side libraries easily to any web project

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 Tools for Containers 1.1 Develop, run, validate your ASP.NET Core applications in the target environment. F5 your application directly into a container with debugging, or CTRL + F5 to edit & refresh your app without having to rebuild the container.

Microsoft Visual Studio VC Package 1.0 Microsoft Visual Studio VC Package

MLGen Package Extension 1.0 MLGen Package Visual Studio Extension Detailed Info

Mono Debugging for Visual Studio 4.13.12-pre (9bc9548) Support for debugging Mono processes with Visual Studio.

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

Office Developer Tools for Visual Studio 2017 ENU 15.0.28224.00 Microsoft Office Developer Tools for Visual Studio 2017 ENU

ProjectServicesPackage Extension 1.0 ProjectServicesPackage Visual Studio Extension Detailed Info

Python 15.9.18254.1 Provides IntelliSense, projects, templates, debugging, interactive windows, and other support for Python developers.

Python - Django support 15.9.18254.1 Provides templates and integration for the Django web framework.

Python - IronPython support 15.9.18254.1 Provides templates and integration for IronPython-based projects.

Python - Profiling support 15.9.18254.1 Profiling support for Python projects.

R Tools for Visual Studio 1.3.40517.1016 Provides project system, R Interactive window, plotting, and more for the R programming language.

ResourcePackage Extension 1.0 ResourcePackage Visual Studio Extension Detailed Info

ResourcePackage Extension 1.0 ResourcePackage Visual Studio Extension Detailed Info

SQL Server Data Tools 15.1.61810.11040 Microsoft SQL Server Data Tools

ToolWindowHostedEditor 1.0 Hosting json editor into a tool window

TypeScript Tools 15.9.20918.2001 TypeScript Tools for Microsoft Visual Studio

Visual Basic Tools 2.10.0-beta2-63501-03+b9fb1610c87cccc8ceb74a770dba261a58e39c4a Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Visual C++ for Cross Platform Mobile Development (Android) 15.0.28107.00 Visual C++ for Cross Platform Mobile Development (Android)

Visual F# Tools 10.2 for F# 4.5 15.8.0.0. Commit Hash: 6e26c5bacc8c4201e962f5bdde0a177f82f88691. Microsoft Visual F# Tools 10.2 for F# 4.5

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

Visual Studio Spell Check Everywhere VSSpellCheckEverywhere An extension that enables spell checking within any Visual Studio file editor or tool window that uses WPF text boxes. https://GitHub.com/EWSoftware/VSSpellChecker

Visual Studio Spell Checker VSSpellChecker An editor extension that checks the spelling of comments, strings, and plain text as you type or interactively with tool windows. https://GitHub.com/EWSoftware/VSSpellChecker

Visual Studio Tools for CMake 1.0 Visual Studio Tools for CMake

Visual Studio Tools for Containers 1.0 Visual Studio Tools for Containers

Visual Studio Tools for Unity 3.9.0.3 Visual Studio Tools for Unity

Visual Studio Tools for Universal Windows Apps 15.0.28307.208 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.Mac 1.0 Mac Extension for Visual Studio

Workflow Manager Tools 1.0 1.0 This package contains the necessary Visual Studio integration components for Workflow Manager.

Xamarin 4.12.3.77 (d15-9@e3f40b477) Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin Designer 4.16.13 (45a16efd4) Visual Studio extension to enable Xamarin Designer tools in Visual Studio.

Xamarin Templates 1.1.128 (6f5ebb2) Templates for building iOS, Android, and Windows apps with Xamarin and Xamarin.Forms.

Xamarin.Android SDK 9.1.4.2 (HEAD/8255f42fc) Xamarin.Android Reference Assemblies and MSBuild support.

Xamarin.iOS and Xamarin.Mac SDK 12.2.1.12 (65ec520) Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.

Build Logs

Example Project (If Possible)

Dave-Quick commented 4 years ago

1>------ Build started: Project: FretWorxDeluxe.iOS, Configuration: Debug iPhone ------ 1> Connecting to Mac server 192.168.0.110... 1> Connecting to Mac server 192.168.0.110... 1>C:\Users\Dave\Source\Repos\FretWorxDeluxe\FretWorxDeluxe\FretWorxDeluxe\ChordLabPage.xaml.cs(67,34,67,36): warning CS0168: The variable 'ez' is declared but never used 1>C:\Users\Dave\Source\Repos\FretWorxDeluxe\FretWorxDeluxe\FretWorxDeluxe\ChordsPage.xaml.cs(85,34,85,36): warning CS0168: The variable 'ez' is declared but never used 1>C:\Users\Dave\Source\Repos\FretWorxDeluxe\FretWorxDeluxe\FretWorxDeluxe\ArpsPage.xaml.cs(78,34,78,36): warning CS0168: The variable 'ez' is declared but never used 1>C:\Users\Dave\Source\Repos\FretWorxDeluxe\FretWorxDeluxe\FretWorxDeluxe\StorePage.xaml.cs(76,34,76,36): warning CS0168: The variable 'ez' is declared but never used 1>C:\Users\Dave\Source\Repos\FretWorxDeluxe\FretWorxDeluxe\FretWorxDeluxe\ScaleLabPage.xaml.cs(84,34,84,36): warning CS0168: The variable 'ez' is declared but never used 1>C:\Users\Dave\Source\Repos\FretWorxDeluxe\FretWorxDeluxe\FretWorxDeluxe\ScalesPage.xaml.cs(78,34,78,36): warning CS0168: The variable 'ez' is declared but never used 1>C:\Users\Dave\Source\Repos\FretWorxDeluxe\FretWorxDeluxe\FretWorxDeluxe\HelpPage.xaml.cs(153,22,153,31): warning CS0618: 'Device.OS' is obsolete: 'TargetPlatform is obsolete as of version 2.3.4. Please use RuntimePlatform instead.' 1>C:\Users\Dave\Source\Repos\FretWorxDeluxe\FretWorxDeluxe\FretWorxDeluxe\StorePage.xaml.cs(243,30,243,32): warning CS0168: The variable 'ey' is declared but never used 1>C:\Users\Dave\Source\Repos\FretWorxDeluxe\FretWorxDeluxe\FretWorxDeluxe.iOS\SKCanvasViewDragRenderer.cs(20,29,20,38): warning CS0414: The field 'SKCanvasViewDragRenderer.dragImage' is assigned but its value is never used 1>C:\Users\Dave\Source\Repos\FretWorxDeluxe\FretWorxDeluxe\FretWorxDeluxe\ScaleGridView.xaml.cs(21,22,21,42): warning CS0414: The field 'ScaleGridView.notifiableChangeMade' is assigned but its value is never used 1> FretWorxDeluxe.iOS -> C:\Users\Dave\Source\Repos\FretWorxDeluxe\FretWorxDeluxe\FretWorxDeluxe.iOS\bin\iPhone\Debug\FretWorxDeluxe.iOS.exe 1> Detected signing identity: 1> Code Signing Key: "iPhone Developer: Dave Quick (S8XSA6RBC6)" (068F7AB820E45BED6CEEE32D012E5BD55E97C6FE) 1> Provisioning Profile: "iOS Team Provisioning Profile: *" (f3db282c-9207-4b2c-8f89-12e9e370371d) 1> Bundle Id: com.thoughtfularts.fretworx 1> App Id: S7M5VLFTAM.com.thoughtfularts.fretworx 1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(795,3): warning MT0079: The recommended Xcode version for Xamarin.iOS 13.20.2 is Xcode 11.6 or later. The current Xcode version (found in /Applications/Xcode.app/Contents/Developer) is 9.2. 1>
1> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -Wno-receiver-forward-class -Wno-objc-missing-super-calls -Wno-unguarded-availability-new -gdwarf-2 -std=c++14 -I/Library/Frameworks/Xamarin.iOS.framework/Versions/13.20.2.2/SDKs/MonoTouch.iphoneos.sdk/usr/include -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.2.sdk -Qunused-arguments -miphoneos-version-min=8.0 -arch arm64 -c -o /Users/davequick/Library/Caches/Xamarin/mtbs/builds/FretWorxDeluxe.iOS/3f658f2416ef3d63e736a78382963961/obj/iPhone/Debug/mtouch-cache/arm64/registrar.o -x objective-c++ -D DEBUG /Users/davequick/Library/Caches/Xamarin/mtbs/builds/FretWorxDeluxe.iOS/3f658f2416ef3d63e736a78382963961/obj/iPhone/Debug/mtouch-cache/64/registrar.m 1> In file included from /Users/davequick/Library/Caches/Xamarin/mtbs/builds/FretWorxDeluxe.iOS/3f658f2416ef3d63e736a78382963961/obj/iPhone/Debug/mtouch-cache/64/registrar.m:3: 1> /Users/davequick/Library/Caches/Xamarin/mtbs/builds/FretWorxDeluxe.iOS/3f658f2416ef3d63e736a78382963961/obj/iPhone/Debug/mtouch-cache/64/registrar.h:17:9: fatal error: 'CoreImage/CIFilterBuiltins.h' file not found 1> #import <CoreImage/CIFilterBuiltins.h> 1> ^~~~~~~~~~ 1> 1 error generated. 1> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -Wno-receiver-forward-class -Wno-objc-missing-super-calls -Wno-unguarded-availability-new -gdwarf-2 -std=c++14 -I/Library/Frameworks/Xamarin.iOS.framework/Versions/13.20.2.2/SDKs/MonoTouch.iphoneos.sdk/usr/include -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.2.sdk -Qunused-arguments -miphoneos-version-min=8.0 -arch armv7 -c -o /Users/davequick/Library/Caches/Xamarin/mtbs/builds/FretWorxDeluxe.iOS/3f658f2416ef3d63e736a78382963961/obj/iPhone/Debug/mtouch-cache/armv7/registrar.o -x objective-c++ -D DEBUG /Users/davequick/Library/Caches/Xamarin/mtbs/builds/FretWorxDeluxe.iOS/3f658f2416ef3d63e736a78382963961/obj/iPhone/Debug/mtouch-cache/32/registrar.m 1> In file included from /Users/davequick/Library/Caches/Xamarin/mtbs/builds/FretWorxDeluxe.iOS/3f658f2416ef3d63e736a78382963961/obj/iPhone/Debug/mtouch-cache/32/registrar.m:3: 1> /Users/davequick/Library/Caches/Xamarin/mtbs/builds/FretWorxDeluxe.iOS/3f658f2416ef3d63e736a78382963961/obj/iPhone/Debug/mtouch-cache/32/registrar.h:17:9: fatal error: 'CoreImage/CIFilterBuiltins.h' file not found 1> #import <CoreImage/CIFilterBuiltins.h> 1> ^~~~~~~~~~ 1> 1 error generated. 1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(795,3): error MT4109: Failed to compile the generated registrar code. Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== ========== Deploy: 0 succeeded, 0 failed, 0 skipped ==========

whitneyschmidt commented 4 years ago

@Dave-Quick Thank you for your feedback!

It looks like you are using an old version of Xcode that is not compatible with the version of VS that you have:

C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(795,3): warning MT0079: The recommended Xcode version for Xamarin.iOS 13.20.2 is Xcode 11.6 or later. The current Xcode version (found in /Applications/Xcode.app/Contents/Developer) is 9.2.

Could you try out downloading Xcode 11.6+ and pointing VS towards it?

You can change what version of Xcode VS uses by following these steps:

  1. Visual Studio > Preferences > Projects > SDK Locations > Apple
  2. Browse > Select the location where you've installed Xcode

It will look something like this:

Screen Shot 2020-08-25 at 6 05 40 PM

Let us know whether that resolves the issue.

rolfbjarne commented 4 years ago

We have not received the requested information.

If you are still experiencing this issue please provide all the requested information then click the Reopen Issue button.

Thanks!

Dave-Quick commented 4 years ago

Hi Rolf,

I’m still experiencing the issue, but I am waiting for a new machine which will actually run XCode 11.3.

Apple’s reliance on planned obsolescence to drive their hardware sales is a particular sore point with me right now. I’m glad Microsoft is showing no signs of going down a similar path.

Dave

From: Rolf Bjarne Kvinge notifications@github.com Sent: Tuesday, September 15, 2020 3:57 AM To: xamarin/xamarin-macios xamarin-macios@noreply.github.com Cc: Dave Quick davequick@thoughtfularts.com; Mention mention@noreply.github.com Subject: Re: [xamarin/xamarin-macios] Error: Failed to compile the generated registrar code. (#9459)

We have not received the requested information.

If you are still experiencing this issue please provide all the requested information then click the Reopen Issue button.

Thanks!

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/xamarin/xamarin-macios/issues/9459#issuecomment-692639791 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AJKTB26BNSPAGH7VPAMHBZDSF5B7ZANCNFSM4QJDLQJA . https://github.com/notifications/beacon/AJKTB25OJXPPLYCGIVVJ75TSF5B7ZA5CNFSM4QJDLQJKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOFFENQLY.gif