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.44k stars 507 forks source link

.dSym is not properly generated unless configuration is Release #5524

Closed MihaMarkic closed 5 years ago

MihaMarkic commented 5 years ago

I'm seeing a dangerous behavior regarding .dSym files generation. I'm seeing that when not using Release configuration for building .ipa, a .dSym file is still generated, but it is pretty much empty - like 9KB instead of 45MB in my case. This isn't obvious to the user and not good when a symbolication is required. The fact that this is linked to configuration name is a bad idea in first place.

Please consider adding a checkbox to project settings and a csproj node that controls generation of .dSym instead.

Workaround: pass "-dsym=true" to additional mtouch arguments.

Steps to Reproduce

  1. Create an iOS project.
  2. Clone Release configuration and name it something other than Release.
  3. Create .ipa file

Expected Behavior

.dSym file is properly generated

Actual Behavior

.dSym is almost empty - 9KB in my case.

Environment

VS 15.9.6

VS bug #785284

dalexsoto commented 5 years ago

Hello @MihaMarkic, thank you for your feedback!

I have tried to reproduce your issue using latest stable on VS4Mac and I have not seen the same error as you [1], I duplicated the Release configuration successfully without any manual edits and the dsym is correctly generated on both configurations.

I would need the build logs and your version information to continue to assisting you.

To get full build logs just set the log verbosity to diagnostic at the following locations:

On Visual Studio for Windows you also want to add -v -v -v -v to the mtouch additional arguments by right-clicking the project in the solution explorer and selecting Properties.

Note: this is done automatically on Visual Studio for Mac when the log verbosity is set to diagnostic.

The easiest way to get exact version information:

We look forward to hearing from you!

[1]:

sc
MihaMarkic commented 5 years ago

@dalexsoto Hi. I should have emphasized that I'm using VS2017 15.9.6. Will provide further info.

MihaMarkic commented 5 years ago

@dalexsoto I think I've isolated the problem. Seems like it's not tied to configuration name, but to this steps:

  1. Create an iOS app from a template
  2. Check IPA and release options (Link SDKs Only, ARM64, min iOS 11)
  3. Rebuild Solution - dSYM is generated
  4. Do a Build solution - dSYM is 9KB

IOW A "Build solution" fails to generate dSYM if there is an existing build. Full build generates dSYM correctly. Can you reproduce it?

VS2017 info Microsoft Visual Studio Enterprise 2017 Version 15.9.6 VisualStudio.15.Release/15.9.6+28307.344 Microsoft .NET Framework Version 4.7.03190

Installed Version: Enterprise

Visual C++ 2017 00369-60000-00001-AA592 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 Blazor Language Services 0.7.0-rtm-20181115.1

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 Functions and Web Jobs Tools 15.9.02046.0 Azure Functions and Web Jobs Tools

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.

CodeRush for Roslyn 18.2.6.0 DevExpress CodeRush for Roslyn package.

CodeRush for Roslyn Tool Windows 18.2.6.0 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.

DevExpress Reporting Extension 1.0 A Visual Studio extension that invokes the Report Designer editor for report definition REPX files.

DevExpress Reporting Tools Extension 1.0 Extends Visual Studio with tools required for the Report Designer editor.

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

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.

GitHub.VisualStudio 2.7.1.6591 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

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.

NCrunch
Continuous Testing Tool for .NET Copyright © 2010-2018 Remco Software Ltd

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

ProjectServicesPackage Extension 1.0 ProjectServicesPackage Visual Studio Extension Detailed Info

ResourcePackage Extension 1.0 ResourcePackage Visual Studio Extension Detailed Info

ResourcePackage Extension 1.0 ResourcePackage Visual Studio Extension Detailed Info

Snapshot Debugging Extension 1.0 Snapshot Debugging Visual Studio Extension Detailed Info

SQL Server Data Tools 15.1.61901.03220 Microsoft SQL Server Data Tools

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 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 Tools for Containers 1.0 Visual Studio Tools for Containers

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

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

Xamarin 4.12.3.79 (d15-9@260fa6a34) 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.5.0 (HEAD/4b951a3e7) 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.

MihaMarkic commented 5 years ago

I'm also not entirely sure what triggers wrong build at 4. 100% repro is to uncheck and check "Strip native debugging symbols" after step 3. So it triggers incremental builld at 4.

dalexsoto commented 5 years ago

No, I am not seeing this from Visual Studio for Mac, I will let someone from the Visual Studio on Windows chime in to see if this is a Windows only issue. /cc @emaf

emaf commented 5 years ago

Hey, we were able to reproduce this issue on Visual Studio and we're working to fix it.

Thanks for reporting this problem @MihaMarkic!

MihaMarkic commented 5 years ago

Awesome guys.

mooola commented 4 years ago

Was this ever fixed?

rolfbjarne commented 4 years ago

Yes, this was fixed (in PR #5576).

lylerolleman commented 3 years ago

I am still seeing this same problem in VS (Windows) 2019 v16.7.0

No matter what configuration or what cleaning i do, the dSYM folder never contains symbol information