I am fairly new to .NET and C#. I would like to develop a native multi platform app. After a bit of research, C# with Avalonia seems to be a good choice. I am using Visual Studio on Windows and would like to compile a basic app and publish it for Mac (just to get things working). Is that possible or do you have to compile the app on a Mac? I get the following error on the Mac when I try to run the app:
Asked
Active
Viewed 949 times
0
-
Which version of .NET are you using? .NET Framework doesn't run on anything but Windows. .NET Core and .NET 5 are cross-platform, and in theory you can compile them to be cross-platform and run the executable on any platform (subject to some restrictions). You can read about this in lots of detail in Microsoft's documentation. You can also publish it such that the target machine doesn't need to have .NET runtimes pre-installed on it. Unfortunately you've provided no useful detail about your app, or how you are compiling it and executing it currently, so it's hard to know what is going on. – ADyson Jan 18 '21 at 14:55
-
Also, please don't paste pictures of your errors. They are text. Please paste them as text...then they are copyable, searchable etc. Same goes for code samples, if you had any. Thanks. – ADyson Jan 18 '21 at 14:56
-
Thanks for the reply. I am using the latest version of .NET (5.0). Sorry about the picture but it's all I have for now. – Jan 18 '21 at 15:00
-
Why? Doesn't your application log errors to a file, or the console, or anything else where you could copy it from properly? – ADyson Jan 18 '21 at 15:01
-
I'm using .NET Core 5.0 which is also installed on the Mac side. There's nothing to say about the app at the moment because it's just a Hello World app. It works on Windows (trivial case). Now I would like to see it work on a Mac. This is what Avalonia is supposed to do. – Jan 18 '21 at 15:09
-
You mean a console app? Or ASP.NET perhaps? Or something else? There are lots of types of .NET application. (P.S. `.NET Core 5` doesn't exist... .NET Core went up to 3, then they renamed the next version just `.NET 5`.) – ADyson Jan 18 '21 at 15:11
-
Anyway if you're not going to tell us anything about the app, or how you've compiled, deployed or executed it, then we can't really help you. Details are important in programming. P.S. Did you google the error? https://stackoverflow.com/questions/12226676/the-module-was-expected-to-contain-an-assembly-manifest (and a few others) could potentially be relevant. e.g. issues about x86 vs x64, that kind of thing. You'll have to figure it out, since you've provided no useful info in your question. or you can edit the question with some more relevant info. We can't x-ray into your computer. – ADyson Jan 18 '21 at 15:13
-
P.S. As you're new to StackOverflow (welcome!) I suggest you take the [tour](https://stackoverflow.com/tour) which you were recommended to do when you signed up for StackOverflow (but I can see from your profile that you haven't) and read the [How To Ask](https://stackoverflow.com/help/how-to-ask) guide. That way you'll have a better idea of what a good question looks like, and then you can update yours to improve its quality, and therefore improve your chances of getting an answer. These resources are here to help you have a good experience on StackOverflow, so please use them. Thanks. – ADyson Jan 18 '21 at 15:14
-
dotnet --version = 5.0.102 – Jan 18 '21 at 15:14
-
I assume you're being sarcastic. Well what else do you want me to say? You haven't given any useful info, so we can't diagnose your problem. I've tried to encourage you to post more useful info, and do more background research. What other help did you expect as this stage? Your question is the equivalent of asking a mechanic to fix your car without looking at it. – ADyson Jan 18 '21 at 15:18