1
votes

I am tring to run c# code from visual studio code on a mac OS , I have installed openSSL using homebrew, .netcore and then visual studio code. I am getting following error:

/usr/local/share/dotnet/sdk/1.0.4/Microsoft.Common.CurrentVersion.targets(1111,5): error MSB3644: The reference assemblies for framework ".NETFramework,Version=v4.5" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend. [/Users/swayans hupanda/Documents/ProgrammingFundamentals/Day1/HelloWorld/HelloWorld.csproj]

can anyone help?

2

2 Answers

0
votes

Check Project Properties--> Application--> Target Framework

0
votes

I have yet to use vs for mac, but it looks like the project is looking to use microsoft .net 4.5 and cannot find it.

If it is available for mac you could download and install the package.

Is there a reason you are targeting .net and not using xamarin? Change your target framework as Chetan said.

(i would have left this as a comment, but I don't have the rep)