Skip to content

Visual Studio 2022 cannot build the SignForSandboxTask inline code task successfully #4

@scottpidzarko

Description

@scottpidzarko

This was investigated in the Feature_VS2022_Support branch.

The issue was to do with the COM interop assemblies utilized by the SignForSandboxTask, which need to run in the x86 application space, but VS2022 runs 64-bit MSBuild and the inline code gets compiled to a 64-bit target. I believe Microsoft.VisualStudio.Shell.9.0 is the problem assembly, and furthermore has been removed from the Visual Studio SDK in 2022.

The workaround is to move the inline code to its own task, which has an Architecture="x86" xml attribute that can be used. This is demonstrated in the VS2022 branch mentioned.

The issue that still needs to be addressed is packaging/distributing the build dll from the SignForSandboxTask project. It's output relies on the Crestron plugin as well as Microsoft dlls. End-users can compile it fine, but we can't ship the built project as part of the nuget package.

A potential workaround is to use an <exec> MSBuild task as part of the target that invokes the compiler on the provided .cs sources and spits the output out in a tasks folder in the package directory. This will need to be investigated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions