4
votes

I'm trying to build a .NET Core application that I created on Visual Studio 2017 on Windows on Visual Studio 2017 for Mac.

I've run a 'dotnet restore' which seems to complete correctly. However, when I build, I get the following:

/usr/local/share/dotnet/sdk/1.0.1/Sdks/Microsoft.NET.Sdk/build/Microsoft.PackageDependencyResolution.targets(154,5): error : Assets file '.../obj/project.assets.json' not found. Run a NuGet package restore to generate this file. [.../TME.PatternLibrary.csproj]

And several error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?)

How can I build the .NET Core project on Mac OS X?

1
Please make sure you have proper .net core version on OSX (even beta). VS 2017 uses new project type where json files are replaced with xprojfiles.pwas
I have the following - Microsoft .NET Core Shared Framework Host Version : 1.1.0 Build : 928f77c4bc3f49d892459992fb6e1d5542cb5e86Jamie Gilbert
Run dotnet.exe --version on OSX.pwas
dotnet --version = 1.0.1Jamie Gilbert
It looks like your mac isn't registering you have .Net core 1.1.0 installed if your output from dotnet --version is 1.0.1. This will most likely be the issue. have you downloaded and manually installed .net core 1.1.0 ? microsoft.com/net/core#macosBigTallJosh

1 Answers

4
votes

It looks like your Mac isn't registering that you have .NET Core 1.1.0 installed if your output from dotnet --version is 1.0.1. This will most likely be the issue. If you download and manually install .NET Core 1.1.0, this should solve your problem.

You can download it from here.