question

ThomasClarke-7987 avatar image
0 Votes"
ThomasClarke-7987 asked ThomasClarke-7987 commented

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

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.

dotnet-runtime
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

cooldadtx avatar image
0 Votes"
cooldadtx answered ThomasClarke-7987 commented

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.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

cooldadtx, yes self-contained deployment is what I was referring to, but at the moment it doesn't work with C++/CLI projects. I'm hoping to work out if/when this will be supported, or if there are workarounds that can be used before it's implemented.

0 Votes 0 ·
cooldadtx avatar image
0 Votes"
cooldadtx answered ThomasClarke-7987 commented

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.

· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks for your suggestion. There's already a discussion about it here: https://github.com/dotnet/sdk/issues/12345 The reason I'm asking about it on the .NET Q&A Site is to get feedback from someone involved in the development team on when this feature will be added in .NET (or if it won't, what can be done about it).

0 Votes 0 ·

Microsoft Q&A is generally for community support. If you want direct feedback from the team then you should comment on the issue in Github. The team working on it monitor Github comments.

0 Votes 0 ·

Okay, I've added a comment on the GitHub issue. Hopefully something comes out of it.

0 Votes 0 ·