tom-englert/Wax

No files listed in File Mappings

Closed this issue · 25 comments

Using Wix Toolset 3.11.1.2318, with the Wix Visual Studio 2017 Extension installed, and the latest Wax editor from the Marketplace. See attached screenshots. None of of the files from my projects appear in the File Mapping section. There doesn't seem to be a way to add files. I'm not sure how to finagle this so the files show up. I followed the tutorial as it appears in the Wiki, except the UI is slightly different. Cannot use the app as is.

waxnofilemapping
waxversion

Did you build the project? (It shows some warnings in the dependencies)

Yes: Build, Clean-Build, Rebuild, Delete Wix project and create a new one and build. The warnings are specific to .Net Core dependencies (some of the MS packages not being flagged as .Net Core-compatible yet, even though they are).

Maybe that's related to .Net Core apps?
Can you try a plain old .Net 4.x app?
Can you provide a sample to reproduce this?

Sorry, been prepping for a workshop for this week and got super-busy. I will create a sample .NET Core project this week and retry with that, and see if I can do the same with a .NET Standard, to narrow what types of projects it happens with.

OK, no need to hurry...

@tom-englert I created a simple .NET Core solution, with a C# library and a C# Console app, and added to my GitHub as a new repository NET Core App. I also made a screenshot of the initial Wax Editor screen. The Wix Editor didn't work, as expected.

