How can I stop ASP.net from marking .dll's rea

2019-09-09 09:28发布

问题:

I asked a similar question here but would like to narrow it down since I've figured workarounds for all but two .dll files in the bin folder.

Problem:

Every time I rebuild or debug, the project throws an error because those two dll's are read only.

In file explorer I go to that folder and remove the read only flag and all is well UNTIL the next time I rebuild. They're set to read only again. I've been going in and un-checking read only every freaking time I rebuild and it's become a real pain.

Please tell me there's a way around this.

I'm using .net Core RC2 with VS Pro 2015 Update 3 RC (version 14.0.25402.00)

I have a class library in my project with references to these two dll's (they are not referenced directly in my project)

and a reference to that class library in my solution's /src/(proj_name)/References/.NET Framework 4.6.1 directory.

And, those two dll's from the class library are replicated in my project's /bin/Debug/net461/win7-x64 directory

The project is checked into TFS, which I suspect is why the files are being marked read only HOWEVER, they do not show up in Source Control Explorer (they shouldn't, right? It's a dll in the bin) and I'm wondering if they're in there anyway but hidden, since the folder is hidden in my project by default.

回答1:

It seems to be solved! A bit counter-intuitive but I checked the dll files out of source control (right click > "Check Out for Edit") from the project my project was referencing, which also unlocked the dll's being referenced behind the scenes in my main project. Smooth building so far!