question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

DOTNET_REFERENCE_ASSEMBLIES_PATH required when building on OS X?

See original GitHub issue

I downloaded the .net core bits tonight and got it installed on OS X 10.11. I then cloned down a .Net Core project I had created and been working on from within Visual Studio 2015. When I run dotnet build it fails with the error below.

Johnathons-MacBook-Pro:Lightmap.Core johnathonsullinger$ dotnet build
Compiling Lightmap.Core for .NETFramework,Version=v4.5.1
/Users/johnathonsullinger/Source/GitHub/Scionwest/Lightmap/Source/Lightmap/Lightmap.Core/project.json(10,15): error DOTNET1012: The reference assemblies directory was not specified. You can set the location using the DOTNET_REFERENCE_ASSEMBLIES_PATH environment variable.

Compilation failed.
    0 Warning(s)
    1 Error(s)

Time elapsed 00:00:00.0201664

It looks like it’s related to the 4.5.1 framework; am I wrong in assuming that dotnet build knows that it can compile the dotnet5.4 framework and ignore the 4.5.1 framework?

This is my project.json

{
    "version": "1.0.0-*",
    "description": "Lightmap.Core Class Library",
    "authors": [ "johna" ],
    "tags": [ "" ],
    "projectUrl": "",
    "licenseUrl": "",

    "frameworks": {
        "net451": { },
        "dotnet5.4": {
        "dependencies": {
            "Microsoft.CSharp": "4.0.1-beta-23516",
            "System.Collections": "4.0.11-beta-23516",
            "System.Linq": "4.0.1-beta-23516",
            "System.Runtime": "4.0.21-beta-23516",
            "System.Threading": "4.0.11-beta-23516"
        }
        }
    }
    }

This can be reproduced by cloning my project and running dotnet build within the Lightmap.Core directory.

Is there a path I am supposed to add to my bash_profile, and if so what goes into that path?

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
the404commented, Sep 14, 2016

you juest remove net451 from frameworks section in package.json and dotnet build ,and dotnet run or publish,then it will be ok.

0reactions
scionwestcommented, Jan 29, 2016

@davidfowl yeah OS X, thanks! I’ll get those installed.

It would be awesome if you guys do end up shipping reference assemblies as packages. I’d like to remove my dependency on Mono altogether. They do a lot of good work but lag behind to much.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to dotnet build and Target net4x on macOS - Stuart Lang
How to dotnet build and Target net4x on macOS. UPDATE: These methods are no longer required. There is a better way I've written...
Read more >
Reference assemblies
Learn about reference assemblies, a special type of assemblies in .NET that contain only the library's public API surface.
Read more >
.net - mac/linux `dotnet build` The reference assemblies for ...
The dotnet build will give an error about missing targeting pack. msbuild will work instead, but i'd prefer to use dotnet build ....
Read more >
NETFramework not found in macOS · Issue #3063
Issue Description. I get this message in the output of VSCode. [fail]: OmniSharp.MSBuild.ProjectLoader The reference assemblies for framework ".
Read more >
The reference assemblies for .NETFramework,Version=v5. ...
Hi, I'm seeing the following on Rider Mac (2020.3.4 Build RD-203.7717.10) on an ASP.Net Core project targeting SDK 5. "The reference...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found