Comments (11)
Sorry, it was my mistake. See 797396d
If you want fetch, I assume you need to add new type here
https://github.com/kant2002/WinFormsComInterop/blob/main/samples/BlazorHybrid/rd.xml
And maybe some additional things for HttpClient, you have to test. Unfortunately currently Blazor Hybrid require such laborious work.
from winformscominterop.
Oh my... I was banging my head on the keyboard, I tried to create a new project from scratch, changing properties, versions, etc.
And it was yelling the whole time "failed to load assembly", just because it was missing one word.
Thank you for the fix :)
from winformscominterop.
Don't worry. That's normal situation, this thing a bit complicated to learn from first stab. Take your time, I bet NativeAOT eventually make your app small !
from winformscominterop.
I really like the idea of native AOT and their advantages. The only problem now is that a lot of things are not supported yet or need a lot of tweaking. Which leads me to another question - not sure if I should write here, spin another thread, or maybe discuss on another platform (Discord maybe?). Anyway, I will try.
Is it possible to deploy it as a single file? PublishSingleFile and NativeAOT properties cannot be used together.
Publishing now results in one .exe, few DLLs (found out that only webview2loader.dll is needed) and wwwroot folder.
I was able to embed the wwwroot inside the app, however this bug appeared #1333 issue, I peeked into .exe copied the manifest, fixed the error and manually forced it back in the app.
It obviously works, but it is tedious, and I cannot imagine doing all the time over when adding some new files.
Maybe I want a lot of things ;)
from winformscominterop.
Found out solution for the #1333 issue.
For those who would like to embed wwwroot into the application, it is necessary to add those lines in the .csproj
<ItemGroup>
<EmbeddedResource Update="MainForm.resx" ExcludeFromManifest="true" />
</ItemGroup>
Big help from this thread #31107
The final step is to figure out if it is possible to embed all those dlls :)
from winformscominterop.
So you embed whole wwwroot
, that's really nice. Regarding single file and NativeAOT. As you probably figure out that's mutually exclusive things. And what even Single file means for NativeAOT, some "magic" packer? it would not work. NativeAOT in a sense alreade single file.
from winformscominterop.
I fell into the rabbit hole. Even the name PublishSingleFile
is not truly a single file, and more or less dlls are there (depending on the project size, obviously). But with combination IncludeNativeLibrariesForSelfExtract
publishing will result in really only one single file. And I would like to achieve the same or similar with AOT. To have only one single file. But so far, no luck.
from winformscominterop.
You have to package that in single file yourself. This scenario does not supported.
from winformscominterop.
Yep, I thought that. But do you have some guide or something to steer me the right way?
Should I embed it the same way as the folder? Or used something like ILmerge? Would Costura.Fody work?
What is the way to go?
from winformscominterop.
I would try to look at https://github.com/MichalStrehovsky/PublishAotCompressed . I think your solution lays in unmanaged land of different kind of packers like UPX or something like that. Fody is for managed assemblies, but you want to pack unmanaged DLL into your EXE.
from winformscominterop.
Will definitely try and check. Thanks a lot for your help :)
from winformscominterop.
Related Issues (20)
- dont working with net8
- Using System.Windows.Forms.Integration.ElementHost.ElementHost in Avalonia crash HOT 6
- Use .ico file for winform HOT 1
- Can WinFormsComInterop work with json HOT 1
- Need support for .net8
- .net 8 support
- .NET 8.0. "Failed to launch design tools server process" HOT 2
- Working with WMPLib.WindowsMediaPlayer HOT 2
- Winforms samples dont compile, dozens of errors HOT 1
- Failed to load assembly 'Microsoft.Web.WebView2.WinForms.WebView2
- winform net7 aot ,Close() application execution error HOT 3
- May I ask when. net8 can be supported HOT 12
- Is it possible to use this magic lib on SharpDX? HOT 3
- win form aot fail atal error CVT1105: HOT 1
- Having trouble using ManagementObjectSearcher to get hard drive information HOT 1
- Blazor Hybrid .NET 8 Support
- Generated Wrapper calls Marshal.GetNativeVariantForObject which is not supported HOT 3
- Cannot connect to mysql when using mysql.data HOT 1
- Error connecting to mysql when using mysql.data
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from winformscominterop.