All Projects → kant2002 → WinFormsComInterop

kant2002 / WinFormsComInterop

Licence: MIT license
ComWrappers required to run NativeAOT and WinForms

Programming Languages

C#
18002 projects

Projects that are alternatives of or similar to WinFormsComInterop

SevenSegment
A full-featured seven-segment control for WinForms.
Stars: ✭ 30 (-44.44%)
Mutual labels:  winforms
topmostfriend
Utility for making windows always be on top, forcefully.
Stars: ✭ 6 (-88.89%)
Mutual labels:  winforms
forge-viewhubs-desktop
Autodesk design file explorer for desktop: Demonstrates a desktop application that shows BIM 360 Team, BIM 360 Docs and Fusion Team hubs, which respective Projects, Folders, Items and Versions
Stars: ✭ 31 (-42.59%)
Mutual labels:  winforms
GChan
Scrape boards and threads from 4chan (8kun WIP). Downloads images, videos and HTML if desired.
Stars: ✭ 31 (-42.59%)
Mutual labels:  winforms
TrialMaker.Demo
A powerful yet straight-forward library suite that provides secure trial license generation and copy-protection features for .NET applications. It also supports premium license generation for expired free-trials.
Stars: ✭ 21 (-61.11%)
Mutual labels:  winforms
SimpleClassicTheme.Taskbar
Taskbar for Simple Classic Theme
Stars: ✭ 47 (-12.96%)
Mutual labels:  winforms
example-app
Example app showcasing fulls1z3's Angular libraries
Stars: ✭ 27 (-50%)
Mutual labels:  aot
Microsoft.Toolkit.Win32
This repository contains all controls for WPF and WinForms to simplify and demonstrate usage of UWP controls
Stars: ✭ 345 (+538.89%)
Mutual labels:  winforms
WinForms-KWAssistant
百度搜索关键词,刷点击
Stars: ✭ 16 (-70.37%)
Mutual labels:  winforms
Scraps
Scrap.TF Raffle Joining Bot
Stars: ✭ 24 (-55.56%)
Mutual labels:  winforms
dotvariant
A type-safe and space-efficient sum type for C# (comparable to discriminated unions in C or C++)
Stars: ✭ 52 (-3.7%)
Mutual labels:  csharp-sourcegenerator
TheLastTime
C# .NET 5 Blazor WebAssembly Progressive Web Application that tracks when was the last time you did something
Stars: ✭ 23 (-57.41%)
Mutual labels:  winforms
Immutype
Immutability is easy!
Stars: ✭ 26 (-51.85%)
Mutual labels:  csharp-sourcegenerator
angular2-pokedex
A Pokedex built on Angular with AoT, Tree Shaking, Rollup and TypeScript
Stars: ✭ 34 (-37.04%)
Mutual labels:  aot
JsonSrcGen
Json library that uses .NET 5 Source Generators
Stars: ✭ 140 (+159.26%)
Mutual labels:  csharp-sourcegenerator
Surviving-WinForms
WinForms ain't going away anytime soon. A lot of us have to deal with it. Let's make the most of it, shall we? 😎
Stars: ✭ 36 (-33.33%)
Mutual labels:  winforms
Krypton-Toolkit-Suite-NET-Core
A update to Component factory's krypton toolkit to support .NET Framework 3.5 to .NET Core
Stars: ✭ 27 (-50%)
Mutual labels:  winforms
transonic
🚀 Make your Python code fly at transonic speeds!
Stars: ✭ 93 (+72.22%)
Mutual labels:  aot
Standard-Toolkit
An update to Component factory's krypton toolkit to support .NET Framework 4.6.2 - 4.8.1 to .NET Core/.NET
Stars: ✭ 194 (+259.26%)
Mutual labels:  winforms
LazyTS
PowerShell Script (GUI) to manage Terminal Sessions
Stars: ✭ 85 (+57.41%)
Mutual labels:  winforms

ComWrappers required to run NativeAOT and WinForms

This repository has ComWrappers implementation for WinForms. In additional to that, it allow use WinForms and NativeAOT and R2R with trimming together.

Getting started

Just add WinFormsComInterop to your project.

dotnet add package WinFormsComInterop

Then to your Program.cs add following line

ComWrappers.RegisterForMarshalling(WinFormsComInterop.WinFormsComWrappers.Instance);

If you application will works with this ComWrappers implementation, then most likely it would work with NativeAOT.

Testing technology

Test that normal CoreCLR works

dotnet run --project samples\SampleWindowsForms\SampleWindowsForms.csproj
dotnet run --project experiments\WpfTestBed\WpfTestBed.csproj
dotnet run --project experiments\WinUITestBed\WinUITestBed\WinUITestBed.csproj
dotnet run --project experiments\WinUIUWP\WinUIUWP.csproj

NativeAOT

Test that NativeAOT works. Run commands in x64 developer tools.

WinForms

dotnet publish -r win-x64 samples\SampleWindowsForms\SampleWindowsForms.csproj
"samples\SampleWindowsForms\bin\x64\Debug\net6.0-windows\win-x64\publish\SampleWindowsForms.exe"

Below are experimental projects. They are need additional work.

WPF

dotnet publish -r win-x64 experiments\WpfTestBed\WpfTestBed.csproj -p:GenerateWPF=true

blocked by #30

WinUI

dotnet publish -r win10-x64 experiments\WinUITestBed\WinUITestBed\WinUITestBed.csproj

Classic UWP project

dotnet publish -r win-x64 experiments\WinUIUWP\WinUIUWP.csproj

does not working due to this error

experiments\WinUIUWP\WinUIUWP.csproj : error MSB4057: The target "Restore" does not exist in the project.

For brave souls

Mostly notes for me, but maybe somebody would like to hack.

Build (NativeAOT)[https://github.com/dotnet/runtimelab/tree/feature/NativeAOT].

Modify nuget.config

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <!--To inherit the global NuGet package sources remove the <clear/> line below -->
    <clear />
    <!--Locally built version of NativeAOT -->
    <add key="ILC" value="c:\runtimelab\artifacts\packages\Debug\Shipping\" />
    <!--To use daily builds of runtime -->
    <add key="dotnet6" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet6/nuget/v3/index.json" />
  </packageSources>
</configuration>

Restore packages to local folder to not pollute global Nuget cache. You will build NativAOT a lot.

dotnet restore -r win-x64 --packages packages

Then publish applications using regular workflow described above.

Additional reading

Design of future stubs in Runtime

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].