I need a way to cross compile a short piece of .NET C# code to a dll, which will then run a client's Windows environment.
- There is a much easier way to compile and run C++ code, no configuration needed: Install the Code Runner Extension; Open your C++ code file in Text Editor, then use shortcut Ctrl+Alt+N, or press F1 and then select/type Run Code, or right click the Text Editor and then click Run Code in context menu, the code will be compiled and run, and the output will be shown in the Output Window.
- So far, you can't. Visual Studio for Mac looks like a rebranded Xamarin Studio, acquired by Microsoft recently, which supports.Net development, with C# (and F#?) only.
As far as I can tell (which isn't very far, since I'm a total novice at C++), this was created with MS Visual C++ or similar. I'd be most grateful for answers that address the general case of compiling Visual C++ programs on Mac OS X or Linux, and that also address the specific challenge above.
I run OS X 10.9.2 on an iMac.
Does anyone know what tools allow this?
I would rather not install Parallels and Windows if I can find a way to cross compile this without needing that heavy of an installation of Microsoft tools.
bmike♦6 Answers
Check out the Mono Project. It may be what you are looking for.
MonoDevelop is a cross-platform IDE primarily designed for C# and other .NET languages. MonoDevelop enables developers to quickly write desktop and ASP.NET Web applications on Linux, Windows and Mac OSX. MonoDevelop makes it easy for developers to port .NET applications created with Visual Studio to Linux and Mac OSX maintaining a single code base for all platforms.
RuskesIf you have a Mac you can compile C# like this:
Compile: mcs fileName.cs
Run: mono fileName.exe
If you don't have Mono installed on your Mac, you can google it and install it and then you will be good to go. You don't need Windows to do this.
user3439894Visual C++ For Mac
You can install it with homebrew:
Then you can use it with:
DorianDorianNo personal experience with this IDE but this looks like it will work:http://monodevelop.com
You may now want to look into the following
Xamarinhttps://www.xamarin.com/
Visual Studio for Machttps://www.visualstudio.com/vs/visual-studio-mac/
Can I compile .NET C# code on my Mac?
You can compile C# code yes.
I would rather not install Parallels and Windows if I can find a way to cross compile this without needing that heavy of an installation of Microsoft tools.
Visual Studio For Mac
Mono does not have 100% compatibility with the .NET implementation.
The Common Language Infrastructure (CLI) is a framework for executing managed code. The CLI consists of several parts including a Virtual Execution System (VES). .NET's VES is the Common language Runtime. Mono has it's own separate VES implementation.
C++ Visual Studio For Mac
In other words, at the very least do not expect to run code that has only been tested in a *nix/OSX environment to run without testing it on a windows environment.
You must log in to answer this question.
Not the answer you're looking for? Browse other questions tagged imacwindows .
Develop apps and games for iOS, Android,
and web using .NET
Code in C#, F#, Razor, HTML5, CSS, JavaScript, TypeScript, XAML, and XML
With the power of Roslyn, Visual Studio for Mac brings IntelliSense to your fingertips. IntelliSense describes APIs as you type and uses auto-completion to increase the speed and accuracy of how you write code.
Quick Info tool tips let you inspect API definitions, squiggly lines in the editor highlight issues, in real time as you type.
This XAML code creates a basic layout containing Label, Entry (text box), and Button controls. The control names (specified with x:Name) will be used to refer to the controls in code. Replace the generated C# code with the following. Xamarin studio for mac. The Clicked= attribute on the Button element wires up the button click event to a handler called SayHelloButton_OnClicked, which doesn't exist yet (but it's about to!) Open up the code-behind for the XAML file by expanding it in the Solution Explorer and double-clicking on the HelloWorldPage.xaml.cs file.
Use the Visual Studio debugger to quickly find and fix bugs across languages.
The Visual Studio for Mac debugger lets you step inside your code by setting Breakpoints, Step Over statements, Step Into and Out of functions, and inspect the current state of the code stack through powerful visualizations.
As your project grows, chances are, you'll find yourself restructuring and refactoring code that you or someone else wrote earlier. That's a whole lot easier when Visual Studio for Mac takes care of the heavy lifting for you.
The Visual Studio for Mac editor supports powerful built-in refactoring options such as Extract Method and Rename, accessible via the Quick Actions menu.
Manage your code in Git or SVN repos hosted by any provider, including GitHub and Azure DevOps. Review diffs, stage files, and make commits from inside Visual Studio for Mac.
Choose the development environment that is right for you. With Visual Studio on both macOS and Windows, you can share your C# and F# projects seamlessly with your team using either OS.
FEATURES | Visual Studio 2019 for Mac | Visual Studio 2019 |
---|---|---|
Web and cloud development using C# | ||
ASP.NET Core and .NET Core | ||
Publish to Azure | ||
Azure Functions | ||
Azure Connected Services | ||
Docker container tools | ||
Desktop development | ||
WPF and Windows Forms | ||
UWP | ||
Mac Apps using Xamarin and C# | ||
Console apps with C# | ||
Desktop apps using C++ | ||
Mobile and gaming | ||
Mobile development with .NET using Xamarin and C# | ||
Game development using Unity and C# | ||
Mobile and game development using C++ | ||
Other workloads and tools | ||
Java | ||
Python | ||
SQL Server data tools | ||
Node.js | ||
Unit testing | ||
Version control with Git |
Create cross-platform apps targeting Android and iOS using Xamarin
Build, manage, and deploy cloud apps that scale to Azure
Create and debug cross platform games and 3D real time applications with Unity
Introducing Visual Studio for Mac.; 4 minutes to read Contributors. All; In this article. Visual Studio for Mac is a modern, sophisticated IDE with many features to. Visual Studio for Mac enables the creation of.NET Core solutions, providing the back-end services to your client solutions. Code, debug, and test these cloud services simultaneously with your client solutions for increased productivity. Visual studio c# for mac. May 07, 2018.NET Core 2.1 RC and C# 7.2. Visual Studio for Mac version 7.5 now supports.NET Core 2.1 RC. Major improvements include faster build performance, better compatibility with.NET Framework, and closing gaps in both ASP.NET Core and EF Core.
Customers using Xamarin with Visual Studio for Mac
Visual Studio Community For Mac
Launch a professional environment tailored to the Mac, free for most non-enterprise users