aspnet / Tooling

Issue tracker and info on Visual Studio tooling for ASP.NET
Other
256 stars 124 forks source link

Error Failed to make the following project runnable is denied. #897

Closed jindovu closed 7 years ago

jindovu commented 7 years ago

Hi everyone, I got problem when I upgrade .net core 1.0.1 tool preview 2 and I don't know why It happened, please help me revsolve this problem
Thank you so much.

.NET Command Line Tools (1.0.0-preview2-003133)

Product Information:
 Version:            1.0.0-preview2-003133
 Commit SHA-1 hash:  74df06500c

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.14393
 OS Platform: Windows
 RID:         win10-x64
Error    Failed to make the following project runnable: 
TC.NVLDMS (.NETFramework,Version=v4.6.1) reason: Access to the path 'C:\Working\NVL DMS\Solution\TC.NVLDMS\Web\TC.NVLDMS\bin\Debug\net461\win7-x64\ExpressMapper.dll' is denied.    
TC.NVLDMS   C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Common.Targets  262 
mlorbetske commented 7 years ago

Hi @jindovu, could you try making sure that it's not virus scanning software locking the file (preventing it from being written to like in #713) please? There's also a discussion going on about this here https://github.com/dotnet/cli/issues/3419 with the CLI folks (a fix for this was added in https://github.com/dotnet/cli/pull/3794, but I'm not positive which CLI release this would be in) - @piotrpMSFT do you know?

AllanTouring commented 7 years ago

I just posted this in cli#3419. You can modify the project.json file to remove the readonly attribute from the bin directory. In the "scripts" section add: "precompile": [ "cmd /c echo Removing read-only attributes in %project:Directory%\\bin\\ as a workaround&& cmd /c attrib -r %project:Directory%\\bin\\* /s" ]

jindovu commented 7 years ago

I Fixed it in another way, I remove my source code in local folder and get latest source code from TFS on other folder it resolved for me, I think the problem occur when my application read file win7-x64\ExpressMapper.dll It can't read this file, Maybe the problem occur when I just setup antivirus before then I upgrade tool preview, anyway Thank you for your help.

mlorbetske commented 7 years ago

@jindovu glad to hear you got it working