Skip to content
Discussion options

You must be logged in to vote

These APIs are supported on net48. There must be something else going on in your project that is hiding HWND and the like.
Check out this trivial project:
CsWin32Sandbox.zip

It compiles its code that includes and uses HWND for both TFMs just fine:

Build started...
1>------ Build started: Project: CsWin32Sandbox, Configuration: Debug Any CPU ------
1>C:\Users\andarno\source\repos\CsWin32Sandbox\Program.cs(5,6,5,10): warning CS0219: The variable 'hWND' is assigned but its value is never used
1>CsWin32Sandbox -> C:\Users\andarno\source\repos\CsWin32Sandbox\bin\Debug\net472\CsWin32Sandbox.exe
1>Done building project "CsWin32Sandbox.csproj".
1>C:\Users\andarno\source\repos\CsWin32Sandbox\Progr…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@khdc
Comment options

Answer selected by khdc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants