-
Notifications
You must be signed in to change notification settings - Fork 176
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
.Net 8 project with external dependency fails to build #1649
Comments
Yes, you can. The was just a question about that: #1648 A word of warning, ensure that your utility is compiled as standardlibrary2 And.... .NET Core (e.g. .NET8) support is rather limited. Some features may be impacted. See this wiki: https://github.com/oleg-shilo/wixsharp/wiki/.NET-Core-support |
I've got it to compile/work now: I am using a baseclass from the library for adding actions to the installer. This happens to be the same class which the customaction is defined in. This doesn't work, you will get the Error CS0012 : The type 'InstallerPartBase' is defined in an assembly that is not referenced. I now define the customaction in a static class separate from the adding of the customaction to the installer, which works. FYI: The generated code also fails on enum's defined in a class, I needed to change that as well. With WixSharp.Core and WixSharp.Msi.Core can I still influence the wix.exe that is being called? I used to do this:
Which ensured Wix 3.14.1 was used, I don't see how this works with the Core packages? (Then using Wix version 4.0.5) |
If you are interested in controilling wix.exe then you can use WixTools.SetWixVersion(Environment.CurrentDirectory, "5.0.0"); Note, wix.exe is part of the Wix4 toolser. WiX3 uses completely different set of compilers. And Core packages are only designed to be used with WiX4. |
A follow up from: Cannot build .net 8 example project #1574
I've been able to build the sample project and convert one of our Wix 3.x based projects using .net8 and WixSharp.Core/WixSharp.Msi.Core 2.4.0. However: we have a couple of installer projects which use common code from a shared library. This I can't get to work. The setup
The build currently fails on (InstallerPartBase being a class in the library project):
1>aot.entrypoints.cs(17,66): Error CS0012 : The type 'InstallerPartBase' is defined in an assembly that is not referenced. You must add a reference to assembly 'project.Installer, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. [C:\projectl.Installer\bin\AnyCPU\Release\aot.project.Installer\project.Installer.aot.csproj]
How do I fix this? Can I have CustomActions and/or dependent types in a separate library?
The text was updated successfully, but these errors were encountered: