You can now create COM-callable managed components on Windows.
mscoree.dll
was used as the COM server, .NET Core will add a native launcher dll
to the bin directory when you build your COM component.The project will only build and run on the Windows platform. You can build and run the example either by registering the COM server or by using registration-free COM.
dotnet.exe build
.COMClient/
and run dotnet.exe run
.The program should output an estimated value of π
.
dotnet.exe build /p:RegFree=True
.dotnet.exe clean
.COMClient\bin\Debug\netcoreapp3.0\COMClient.exe
.The program should output an estimated value of π
.
dotnet.exe
will not work and instead trigger a rebuild of the project.dotnet clean
between the two samples.Windows offers a rich native API in the form of flat C APIs, COM, and WinRT. While .NET Core supports P/Invoke, .NET Core 3.0 adds the ability to CoCreate COM APIs and Activate WinRT APIs.
MSIX is a new Windows application package format. It can be used to deploy .NET Core 3.0 desktop applications to Windows 10. The Windows Application Packaging Project, available in Visual Studio 2019, allows you to create MSIX packages with self-contained .NET Core applications.
The .NET Core project file must specify the supported runtimes in the <RuntimeIdentifiers>
property.
<RuntimeIdentifiers>win-x86;win-x64</RuntimeIdentifiers>