Click here to Skip to main content
15,118,967 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
GeneralRe: .NET 5? Pin
Doug Milne 202111-Aug-21 6:06
MemberDoug Milne 202111-Aug-21 6:06 
GeneralRe: .NET 5? Pin
John Schroedl11-Aug-21 6:25
professionalJohn Schroedl11-Aug-21 6:25 
GeneralRe: .NET 5? Pin
Doug Milne 202111-Aug-21 8:45
MemberDoug Milne 202111-Aug-21 8:45 
GeneralRe: .NET 5? Pin
D. Milne24-Aug-21 7:59
MemberD. Milne24-Aug-21 7:59 
GeneralRe: .NET 5? Pin
Richard MacCutchan24-Aug-21 22:45
mveRichard MacCutchan24-Aug-21 22:45 
QuestionHow can I update my status-bar in MFC? Pin
Member 1503370431-Dec-20 22:03
MemberMember 1503370431-Dec-20 22:03 
AnswerRe: How can I update my status-bar in MFC? Pin
Richard MacCutchan31-Dec-20 22:19
mveRichard MacCutchan31-Dec-20 22:19 
QuestionAdding references to WPF or WinForms in .NET 5 (from C++/CLI) Pin
John Schroedl18-Dec-20 6:11
professionalJohn Schroedl18-Dec-20 6:11 
Hi,

I'm looking into whether we can move our current C++/CLI (and C#) code to using .NET 5.

One challenge seems to be that my C++/CLI Library project cannot reference a number of the UI classes any more.

For a simple test library, trying to call System::Windows::MessageBox::Show( msg ); results in:
1>C:\Users\john\source\repos\CppNetCoreLib\Widget.cpp(19,20): error C2039: 'MessageBox': is not a member of 'System::Windows'

I have switched to /clr:netcore and net5.0-windows as the target Framework. I can build and run if I don't use WinForms or WPF calls but trying those will fail.

So, I'm left searching for ways to reference those assemblies. But, simply referencing assemblies is no longer the way to add System::* dependencies. Instead, it looks like one must refernce 'Frameworks'. But C++/CLI doesn't support that in the VS IDE.

In C#, the csproj file adds <UseWPF>true</UseWPF> and/or <UseWindowsForms>true</UseWindowsForms>. Those don't seem to have any effect in C++/CLI.

Anyone have ideas or suggestions on what I could try?
John
AnswerRe: Adding references to WPF or WinForms in .NET 5 (from C++/CLI) Pin
John Schroedl18-Dec-20 8:34
professionalJohn Schroedl18-Dec-20 8:34 
Question“error:passing 'const std::vector<int>' as 'this' argument discards qualifiers [-fpermissive]” Pin
neuronphysics13-Dec-20 17:35
Memberneuronphysics13-Dec-20 17:35 
Questionap alternate boundary pairs in matrix Pin
Doraemon Kids25-Nov-20 9:26
MemberDoraemon Kids25-Nov-20 9:26 
AnswerRe: ap alternate boundary pairs in matrix Pin
Richard MacCutchan25-Nov-20 10:24
mveRichard MacCutchan25-Nov-20 10:24 
QuestionAbstract classes and factories Pin
Richard Andrew x6412-Sep-20 6:53
professionalRichard Andrew x6412-Sep-20 6:53 
Questionsorce code grid line Pin
SADEGH20771-Aug-20 8:32
MemberSADEGH20771-Aug-20 8:32 
AnswerRe: sorce code grid line Pin
Dave Kreskowiak1-Aug-20 9:41
mveDave Kreskowiak1-Aug-20 9:41 
QuestionCreating an OpenGL view on a Windows Form Pin
SADEGH207730-Jul-20 9:05
MemberSADEGH207730-Jul-20 9:05 
QuestionOPENGL 4.6 Not responsive please help Pin
SADEGH207730-Jul-20 7:13
MemberSADEGH207730-Jul-20 7:13 
AnswerRe: OPENGL 4.6 Not responsive please help Pin
Richard Andrew x6430-Jul-20 7:42
professionalRichard Andrew x6430-Jul-20 7:42 
QuestionTO OPENGL 4.6 Not responsive please help Pin
SADEGH207730-Jul-20 7:09
MemberSADEGH207730-Jul-20 7:09 
QuestionI want to use this source code that you put, but with opengl 4.6 Does not run and gives an error Pin
SADEGH207730-Jul-20 6:36
MemberSADEGH207730-Jul-20 6:36 
AnswerRe: I want to use this source code that you put, but with opengl 4.6 Does not run and gives an error Pin
Richard MacCutchan31-Jul-20 5:52
mveRichard MacCutchan31-Jul-20 5:52 
QuestionCreating an OpenGL view on a Windows Form Pin
SADEGH207730-Jul-20 4:54
MemberSADEGH207730-Jul-20 4:54 
AnswerRe: Creating an OpenGL view on a Windows Form Pin
Richard MacCutchan30-Jul-20 5:15
mveRichard MacCutchan30-Jul-20 5:15 
Questionc++ program Pin
Member 148568768-Jun-20 3:31
MemberMember 148568768-Jun-20 3:31 
AnswerRe: c++ program Pin
Eddy Vluggen8-Jun-20 4:01
professionalEddy Vluggen8-Jun-20 4:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.