tom-englert / Wax

An interactive editor for WiX setup projects.
MIT License
220 stars 25 forks source link

Wax does not find content files in .NET standard project #61

Closed gitkrasty closed 5 years ago

gitkrasty commented 5 years ago

In a relatively large solution I have a single project with most of the resources and its target platform is .NET standard so that it can be shared across all the supported platforms.

The resulting DLL and its satelite assemblies are detected correctly by wax in this project.

But if I add folder with content files into this .NET standard project (Content, Copy if newer) they do not get discovered in the wax file mappings (5).

Secondly the project is greyed out in projects to install (3) and I could not find any information about this. What does it mean?

BTW MSBUILD recognises the content files correctly and delivers them to the proper release folders.

If I take the same file and place it in a standard .NET 4.5 project inside the same solution/build it resolves perfectly.

tom-englert commented 5 years ago
  1. Can you debug it and see what files are listed by VisualStudio for the ContentFiles output group? It should be here: (line 396) https://github.com/tom-englert/Wax/blob/1ff85e46c9a0446647ba0b89f59882d76ea06d39/Wax.Model/VisualStudio/Project.cs#L387-L398

  2. If a project is grayed, it means it is already selected implicitly because it's a reference of something else you have selected, so you don't have to check this.

gitkrasty commented 5 years ago

I do not know how to debug visual studio extensions. But I made the simplest reproducible solution - see the attachment.

Highlighted problem printscreen - bitmap file from regular .net gets detected, same file from .NET standard 2.0 is ignored: Captureprintscreen

Solution archive: WindowsFormsApp35.zip

Leogiciel commented 5 years ago

@gitkrasty , here's how : https://bideveloperextensions.github.io/features/VSIXextensionmodel/

@tom-englert : as I feel responsible for this zone, I'll investigate tomorrow. .Net Standard surely changes many things in how .csproj files are handled.

tom-englert commented 5 years ago

@gitkrasty which version of VS are you using? I tried with 16.1.5 and it works fine.

gitkrasty commented 5 years ago

latest VS 2017, ver. 15.9.13

gitkrasty commented 5 years ago

So I installed the amounts of gb of VS 2019 tonight and can confirm that it also works in my 16.1.6. The problem is burried somewhere in VS 2017.