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.

Asp.Net Core RC2 Error "Failed to make the following project runnable"

See original GitHub issue

Steps to reproduce

I have a MVC project I have just upgraded to RC2 and is checked into version control. When I build the project with “dotnet build” I get an access denied error on the config file. If I checkout app.config (e.g. remove the read only flag) it will build successfully.

Expected behavior

Project should build.

Actual behavior

I get the error:

Failed to make the following project runnable: xxx (.NETFramework,Version=v4.6.1) reason: Access to the path ‘E:…\bin\Debug\net461\win7-x64\xxx.exe.config’ is denied.

Environment data

dotnet --info output: .NET Command Line Tools (1.0.0-preview1-002702)

Product Information: Version: 1.0.0-preview1-002702 Commit Sha: 6cde21225e

Runtime Environment: OS Name: Windows OS Version: 6.3.9600 OS Platform: Windows RID: win81-x64

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:3
  • Comments:24 (4 by maintainers)

github_iconTop GitHub Comments

8reactions
mafshincommented, Nov 21, 2016

I have the same issue. If a project references another project, the build path is computed relative and can’t find the binary file. Please provide a workaround.

Failed to make the following project runnable: XXXX (.NETFramework,Version=v4.6.1)

reason: Could not find a part of the path 'C:\Projects\YYYYYY\bin\Debug\log4net.dll'.	

C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Common.Targets	241	
4reactions
AllanTouringcommented, Dec 21, 2016

I followed the link provided in the fix by @Frisch12. There is a workaround to remove the read only attribute from offending file and directory in the project.json file. I modified this to remove read only from the whole bin directory as:

"scripts": { "precompile": [ "cmd /c echo Removing read-only attributes in %project:Directory%\\bin\\ as a workaround&& cmd /c attrib -r %project:Directory%\\bin\\* /s" ], "postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ] }

Read more comments on GitHub >

github_iconTop Results From Across the Web

Asp.Net Core 1.0 Error "Failed to make the following project ...
The DLL that it's trying to load is a third party library used in a library that the app (site) uses. Any idea...
Read more >
ASP.NET Core updates in .NET 6 Release Candidate 2
Once the app is done building, run it to see the rendered factorial value. Note: You may get a build error on subsequent...
Read more >
NETSDK1045: The current .NET SDK does not support ...
This error occurs when the build tools can't find the version of the .NET SDK that's needed to build a project. This is...
Read more >
Cannot debug net6.0-macos Apps - Developer Community
When I hit debug, the following error is shown in the Terminal: Possible reasons for this include: * You misspelled a built-in dotnet...
Read more >
Failed to make the following project runnable (Object ...
In my case the problem was that one of the class library projects in a solution was referencing an AspNetCore.Identity library by the...
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