Skip to content
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 Core FileShortcut error WIX0094 #1727

Open
DarthSidius opened this issue Jan 17, 2025 · 1 comment
Open

Net Core FileShortcut error WIX0094 #1727

DarthSidius opened this issue Jan 17, 2025 · 1 comment

Comments

@DarthSidius
Copy link

using System.Runtime.CompilerServices;
using WixSharp;
using WixToolset.Dtf.WindowsInstaller;
using File = WixSharp.File;

[assembly: InternalsVisibleTo(assemblyName: "Setup1.aot")] // assembly name + '.aot suffix

var project = 
    new ManagedProject(
        "My Product",
        new Dir(@"%ProgramFiles%\My Company\My Product",
            new File(
                "program.cs",
                new FileShortcut("program cs", @"%Desktop%\My Product")
            )
        ),
        new Property("PropName", "<your value>")
    );

// project.AddUIProject("Setup1.UI"); // name of the 'Custom UI Library' project in the solution

project.Load += (e) =>
{
    Native.MessageBox("OnLoad", "WixSharp - .NET8");
    e.Result = ActionResult.Failure;
};

project.BuildMsi();

...\Setup1\My Product.wxs(12): error WIX0094: The identifier 'Directory:DesktopFolder.My20Product' could not be found. Ensure you have typed the reference correctly and that all the necessary inputs are provided to the linker.

@Torchok19081986
Copy link

Hiho, i foudn https://stackoverflow.com/questions/77216955/wix-v4-installer-how-to-create-shortcuts on Stackoverflow. It seems that there is difference between your implementaion and standard wix v4 Version. Maybe this helps. Just examindate your output of wxs File, where file shortcut is, I am sure this lead to this error.
Best regards, Torchok.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants