I had the same problem when installing my application on the server when everything worked perfectly on localhost.
None of these solutions woorked, I always had the same error:
Could not find a part of the path 'C:\inetpub\wwwroot\myApp\bin\roslyn\csc.exe'
I ended up doing this:
- on my setup project, right clic, view > file system
- create a
bin/roslyn
folder - select add > files and add all files from
packages\Microsoft.Net.Compilers.1.3.2\tools
This solved my problem.