How to install WixSharp on VS Code? #1550
-
Hi, excuse me for my incompetence. I'm a computer science student working at a firm and I'm having troubles getting WixSharp to run. Would someone be so nice and help me out with a more detailed installation process? I tried using .NET 8.0 and 6.0 but both don't seem to work for me. When I create a console application running a Hello World is not a problem. But as soon as I download WixSharp nuget package the WixSharp.targets file throws me this error at the "exec" tag: -532462766 I'm really struggling getting it to work so I would really appreciate some help! :) And by the way: Which nuget packages do I need to install? WixSharp + WixSharp.bin? And does Wix Toolset come with it? Yours sincerely Finley Edit: I'd like to use as many command line inputs if possible since I want to create my Installer through CI/CD later on |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
I either get the ms build error code -532462766 or WixSharp library cannot be found |
Beta Was this translation helpful? Give feedback.
-
I would like to address it. So please let me know what areas need improvement or what wiki documentation got you confused. As for your problem. There is no WixSharp installation procedure as such as the only tools you need to have in your environment are Visual Studio 2022 and WiX Toolset. WixSharp is coming into the picture as a WixSharp .NET project template that references WixSharp nuget package. Thus you need to:
Since only Visual Studio supports templates VSCode can only be used for compilation but not creation of the .NET project. Thus I have attached for you a sample project that I created from the VS template. You can build it from VSCode, as any other project or from .NET CLI:
But using Visual Studio is by far a preferred option as it gives you all the answers right out of box: https://github.com/oleg-shilo/wixsharp/wiki/VS2019-%E2%80%93-2022-Templates. |
Beta Was this translation helpful? Give feedback.
-
Hi! Thank you so much for the quick response. I got it to work now and I confused two different errors at the same time, definitely my fault.
Additionally I did not find any mention on which .NET version to use. I assume since the project you linked used version 4.72 that this is the preferred one. But I'm still unsure. This was my feedback as a thank you for helping me out. Maybe you should update the documentation first after other people mention the same problems since it was only me having problems yet I guess most of the other people were and are able to figure it out. I have one more detailled question regarding WixSharp but I will ask that in another discussion. Thanks again you may close the thread if you like to! Greetings Finley |
Beta Was this translation helpful? Give feedback.
-
Thank you Finley.
Yes and no 😄 |
Beta Was this translation helpful? Give feedback.
I would like to address it. So please let me know what areas need improvement or what wiki documentation got you confused.
I have already reviewed and updated the step-by-step tutorial as indeed it needed rework: https://github.com/oleg-shilo/wixsharp/wiki/Building-MSI-%E2%80%93-Step-by-step-tutorial
As for your problem.
There is no WixSharp installation procedure as such as the only tools you need to have in your environment are Visual Studio 2022 and WiX Toolset.
WixSharp is coming into the picture as a WixSharp .NET project template that references WixSharp nuget package.
Thus you need to:
dotnet tool install --g…