I have searched through the forums for an answer but nothing is working and im at a road block. I made a basic MVC application with the default template, added a .mdf database file (basic database with information on students and courses). i added the ADO.NET Entity model with the basic classes for each table in the database. Then i added a controller to just display each item in the database. Now when i run the program for the first time, everything works great and all items are listed. If i close the site and rebuild i got fail to access paths errors, along with fail to delete file errors from certain paths. If i sign out, sign in, delete the obj and bin folder from the projects location, open visual studio community 2017, and rebuild again, it works the first time. Then its the same issues with the same errors. The database was created using visual studio. I figured it was a project thing so i started a new project, deleted all the old files except the .mdf file and no matter which project i use, even a brand new one, it only compiles properly 1 time. I have tried running as admin, following what i can on this site but nothing seems to work and its absolutely frustrating me. Im on an admin account so that cant be the issue. the errors im getting are as follows :

> 
> "C:\Users\Austin\source\repos\StudentRegistrationSystem\packages\Microsoft.Net.Compilers.2.1.0\tools\System.Collections.Immutable.dll"
>  to "bin\roslyn\System.Collections.Immutable.dll". Access to the path
>  'bin\roslyn\System.Collections.Immutable.dll' is
>  denied. StudentRegistrationSystem Error Unable to copy file
>  "C:\Users\Austin\source\repos\StudentRegistrationSystem\packages\Microsoft.Net.Compilers.2.1.0\tools\System.Diagnostics.FileVersionInfo.dll"
>  to "bin\roslyn\System.Diagnostics.FileVersionInfo.dll". Access to the
>  path 'bin\roslyn\System.Diagnostics.FileVersionInfo.dll' is
>  denied. StudentRegistrationSystem Warning Unable to delete file
>  "C:\Users\Austin\source\repos\StudentRegistrationSystem\StudentRegistrationSystem\bin\roslyn\VBCSCompiler.exe".
>  Access to the path
>  'C:\Users\Austin\source\repos\StudentRegistrationSystem\StudentRegistrationSystem\bin\roslyn\VBCSCompiler.exe'
>  is denied. StudentRegistrationSystem Warning Unable to delete file
>  "C:\Users\Austin\source\repos\StudentRegistrationSystem\StudentRegistrationSystem\bin\roslyn\System.IO.Compression.dll".
>  Access to the path
>  'C:\Users\Austin\source\repos\StudentRegistrationSystem\StudentRegistrationSystem\bin\roslyn\System.IO.Compression.dll'
>  is denied. StudentRegistrationSystem Warning Unable to delete file
>  "C:\Users\Austin\source\repos\StudentRegistrationSystem\StudentRegistrationSystem\bin\roslyn\Microsoft.DiaSymReader.Native.amd64.dll".
>  Access to the path
>  'C:\Users\Austin\source\repos\StudentRegistrationSystem\StudentRegistrationSystem\bin\roslyn\Microsoft.DiaSymReader.Native.amd64.dll'
>  is denied. StudentRegistrationSystem Warning Unable to delete file
>  "C:\Users\Austin\source\repos\StudentRegistrationSystem\StudentRegistrationSystem\bin\roslyn\Microsoft.CodeAnalysis.VisualBasic.dll".
>  Access to the path
>  'C:\Users\Austin\source\repos\StudentRegistrationSystem\StudentRegistrationSystem\bin\roslyn\Microsoft.CodeAnalysis.VisualBasic.dll'
>  is denied. StudentRegistrationSystem Warning Unable to delete file
>  "C:\Users\Austin\source\repos\StudentRegistrationSystem\StudentRegistrationSystem\bin\roslyn\Microsoft.CodeAnalysis.dll".
>  Access to the path
>  'C:\Users\Austin\source\repos\StudentRegistrationSystem\StudentRegistrationSystem\bin\roslyn\Microsoft.CodeAnalysis.dll'
>  is denied. StudentRegistrationSystem Error Unable to copy file
>  "C:\Users\Austin\source\repos\StudentRegistrationSystem\packages\Microsoft.Net.Compilers.2.1.0\tools\System.ValueTuple.dll"
>  to "bin\roslyn\System.ValueTuple.dll". Access to the path
>  'bin\roslyn\System.ValueTuple.dll' is
>  denied. StudentRegistrationSystem Warning Unable to delete file
>  "C:\Users\Austin\source\repos\StudentRegistrationSystem\StudentRegistrationSystem\bin\roslyn\Microsoft.CodeAnalysis.CSharp.dll".
>  Access to the path
>  'C:\Users\Austin\source\repos\StudentRegistrationSystem\StudentRegistrationSystem\bin\roslyn\Microsoft.CodeAnalysis.CSharp.dll'
>  is denied. StudentRegistrationSystem Error Unable to copy file
>  "C:\Users\Austin\source\repos\StudentRegistrationSystem\packages\Microsoft.Net.Compilers.2.1.0\tools\System.Security.Cryptography.Primitives.dll"
>  to "bin\roslyn\System.Security.Cryptography.Primitives.dll". Access to
>  the path 'bin\roslyn\System.Security.Cryptography.Primitives.dll' is
>  denied. StudentRegistrationSystem Error Unable to copy file
>  "C:\Users\Austin\source\repos\StudentRegistrationSystem\packages\Microsoft.Net.Compilers.2.1.0\tools\System.Security.Cryptography.Algorithms.dll"
>  to "bin\roslyn\System.Security.Cryptography.Algorithms.dll". Access to
>  the path 'bin\roslyn\System.Security.Cryptography.Algorithms.dll' is
>  denied. StudentRegistrationSystem Error Unable to copy file
>  "C:\Users\Austin\source\repos\StudentRegistrationSystem\packages\Microsoft.Net.Compilers.2.1.0\tools\System.IO.FileSystem.Primitives.dll"
>  to "bin\roslyn\System.IO.FileSystem.Primitives.dll". Access to the
>  path 'bin\roslyn\System.IO.FileSystem.Primitives.dll' is
>  denied. StudentRegistrationSystem Error Unable to copy file
>  "C:\Users\Austin\source\repos\StudentRegistrationSystem\packages\Microsoft.Net.Compilers.2.1.0\tools\System.Reflection.Metadata.dll"
>  to "bin\roslyn\System.Reflection.Metadata.dll". Access to the path
>  'bin\roslyn\System.Reflection.Metadata.dll' is
>  denied. StudentRegistrationSystem Error Unable to copy file
>  "C:\Users\Austin\source\repos\StudentRegistrationSystem\packages\Microsoft.Net.Compilers.2.1.0\tools\System.IO.FileSystem.dll"
>  to "bin\roslyn\System.IO.FileSystem.dll". Access to the path
>  'bin\roslyn\System.IO.FileSystem.dll' is
>  denied. StudentRegistrationSystem
> 
> 
> 

Its hard to explain the problem in its entirety and i will answer any questions anyone has. It is just really frustrating and im unsure of whether its coming down to my version of Visual Studio Community 2017.

I have the most recent visual studio community 2017. The error seems to persist even on a fresh project with a fresh database. 

**UPDATE**
Just built a whole new project, whole new sql server database, put a table with 1 entry in it, added the ADO.NET entity model for my test database with one entry, added the controller with the auto generated view to list all items in database, and again worked first time, after rebuild gave me same errors..