So I've decided to give it a go and try visual studio code and c# development on my mac.
The setup is annoying, but I can live with that. Now I'm running into 2 specific issues that prevent me from even getting through the HelloWorld steps...
1) I used yo aspnet to create the project from the given templates. It then tells you to run dnu restore which works fine, for the most part until I run into the following issue:
Installing Microsoft.Extensions.Configuration.UserSecrets.1.0.0-rc1-final System.UnauthorizedAccessException: Access to the path '/Users/lostballoon/.dnx/packages/Microsoft.Extensions.Configuration.UserSecrets/1.0.0-rc1-final' is denied.
Why only this package? Why not the ones before this? And Why am I getting this?
I run into this same issue even when trying to restore the packages of an EmptyApplication:
Installing Microsoft.AspNet.IISPlatformHandler.1.0.0-rc1-final System.UnauthorizedAccessException: Access to the path '/Users/lostballoon/.dnx/packages/Microsoft.AspNet.IISPlatformHandler/1.0.0-rc1-final' is denied. at System.IO.UnixFileSystem.CreateDirectory(String fullPath) at System.IO.Directory.CreateDirectory(String path)
2) In VSCode, when choosing dnx: Run Command or dnx: Restore Packages I get a warning pop-up that says the following:
OmniSharp server is not running.
I have no clue what is wrong and how to get it working.
I ran into this same issue when installing things today. I got similar errors when it tried to install things to:
/Users/yourname/.dnx/packages/
What I did was open Terminal, change directory to /Users/yourname/, and then run (replacing "yourname" with your username):
sudo chown -R 'yourname' .dnx
That gives you ownership of that folder, so that you can then change directory to .dnx and create the 'packages' folder (mkdir packages within .dnx folder). Once I made that 'packages' folder I was able to then restore.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With