Asp.Net Core RC2 Error "Failed to make the following project runnable"
See original GitHub issueSteps 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:
- Created 7 years ago
- Reactions:3
- Comments:24 (4 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
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%" ] }