Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wix cannot work with DebugType embedded #7152

Closed
ChristianSauer opened this issue Jan 10, 2023 · 10 comments · Fixed by wixtoolset/wix#337
Closed

Wix cannot work with DebugType embedded #7152

ChristianSauer opened this issue Jan 10, 2023 · 10 comments · Fixed by wixtoolset/wix#337
Assignees
Labels
Milestone

Comments

@ChristianSauer
Copy link

Bugs

If this issue is a bug:

  • Which version of WiX are you building with?

4.0.0-rc.1

  • Which version of Visual Studio are you building with (if any)?

does not matter

  • Which version of the WiX Toolset Visual Studio Extension are you building with (if any)?

does not matter

  • Which version of .NET are you building with?

Dotnet 7

  • Describe the problem and the steps to reproduce it.

How to reproduce:

  1. Add an Wix-Installer Project to a Solution
  2. Add an Directory.Build.props file
<Project>
  <PropertyGroup>
    <DebugType>embedded</DebugType>
  </PropertyGroup>
</Project>
  1. Try to build the solution.
  2. It will crash with wix.exe : error WIX0268: The argument -pdbType value 'embedded' is invalid. Use one of the following values full, none

Is there a way for wix to accomodate the new value?

@robmen
Copy link
Member

robmen commented Jan 10, 2023

  1. That is not a crash. That is an error message. Please do not try to artificially elevate an issue by overstating the problem.

  2. What would embedded mean in this context?

@ChristianSauer
Copy link
Author

@robmen Well it prevents the project from building. Not a crash but blocking.

Embedded embeds the generated PDBs into the DLL. Making debugging easier and enriching stacktraces. It omits the need to ship the pdbs alongside the dll.
See https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-options/code-generation

@ChristianSauer
Copy link
Author

To expand a little: I have a large project with dozens of projects and I want to apply this to each and very project. Using the g.props file is the best way to do that, but then then Wix build is broken.

@ChristianSauer
Copy link
Author

Finally a workaround is to disable this for the Wix Project(s) by adding an empty file in the project. https://stackoverflow.com/questions/56155392/exclude-certain-projects-from-using-directory-build-props.
Still no ideal, a lot a files are needed

@robmen
Copy link
Member

robmen commented Jan 11, 2023

  1. It isn't blocking. You can override the DebugType in the .wixproj.

  2. I understand the purpose of embedded in managed code projects. You could notice that we use it in WiX v4 .csproj files. When I said "this context", I meant WiX and more specifically .wixprojs. What would it mean to set the DebugType to embedded in a .wixproj?

@ChristianSauer
Copy link
Author

M.e it should be ignored. I certainly do not expect it to embed anything

@robmen
Copy link
Member

robmen commented Jan 12, 2023

But a DebugType value was provided. Ignoring it provides no feedback that the value is incorrect. Valid values (in v4) are full and none? And why should the .wixpdb not be embedded? That could be implemented.

@ChristianSauer
Copy link
Author

It's your project, do as you like.
For me it was unexpected. I would have expected that it ignores that value because (for me) adding a pdb for wix is not that useful. There are workarounds, but it's more clutter.

@robmen
Copy link
Member

robmen commented Jan 13, 2023

I would have expected that it ignores that value because (for me) adding a pdb for wix is not that useful.

Do you know what .wixpdbs are used for? If not, that seems like something to understand since they are deemed important enough to be on by default.

There are workarounds, but it's more clutter.

On that, we agree. But you can't just say, "This doesn't make sense to me, so you should just get rid of it." and expect to get anywhere with your proposal. I've been raising issues with your proposal to help you think through the different aspects that need to be considered for the final design.

@ChristianSauer
Copy link
Author

Thanks, the solution looks very reasonable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
wix-4.0-rc.2
Awaiting triage
Development

Successfully merging a pull request may close this issue.

3 participants