Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C++/CLI compile error C3611 for "gcnew System::Windows::Forms::DataObject" #9644

Closed
panxn opened this issue Aug 3, 2023 · 3 comments
Closed
Assignees

Comments

@panxn
Copy link

panxn commented Aug 3, 2023

.NET version

.NET8 preview6

Did it work in .NET Framework?

Yes

Did it work in any of the earlier releases of .NET Core or .NET 5+?

It works in .NET6&7

Issue description

I'm not sure if it belongs to winform, maybe it's a bug of c++/cli compiler since these code compile well if rewrite with C#.

To reproduce the error, just create a new project in VS, add following attributes in vcxproj:

  <PropertyGroup>
    <TargetFramework>net8.0-windows</TargetFramework>
    <CLRSupport>NetCore</CLRSupport>
  </PropertyGroup>
  <ItemGroup>
    <FrameworkReference Include="Microsoft.WindowsDesktop.App.WindowsForms" />
  </ItemGroup>

Compile following code, then we can see compile error C3611: a sealed function cannot have a pure-specifier

void HelloWorld()
{
    gcnew System::Windows::Forms::DataObject();
}

BTW I suspect it's a c++/cli compiler bug because I have encountered it in dotnet/runtime#88840 (comment), this comment also provides another sample. Please help forward this problem to right person if you treat it as a compiler bug. Thanks!

Steps to reproduce

see description

@panxn panxn added the untriaged The team needs to look at this issue in the next triage label Aug 3, 2023
@elachlan
Copy link
Contributor

elachlan commented Aug 8, 2023

@Tanya-Solyanik is this the right repo for this?

@merriemcgaw
Copy link
Member

This should go to the C++ team. @Olina-Zhang can you please file a bug in AzDO under the C++ area path and close this when you're done?

@merriemcgaw merriemcgaw removed the untriaged The team needs to look at this issue in the next triage label Aug 8, 2023
@Olina-Zhang
Copy link
Member

Created an internal AzDo bug: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1867740, closing this one.

@ghost ghost locked as resolved and limited conversation to collaborators Sep 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants