How to install C# in Mac OSX - c#

can somebody pls tell me how to install C# in Mac OSX 10.6?

You can try something like Mono.

Since Visual Studio 2017, Microsoft now offers support for Mac OS. Developers can get the community edition for free which comes with the option to install C# and the .NET framework. However, the .NET framework appears to be limited at this time of writing to version 2.1 on Mac OS.
Aside, I understand this version also includes support for iOS, Android, and Unity.
... not to be confused with the lightweight Visual Studio Code.

You can use Homebrew to install the latest version of .NET using the dotnet cask:
brew install --cask dotnet
See https://stackoverflow.com/a/57880964/1110395 for installing specific versions with Homebrew.
Manual installers can be downloaded from https://dotnet.microsoft.com/download

Related

NRefactory capable of parsing .NET 4.6?

I have been successfully using NRefactory and just started having problems parsing source code that uses some newer .NET features. One feature in particular that I have noticed is string interpolation. When NRefactory sees something like $"File: {myFile}" it has total failure parsing it.
Is there a new version of the code that will handle dot-NET 4.6 or is there a flag that I need to set? If not, is there another easy way to get parse trees from source code?
If I wanted to use Roslyn, is there a way to do this with VS 2015 or is VS 2017 or later required? Tried opening Roslyn SLN in VS 2015 and none of the projects loaded.
NRefactory does not support C# 6 or newer features, which would impact string interpolation. According to NRefactory,
There is currently no maintainer for NRefactory. If you need a C#
parser / compiler frontend, use Microsoft.CodeAnalysis (Roslyn)
instead.
The refactorings in NRefactory have been ported to Roslyn:
https://github.com/icsharpcode/RefactoringEssentials/
You can use Roslyn with Visual Studio 2015, as long as you have .NET 4.6 or higher installed, though 4.7.2 is the recommended version to use by Roslyn team. Lastly, you will need to the following:
Install Universal Windows App Development Tools -> Tools (1.1.1) and
Windows SDK, Windows 8.1 and Windows Phone 8.0/8.1 tools -> Tools and
Windows SDKs and Visual Studio Extensibility Tools

Visual Studio 2010 in Visual Studio 2017

So i'm doing this project for my Computer Programming Class (That's due tomorrow) and i'm basically done with everything. Our school has Visual Studio 2010, and I have Visual Studio 2017. However, when I open it, it asks me to change to ".NET Framework 4.6.1" as my computer doesn't have ".Net Framework =v4.0". When I do, I can edit the program, but I can't debug/compile the program, as it outputs this error:
The reference assemblies for framework ".NETFramework,Version=v4.6.1" were not found. To resolve this, instal the SDK or Targeting Pack for this framework version... Therefore your assembly may not be correctly trageted for the framework you intend.
However, when I tried to go online and install the v4.6.1, the installer said that I had already had a version of 4.6.1 or a more updated version on my computer. I don't understand why this is, and if there's another question like this it would be helpful if you could link it as a reply. Thanks.
The answer to your problem is directly in the error message. "To resolve this, instal the SDK or Targeting Pack for this framework version."
My advice: Download and install .NET 4.0 SDK on your computer.
You can try one of these links to get the SDK:
https://www.microsoft.com/en-us/download/details.aspx?id=8279
https://www.microsoft.com/en-us/download/details.aspx?id=8442
You can also try the multi-targeting pack.
https://www.microsoft.com/en-us/download/details.aspx?id=29052
Also, checkout:
You can use the setup verification tool to diagnose your .Net Framework here: .Net Framework Setup Verification Tool or Alternative Download.
Also check the .NET Framework Setup Verification Tool User’s Guide
If you do find problems with your .Net Framework, you can use the Repair Tool to fix it, it is designed to fix issues specifically concerning the .Net Framework as well as updates: Microsoft .NET Framework Repair Tool
Hope this will be useful, good luck.
For VS2017 to support .NET 4.0, you need to make sure you've installed the correct component:

System.core dll can not be referenced

I am trying to solve Dlls reference problem in Visual studio 2012. All dlls have set them self in a way they are looking for .net 4.0 version while I can not install because i have already .Net 4.5 installed with Visual studio 2012.I have asked this Question
but I didnt get a proper answer.Now I am trying to reference System.Core in 4.5 but it can not be referenced as visual studio is not allowing me to do, it says it will be referenced automatically during project build but actually it does not.I am in catch 22 situation.Kindly advise.
I have reinstalled Visual studio 2012 but it didn't help.
Zara, I've looked at the download link you provided and it appears to me it's only for Windows8. Windows7 and Windows8 are very different in how they handle things I personally wouldn't dream of trying to install such an SDK on my Windows7 machine.
My suggestion to you is therefore to try to uninstall the SDK and then it might work again. If this SDK only works for Windows8 then there is no use having it installed on your Windows7 machine. Windows7 is good at keeping backups of all files it replaces when installing SDKs and other things so uninstalling the SDK might restore it to what it was before and it might be just fine after that.
If this doesn't make any difference then I would suggest reinstalling .Net 4.5 AFTER uninstalling the Win8 SDK.

Sharp develop in ubuntu

Is it possible to compile C# in ubuntu using sharpdevelop?
I am searching for an alternative for monodevelop
Nope, you'll need to use MonoDevelop. SharpDevelop is Windows-only and not supported on Ubuntu.
But you can help with the MonoDevelop project to make it better.
As far as I know SharpDevelop is using a lot of win32 calls, this is why is not 100% percent a .net application and runs only on windows.
It would be possible to run under wine, the information on WineHQ AppDb is very old about it.
I had try with wine debian version 1.0.1-3.5 and it was not possible to install dotnet40 using winetricks, when try to install the msi installer for SharpDevelop it fails with the message that "This setup requires the .NET 4.0 Full Framework to be installed"
I'll try using a newer version of wine and comment here what happend.
OT: MonoDevelop is a great solution, it could be even better if has one competitor in the Linux environment.

Install (activate) .NET 3.0 Framework with an application in Vista

if i have an application that requires .net 3.0, what is the proper way to make an install file out of it, that will install the application and then install (activate) the .net 3.0? i tried publishing my project through visual studio 2008 (c#) which created the installer and the .net activator, but it didn't work properly on computers other than my own, when the .net 3.0 was not present.
i though i could bundle http://www.microsoft.com/downloads/details.aspx?FamilyID=10CC340B-F857-4A14-83F5-25634C3BF043&displaylang=en with the application, which would download and install .net 3.0 if needed. this could work ok on non-vista systems, but on vista, the redist package reports an error: you must use turn windows features on or off in the control panel to install or configure microsoft .net framework 3.0
The key is to install the .net framework if it is not there - regardless of the OS. Also, just go ahead and install the .Net 3.5 framework if you are going to install one of them.
Anyway, if you are using the built in installer that comes with Visual Studio, this is a real pain in the butt. You would be better off, and saner if you went with a different installer package. Install Shield, Wise, InstallAware will all do it for you. I believe you can also find better guidance on how to do this with Wix and NullSoft Installer.
http://www.improve.dk/blog/2007/06/10/creating-a-dotnet-bootstrapped-installer-using-nsis
How can I detect .NET 3.5 in WiX?
Windows Vista has already .NET Framework 3.0 installed.
Now if you wanted for example to have .NET Framework 3.5 installed you could create a Setup Project and then right click and go to View->Launch Conditions. There will be a .NET Framework launch condition where you can specify the required version of the framework and an URL to download from.
Here's a post about Launch Conditions in a Setup Project.

Categories