I added a Net Standard app, as you asked, and it seemed to work (except I get this error building the WiX project:
Error Undefined preprocessor variable '$(var.NetStandardLibrary.TargetDir)'.

But the files all showed up in the WiX Editor, so that's good. I uploaded that project to my NetStandardApp repository.

tsahi commented

I have a similar issue, where Wax lists 38 files in the File mapping section, while the installed project's bin folder contains 138 DLL, EXE and CONFIG files. Indeed, after installing, I get a FileNotFoundException from the .NET runtime.

If I add a file manually, it appears in the Unmapped Files section.

@tsahi try to build the solution and refresh Wax view

tsahi commented

@tom-englert it doesn't help. I removed the files from the Unmapped Files grid, hit Refresh, and the files where not added. The only thing is that files I manually added were removed.

tsahi commented

I think most of the missing files are dependencies of the NETStandard.Library 1.6.1 nuget package, if that helps.

@tsahi looks like these are not part of the copy local list in VS.
Can you provide a sample project where this happens?

tsahi commented

Some of the missing files are not marked as Copy Local = True, but I'm not sure how this affects the list of mapped files. I have some files which are marked True, but are not in the list, and then some files are in the list, although they are not marked as True.

@tsahi do you have a net classic or a net core app?

tsahi commented

.NET Framework windows service project.

@tsahi Can you provide a sample project where this happens?

tsahi commented

The file Microsoft.ApplicationInsights.dll is not added, as well as other Microsoft.AI.*.dll, but System.Collections.dll is added. this is the generated list of files:

<Component Id="Varonis.Bot.Models.dll" Guid="617ec798-0ae3-4c99-8520-6d049759b1dc">
		  <File Id="Varonis.Bot.Models.dll" Name="Varonis.Bot.Models.dll" Source="$(var.Varonis.Bot.Models_TargetDir)Varonis.Bot.Models.dll" />
		</Component>
		<Component Id="ApplicationInsights.config" Guid="ab4a51bb-73f6-46a2-ab58-2581e393c3af">
		  <File Id="ApplicationInsights.config" Name="ApplicationInsights.config" Source="$(var.Varonis.Bot.WindowsService_TargetDir)ApplicationInsights.config" />
		</Component>
		<Component Id="Varonis.Bot.WindowsService.exe.config" Guid="902cf1b3-22ae-46c8-bd23-3066329bd3c5">
		  <File Id="Varonis.Bot.WindowsService.exe.config" Name="Varonis.Bot.WindowsService.exe.config" Source="$(var.Varonis.Bot.WindowsService_TargetDir)Varonis.Bot.WindowsService.exe.config" />
		</Component>
		<Component Id="Varonis.Bot.WindowsService.exe" Guid="268837e2-3a23-4208-bf45-ed72e452d578">
		  <File Id="Varonis.Bot.WindowsService.exe" Name="Varonis.Bot.WindowsService.exe" Source="$(var.Varonis.Bot.WindowsService_TargetDir)Varonis.Bot.WindowsService.exe" />
		</Component>
		<Component Id="Varonis.Bot.Services.dll" Guid="759b22db-bab2-429c-ad7a-2de520a73d43">
		  <File Id="Varonis.Bot.Services.dll" Name="Varonis.Bot.Services.dll" Source="$(var.Varonis.Bot.Services_TargetDir)Varonis.Bot.Services.dll" />
		</Component>
		<Component Id="Varonis.Bot.GraphHelper.dll" Guid="1d5ec43b-2d75-41bc-ab35-e13c864697c3">
		  <File Id="Varonis.Bot.GraphHelper.dll" Name="Varonis.Bot.GraphHelper.dll" Source="$(var.Varonis.Bot.GraphHelper_TargetDir)Varonis.Bot.GraphHelper.dll" />
		</Component>
		<Component Id="Varonis.Bot.QnAMaker.dll" Guid="97e82b3a-9eff-4db9-a526-37c25c490137">
		  <File Id="Varonis.Bot.QnAMaker.dll" Name="Varonis.Bot.QnAMaker.dll" Source="$(var.Varonis.Bot.QnAMaker_TargetDir)Varonis.Bot.QnAMaker.dll" />
		</Component>
		<Component Id="System.Net.Http.dll" Guid="d299cbc9-53f8-4b9a-a771-3b13d795d00a">
		  <File Id="System.Net.Http.dll" Name="System.Net.Http.dll" Source="$(var.Varonis.Bot.WindowsService_TargetDir)System.Net.Http.dll" />
		</Component>
		<Component Id="Newtonsoft.Json.dll" Guid="311e9b95-830b-481d-b342-8e7aab446fda">
		  <File Id="Newtonsoft.Json.dll" Name="Newtonsoft.Json.dll" Source="$(var.Varonis.Bot.WindowsService_TargetDir)Newtonsoft.Json.dll" />
		</Component>
		<Component Id="AzureFunctions.Autofac.dll" Guid="2e7b04bf-030f-4dfa-a0ce-1a55cd9d9674">
		  <File Id="AzureFunctions.Autofac.dll" Name="AzureFunctions.Autofac.dll" Source="$(var.Varonis.Bot.WindowsService_TargetDir)AzureFunctions.Autofac.dll" />
		</Component>
		<Component Id="System.Net.Http.Formatting.dll" Guid="c0ff835a-8437-4e01-8d71-492cba627c73">
		  <File Id="System.Net.Http.Formatting.dll" Name="System.Net.Http.Formatting.dll" Source="$(var.Varonis.Bot.WindowsService_TargetDir)System.Net.Http.Formatting.dll" />
		</Component>
		<Component Id="Microsoft.Azure.WebJobs.dll" Guid="4b2dede3-5499-42c0-b942-055c370eca22">
		  <File Id="Microsoft.Azure.WebJobs.dll" Name="Microsoft.Azure.WebJobs.dll" Source="$(var.Varonis.Bot.WindowsService_TargetDir)Microsoft.Azure.WebJobs.dll" />
		</Component>
		<Component Id="Microsoft.Azure.WebJobs.Host.dll" Guid="6575827f-bde0-4748-b3a4-db4dd3c01447">
		  <File Id="Microsoft.Azure.WebJobs.Host.dll" Name="Microsoft.Azure.WebJobs.Host.dll" Source="$(var.Varonis.Bot.WindowsService_TargetDir)Microsoft.Azure.WebJobs.Host.dll" />
		</Component>
		<Component Id="Microsoft.WindowsAzure.Storage.dll" Guid="b7170911-11a5-445d-82bc-5cbc07250178">
		  <File Id="Microsoft.WindowsAzure.Storage.dll" Name="Microsoft.WindowsAzure.Storage.dll" Source="$(var.Varonis.Bot.WindowsService_TargetDir)Microsoft.WindowsAzure.Storage.dll" />
		</Component>
		<Component Id="Microsoft.Data.Services.Client.dll" Guid="9fdce45b-9160-4db0-b0e9-b8f3e7825e8d">
		  <File Id="Microsoft.Data.Services.Client.dll" Name="Microsoft.Data.Services.Client.dll" Source="$(var.Varonis.Bot.WindowsService_TargetDir)Microsoft.Data.Services.Client.dll" />
		</Component>
		<Component Id="Microsoft.Data.Edm.dll" Guid="c9977491-18f7-46fd-87de-4c94aaecb957">
		  <File Id="Microsoft.Data.Edm.dll" Name="Microsoft.Data.Edm.dll" Source="$(var.Varonis.Bot.WindowsService_TargetDir)Microsoft.Data.Edm.dll" />
		</Component>
		<Component Id="Microsoft.Data.OData.dll" Guid="09cc665c-6ac5-4e61-9435-2db716a077d2">
		  <File Id="Microsoft.Data.OData.dll" Name="Microsoft.Data.OData.dll" Source="$(var.Varonis.Bot.WindowsService_TargetDir)Microsoft.Data.OData.dll" />
		</Component>
		<Component Id="System.Spatial.dll" Guid="50e00f8a-2718-4f8b-a9b1-92dc1f23ce5a">
		  <File Id="System.Spatial.dll" Name="System.Spatial.dll" Source="$(var.Varonis.Bot.WindowsService_TargetDir)System.Spatial.dll" />
		</Component>
		<Component Id="Microsoft.Azure.KeyVault.Core.dll" Guid="30b3e126-7755-4842-a443-e246f31e9b4a">
		  <File Id="Microsoft.Azure.KeyVault.Core.dll" Name="Microsoft.Azure.KeyVault.Core.dll" Source="$(var.Varonis.Bot.WindowsService_TargetDir)Microsoft.Azure.KeyVault.Core.dll" />
		</Component>
		<Component Id="Microsoft.Extensions.Logging.Abstractions.dll" Guid="68c86372-4e23-463f-bdfd-fde0673e3f9d">
		  <File Id="Microsoft.Extensions.Logging.Abstractions.dll" Name="Microsoft.Extensions.Logging.Abstractions.dll" Source="$(var.Varonis.Bot.WindowsService_TargetDir)Microsoft.Extensions.Logging.Abstractions.dll" />
		</Component>
		<Component Id="netstandard.dll" Guid="c1e0c926-9005-4b20-9e90-0fe2203d7595">
		  <File Id="netstandard.dll" Name="netstandard.dll" Source="$(var.Varonis.Bot.WindowsService_TargetDir)netstandard.dll" />
		</Component>
		<Component Id="System.Data.Common.dll" Guid="3531f254-9892-481b-afc6-d237b9b7bdbe">
		  <File Id="System.Data.Common.dll" Name="System.Data.Common.dll" Source="$(var.Varonis.Bot.WindowsService_TargetDir)System.Data.Common.dll" />
		</Component>
		<Component Id="System.Diagnostics.StackTrace.dll" Guid="d26e6a6b-18a3-4c69-ad8f-c36d66861466">
		  <File Id="System.Diagnostics.StackTrace.dll" Name="System.Diagnostics.StackTrace.dll" Source="$(var.Varonis.Bot.WindowsService_TargetDir)System.Diagnostics.StackTrace.dll" />
		</Component>
		<Component Id="System.Diagnostics.Tracing.dll" Guid="20733892-a91a-46fe-84a5-eb6277946468">
		  <File Id="System.Diagnostics.Tracing.dll" Name="System.Diagnostics.Tracing.dll" Source="$(var.Varonis.Bot.WindowsService_TargetDir)System.Diagnostics.Tracing.dll" />
		</Component>
		<Component Id="System.Globalization.Extensions.dll" Guid="c9457e2f-8baf-4fa3-87fa-38edc83c5946">
		  <File Id="System.Globalization.Extensions.dll" Name="System.Globalization.Extensions.dll" Source="$(var.Varonis.Bot.WindowsService_TargetDir)System.Globalization.Extensions.dll" />
		</Component>
		<Component Id="System.IO.Compression.dll" Guid="0017745d-4321-41a0-a114-3e37b42c000a">
		  <File Id="System.IO.Compression.dll" Name="System.IO.Compression.dll" Source="$(var.Varonis.Bot.WindowsService_TargetDir)System.IO.Compression.dll" />
		</Component>
		<Component Id="System.Net.Sockets.dll" Guid="88774218-b12a-475a-ad2e-44f4ffe14cd8">
		  <File Id="System.Net.Sockets.dll" Name="System.Net.Sockets.dll" Source="$(var.Varonis.Bot.WindowsService_TargetDir)System.Net.Sockets.dll" />
		</Component>
		<Component Id="System.ValueTuple.dll" Guid="6ce8f55e-a32c-497f-ba5c-bd1eef1ea3fc">
		  <File Id="System.ValueTuple.dll" Name="System.ValueTuple.dll" Source="$(var.Varonis.Bot.WindowsService_TargetDir)System.ValueTuple.dll" />
		</Component>
		<Component Id="System.Runtime.InteropServices.RuntimeInformation.dll" Guid="b6e6d703-a2af-4fe4-a120-494c7ef53175">
		  <File Id="System.Runtime.InteropServices.RuntimeInformation.dll" Name="System.Runtime.InteropServices.RuntimeInformation.dll" Source="$(var.Varonis.Bot.WindowsService_TargetDir)System.Runtime.InteropServices.RuntimeInformation.dll" />
		</Component>
		<Component Id="System.Runtime.Serialization.Xml.dll" Guid="ead5055b-5512-4364-9802-c73d67238fe7">
		  <File Id="System.Runtime.Serialization.Xml.dll" Name="System.Runtime.Serialization.Xml.dll" Source="$(var.Varonis.Bot.WindowsService_TargetDir)System.Runtime.Serialization.Xml.dll" />
		</Component>
		<Component Id="System.Runtime.Serialization.Primitives.dll" Guid="4307c900-3ac5-498b-adda-9cf13c9dffa9">
		  <File Id="System.Runtime.Serialization.Primitives.dll" Name="System.Runtime.Serialization.Primitives.dll" Source="$(var.Varonis.Bot.WindowsService_TargetDir)System.Runtime.Serialization.Primitives.dll" />
		</Component>
		<Component Id="System.Security.Cryptography.Algorithms.dll" Guid="afa9de34-b2ab-4002-af6d-68eaa2a9d28f">
		  <File Id="System.Security.Cryptography.Algorithms.dll" Name="System.Security.Cryptography.Algorithms.dll" Source="$(var.Varonis.Bot.WindowsService_TargetDir)System.Security.Cryptography.Algorithms.dll" />
		</Component>
		<Component Id="System.Security.SecureString.dll" Guid="bb6eb34b-838f-4049-9545-5041383fd6fa">
		  <File Id="System.Security.SecureString.dll" Name="System.Security.SecureString.dll" Source="$(var.Varonis.Bot.WindowsService_TargetDir)System.Security.SecureString.dll" />
		</Component>
		<Component Id="System.Threading.Overlapped.dll" Guid="9383ef2a-73f1-47e0-9f4c-2dd2bcc64d9a">
		  <File Id="System.Threading.Overlapped.dll" Name="System.Threading.Overlapped.dll" Source="$(var.Varonis.Bot.WindowsService_TargetDir)System.Threading.Overlapped.dll" />
		</Component>
		<Component Id="System.Xml.XPath.XDocument.dll" Guid="0100af33-7b29-4a13-b200-267456d83f17">
		  <File Id="System.Xml.XPath.XDocument.dll" Name="System.Xml.XPath.XDocument.dll" Source="$(var.Varonis.Bot.WindowsService_TargetDir)System.Xml.XPath.XDocument.dll" />
		</Component>
		<Component Id="System.Threading.Tasks.Dataflow.dll" Guid="234a9ff9-56b0-4b2e-bc00-5d684a54b787">
		  <File Id="System.Threading.Tasks.Dataflow.dll" Name="System.Threading.Tasks.Dataflow.dll" Source="$(var.Varonis.Bot.WindowsService_TargetDir)System.Threading.Tasks.Dataflow.dll" />
		</Component>
		<Component Id="System.Runtime.dll" Guid="a593a5b3-c4ae-4197-84c6-b3f7bc61934c">
		  <File Id="System.Runtime.dll" Name="System.Runtime.dll" Source="$(var.Varonis.Bot.WindowsService_TargetDir)System.Runtime.dll" />
		</Component>
		<Component Id="System.Threading.Tasks.dll" Guid="7a467886-77ed-46b3-965b-ffcec43c56b2">
		  <File Id="System.Threading.Tasks.dll" Name="System.Threading.Tasks.dll" Source="$(var.Varonis.Bot.WindowsService_TargetDir)System.Threading.Tasks.dll" />
		</Component>
		<Component Id="System.Collections.Concurrent.dll" Guid="fbd27fe3-a93f-4594-85b5-e9dfd7beba73">
		  <File Id="System.Collections.Concurrent.dll" Name="System.Collections.Concurrent.dll" Source="$(var.Varonis.Bot.WindowsService_TargetDir)System.Collections.Concurrent.dll" />
		</Component>
		<Component Id="System.Dynamic.Runtime.dll" Guid="2a669800-5f7c-421a-844b-c2eb246d5e54">
		  <File Id="System.Dynamic.Runtime.dll" Name="System.Dynamic.Runtime.dll" Source="$(var.Varonis.Bot.WindowsService_TargetDir)System.Dynamic.Runtime.dll" />
		</Component>
		<Component Id="System.Collections.dll" Guid="ad53a863-8219-4703-9b21-ac74bc33179b">
		  <File Id="System.Collections.dll" Name="System.Collections.dll" Source="$(var.Varonis.Bot.WindowsService_TargetDir)System.Collections.dll" />
		</Component>
		<Component Id="System.Threading.dll" Guid="1b36171c-c6de-4213-8a10-82f1ca2056a4">
		  <File Id="System.Threading.dll" Name="System.Threading.dll" Source="$(var.Varonis.Bot.WindowsService_TargetDir)System.Threading.dll" />
		</Component>
		<Component Id="System.Resources.ResourceManager.dll" Guid="397100d4-5c8b-43e0-892b-3ef6ca110ff5">
		  <File Id="System.Resources.ResourceManager.dll" Name="System.Resources.ResourceManager.dll" Source="$(var.Varonis.Bot.WindowsService_TargetDir)System.Resources.ResourceManager.dll" />
		</Component>
		<Component Id="System.Globalization.dll" Guid="8c7d36c6-e0f9-4163-9136-c9e3f82dd26c">
		  <File Id="System.Globalization.dll" Name="System.Globalization.dll" Source="$(var.Varonis.Bot.WindowsService_TargetDir)System.Globalization.dll" />
		</Component>
		<Component Id="System.Diagnostics.Debug.dll" Guid="4a57f2fd-fdf3-4e86-9332-add84ff9082a">
		  <File Id="System.Diagnostics.Debug.dll" Name="System.Diagnostics.Debug.dll" Source="$(var.Varonis.Bot.WindowsService_TargetDir)System.Diagnostics.Debug.dll" />
		</Component>
		<Component Id="System.Runtime.Extensions.dll" Guid="00ac9e09-665b-43fa-99fd-cc3ea1bf7302">
		  <File Id="System.Runtime.Extensions.dll" Name="System.Runtime.Extensions.dll" Source="$(var.Varonis.Bot.WindowsService_TargetDir)System.Runtime.Extensions.dll" />
		</Component>
		<Component Id="System.Linq.dll" Guid="f43ade22-f479-47af-88ac-31d409d310d6">
		  <File Id="System.Linq.dll" Name="System.Linq.dll" Source="$(var.Varonis.Bot.WindowsService_TargetDir)System.Linq.dll" />
		</Component>
		<Component Id="System.Diagnostics.Tools.dll" Guid="f9b8c1c4-d89e-4dd3-851a-777ed0a8b0e0">
		  <File Id="System.Diagnostics.Tools.dll" Name="System.Diagnostics.Tools.dll" Source="$(var.Varonis.Bot.WindowsService_TargetDir)System.Diagnostics.Tools.dll" />
		</Component>
		<Component Id="System.Reflection.dll" Guid="2ab14df5-df56-44ed-b9f1-098ed2d2280c">
		  <File Id="System.Reflection.dll" Name="System.Reflection.dll" Source="$(var.Varonis.Bot.WindowsService_TargetDir)System.Reflection.dll" />
		</Component>
		<Component Id="Autofac.dll" Guid="a2d0c0d6-8455-4df1-af81-7cd53948194f">
		  <File Id="Autofac.dll" Name="Autofac.dll" Source="$(var.Varonis.Bot.WindowsService_TargetDir)Autofac.dll" />
		</Component>

Varonis.Bot.WindowsService.zip

tsahi commented

correction: this is the right file. Varonis.Bot.WindowsService.zip

Maybe you just don't use any of these in your code? Or they are only used via reflection?
If you have R#, try "optimize references" to see if they are really needed.

tsahi commented

like I said earlier, I'm getting a FileNotFoundException from the .NET Runtime when the service starts, so the CLR is trying to load an assembly and fails. The frame just before the exception in the stack is where I configure Autofac, so I assume one of the types I'm trying to configure there is missing.

IOC containers usually use reflection to load the types, so they are not referenced by anything. This is nothing any tool can detect, so you must specify these manually.

+1 @tom-englert . @tsahi , Wax is based on project dependencies. If you want to generate a list of files based on the content of your bin folder, maybe you should use paraffin which is based on the filesystem.

A filesystem mode would be really nice to grab files that are not in the project dependencies. That would help for .net core project, and even .net framework project that uses dynamic loading, or native dlls.
The target dir is a valid value for .net framework projects. It should be the publish dir value for a .net core project.

@Thieum that's out of scope for this tool, if you want to build an installer based on the file system, you can simply use the Harvest Tool (Heat) from the WiX Toolset

@mevanecek seems this was a problem with older VS and the new project format.
I tried with VS 16.1.5 and everything shows up.