How to compile c# file to .wasm file? - mono

I know that there are same questions asked by other people in the past, and the answer is no. But with the .net 6 realsed, blazor webassembly now supports AOT compiling, the problem is that the output is bundled in a big "dotnet.wasm" file, which contains the dotnet runtime as well as my app code(please tell me if my understanding is wrong?). so my questions is, how can I compile any c# file to a separeted .wasm file?
Thank you.

Related

Restsharp dll compiled for Compact Framework 3.5?

I'm building a windows mobile 6.0 application and I wanted to use restsharp library to consume data from a rest service. I've found information that RestSharp can be compiled for compact framework 3.5 (as is not available from the official site).
But, does anybody have successfully compiled the assembly for CF? If yes, could anybody provide a link to download the assembly. Thanks
I do not know a download location for the ready-to-use assembly.
I would start a new CF2 project and in another instance of VS open the original restsharp solution. Additionally open two file explorer to copy files of the restsharp source to the new CF2 project directory. You should maintain the same solution layout and folders (if any). Then copy the files over to CF2 dirs and use Add Existing Files in the CF2 solution. You need to use the same namespace and project and solution names (makes live easier).
Now try to compile. If you are lucky, everything compiles without error. But mostly you have to either adjust code or write CF2 compatible wrappers. If there are two many FullFramework constructs that can not be 'emulated' in CF2, you may have to give up. But as you said, there are CF compatible sources.
You mentionend CF3.5 and asked for CF2. Possibly RestSharp will only compile as CF3.5 assembly.
See also: RestSharp: Don’t Serialize null Properties
BTW: the GitHub repo (https://github.com/restsharp/RestSharp) shows a CF solution file RestSharp.Compact.sln and RestSharp.Compact.csproj. These should work with VS2008.

What are *.dll.s files and what are they used for?

I am currently working on an iOS project using the Unity framework.
When I export an Xcode project from Unity, there are a whole bunch of files exported.
Besides some source files, there are also .dll files for the Mono project.
But there are also .dll.s files.
For troubleshooting, it would be great to know what they are used for.
There is one .dll.s file for every dll, so it could be some sort of source which is compiled into the dll?
When there are exceptions somewhere in the code, Xcode often jumps into one of these .dll.s files and it looks as if they contain some sort of assembly code.
Directions would be nice, Google isn't really helpful here ...
TIA,
best regards,
Flo
They're the IL code in the dll files compiled into arm assembly. This is the code that eventually end up in the final app binary.

Web site to dll

I need to compile my web site, is it possible without converting to a web project first?
I think he wants to "protect" his code for any deployment.
If this is a .Net project you can try hide some code using codebehind components in ASP.NET.
Here is an small tutorial about it:
http://asp.net-tutorials.com/basics/code-behind/
For older projects you may have to build a cgi binary application, but as already mentioned here, add some more details to specify your problem.
I think you want a VS Web Deployment project. This exists as a separate project in your solution but can compile and copy the existing web project to a different directory.
There's a reasonable write-up of it on this blog with step-by-step instructions. You'll need to download and install the new project type separately though (2008, 2010)

converting jar to native dll

This is my first post here. Please let me know if am doing wrong in posting.
Well coming to the question, I have a jar(bundled collection of jars into one) and this jar doesnt have a main method. I have to convert this jar to dll and write a C code using that dll. (Native language bindings). So, are there any good tools to convert jar to native dll? I was googling and came across ikvmc but this converts jar to .Net dll. What is the difference between a normal dll and .Net dll? Can i use ikvmc to do my work? Or are there any other tools which converts jar to native dll? I see many tools that can covert jar to exe but not jar to dll. Please help me.Thanks..
Look at instantiating a JVM in C and then wrap that code in a new DLL as required.
How to call Java functions from C++?

Invoking .Net COM assembly from Powerbuilder application (without registration)

We have a Powerbuilder 10 application that is using .Net COM assemblies. We are trying to embed the manifest in the PB application (to invoke COM assemblies without registration). The merged manifest file has added sections for dependecies on the .Net COM assemblies. We have tries various tools to inject the new manifest with different results
- using GenMan32 to inject truncates the application from 6MB to 45KB.
- using ResourceTuner, the file size looks okay, but trying to launch application gives "Fatal Disk Error".
Any suggestions on invoked .Net ComEnabled assembly from PB without registration?
Have you tried it with an external manifest and ensured that works? If an external manifest doesn't work, then the manifest information isn't correct.
Once you have a valid external manifest, you might try the Manifest Tool (MT.EXE) from the .Net SDK. It works well with true EXE files. As Terry noted though, the PB generated executable contains additional information that tools that manipulate the EXE need to respect or they will break it.
http://blogs.msdn.com/patricka/archive/2009/12/09/answers-to-several-application-manifest-mysteries-and-questions.aspx
This is more a redirection than an answer. One thing you need to be aware of is that PowerBuilder produces executables that do not follow standards for Windows executable files. Essentially they are a bootstrap routine to load the PowerBuilder virtual machine, plus a collection of class definitions (objects). The cases you've brought up are not the first I've heard of where utilities meant to modify executables don't work on PowerBuilder executables.
As for a positive contribution on what other directions to follow, I don't really know enough to give qualified advice. If it were me, I'd try to register the COM object if ConnectToNewObject() fails, but I've got no idea if that possible or if that route is a dead end.
Good luck,
Terry.