oleg-shilo / wixsharp

Framework for building a complete MSI or WiX source code by using script files written with C# syntax.
MIT License
1.09k stars 173 forks source link

Is it possible to improve the design with different packages while creating a Custom User Interface? #1134

Closed saklanmaz closed 2 years ago

saklanmaz commented 2 years ago

Hello,

First of all, thank you for the project. My question is I want to make use of MaterialDesign package while creating UI. But I am not able to install the Nuget package. How can I use these design packs?

saklanmaz commented 2 years ago

Package was not installing due to Visual Studio error. I was able to install the nuget package. But it does not find the tools in the package.

saklanmaz commented 2 years ago

It was closed by mistake.

Torchok19081986 commented 2 years ago

morning, Bootsrapper or Mananged UI ? For Managed UI https://github.com/oleg-shilo/wixsharp/issues/1081. Bootstrapper would be with WPF and C# better choice for Custom UI.

oleg-shilo commented 2 years ago

For Mananged UI I suggest you create your project form "Managed UI WPF" template. Then you can add any WPF package. But you will need to ensure that you add your extra package assemblies to the MSI via project.DefaultReferenecdAssemblies. You will find the explanation on wiki

saklanmaz commented 2 years ago

Thank you, I was able to install packages into the project. But I couldn't find the area you mentioned. I get an error when I want to add as below. It says there is no reference to System.Windows.Forms, but there are references. When I remove the following two lines of code it compiles without errors.

    project.DefaultRefAssemblies.Add("MaterialDesignColors.dll");
    project.DefaultRefAssemblies.Add("MaterialDesignThemes.Wpf.dll");

Error

The type or namespace name 'Forms' does not exist in the namespace 'System.Windows' (are you missing an assembly reference?)

""C:\Users\source\repos\WpfApp4\WixSharp_Setup61\bin\Debug\net452\WixSharp_Setup61.exe" "/MSBUILD:WixSharp_Setup61" "/WIXBIN:" "/Configuration:Debug" "/Platform:AnyCPU"" exited with code -532462766. WixSharp_Setup61 C:\Users\.nuget\packages\wixsharp\1.20.0\build\WixSharp.targets

saklanmaz commented 2 years ago

Forms error disappeared after closing and reopening the project. But the second error code persists, I think I'm missing something.

oleg-shilo commented 2 years ago

I think it is better to reset your environment.

Did you use a project template to create your setup project? if not then install VS WixSharp extension and it will bring the templates on your PC.

  1. Create the project from the template you choose and add the extra nuget package(s).
  2. Add extra assemblies from the new package as you did.

That should be enough.

As for ' But I couldn't find the area you mentioned. ' I don't really follow what you are referring to.