Is it possible to perform a standalone build with a C++/CLI project?

Thomas Clarke 1 Reputation point
2020-11-30T10:07:43.587+00:00

As the question suggests, I'm trying to find out if it's possible to build a C++/CLI project so that the .NET runtime is included, in order to minimise dependencies on .NET being installed in advance. Is this possible with .NET 5 (or is it on the roadmap)?

To help explain why I'm asking about this, the company I work for is building an application which we wish to allow users without admin rights to install. If we were able to generate a standalone build this would mean that we didn't rely on the user running the .NET Runtime installer (which if they were not an admin, they wouldn't have the rights to do themselves). The application consists of a number of C#, C++ and C++/CLI projects, and the only stumbling block we've had is to generate the standalone build for the C++/CLI projects. If this one issue can be fixed then the work to generate the installer can be completed.

Thanks in advance.

.NET Runtime
.NET Runtime
.NET: Microsoft Technologies based on the .NET software framework.Runtime: An environment required to run apps that aren't compiled to machine language.
1,117 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Michael Taylor 47,711 Reputation points
    2020-11-30T15:28:49.937+00:00

    I think what you're looking for is self contained deployment which has been supported for a while. However I've never tried it with a C++/CLI assembly so there may be some gaps.


  2. Michael Taylor 47,711 Reputation points
    2020-11-30T15:39:25.753+00:00

    Did you publish with the RID parameter? That is supposed to work around the C++/CLI issue. But some people have reported it doesn't run properly. Otherwise I'd say it is not yet supported.

    I don't see anything on the roadmap but you can add a request here.