I run Visual Studio on Mac for developing .NET Core. I have problems with file permissions.
When I for example use FluentFTP to download a file:
client.DownloadFile("/Users/max/temp/download_folder", "remote/path");
I get the following error:
Access to the path '/Users/max/temp/download_folder' is denied.
Note that I've also got this error using Path and Directory.
I've confirmed that the paths are OK. I've tested to set chmod 777 /Users/max/temp/. I've also tried to place the file at /var/tmp/, where full file access is default.
I get the feeling that Visual Studio is not run with sufficient permissions. In this thread a similar problem for Visual Studio Code is solved by setting sudo chown -R $(whoami) /Users/$(whoami)/.vscode, but I can't find any dotfiles for Visual Studio.
The problem was that I passed a directory path, while the method wanted a file name path. The exception message could've been more informative. Hope that this answer can help someone in the future.
Related
I got this error when I run vs2017 enterprise .
iisutil!ReadMultiStringParameterValueFromAnyService [helpfunc.cxx # 490]:Inetinfo: Failed reading registry value
Error(80070002): The system cannot find the file specified.
I googled for this error.but I find nothing to resolve my problem.
If I run the published project from is it's ok.but in visual studio, it has problem.
remove .vs folder from solution,and run vs as administrator ,then change port number in vs nothing happend.
-remove and reinstall IIS and VisualStudio
,nothing happened to solve my problem.
plz Help me.
Tnx..
Visual Studio 2013 C# ASP.NET MVC problem EntityFramework.6.1.2-beta1\tools\init.ps1 cannot be loaded because its execution is blocked by software restriction policies. For more information, contact your system administrator.
When I try to use the Enable-Migrations: I get the message below:
The term 'Enable-Migrations' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spe
lling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:18
+ Enable-Migrations <<<<
+ CategoryInfo : ObjectNotFound: (Enable-Migrations:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
I have the above Issue, and I tried all sorts of solutions for it, but none of them helped
Things that I have already done:
removed all nuget extention and installed it Again (Didn't Work)
Removed Entity Framework and reinstalled it again (Didn't Work)
closed my visual studio 2013 and reopened the file (Didn't Work)
Opened visual studio using Administrator (Didn't Work)
Deleted the whole package brought package from a different project (Didn't Work)
I even tried some power shell commands, still does not work.
I found the solution to my problem.
The reason was that, my user-profile was somehow blocking me from running the init.ps1 file of EntityFramework.
I created a new user profile, with admin rights, and Ran Visual Studio on that profile, and now the EntityFramework, works perfectly.
Incase if you have the same problem, try the above, stuff that I have already tried, and if none of them work, then try this..
Good Luck
Another way is to set the executions policies locally.
To do this, enter this command in the PS first:
Set-ExecutionPolicy RemoteSigned
See this link for more details: https://technet.microsoft.com/en-us/library/hh849812.aspx
Remove file inside
control=>internet option => content => certificates =>Untrusted publishers
then problem will gone in my case
In Visual C# Express, when I try to Build Solution, I get the following message:
"The command "copy C:\Program Files.....\vaultforms.dll C:\Documents and Settings\All Users \Application Data......\Vault2012\Extensions\"" exited with code 9009.
(I have only shown part of the paths here but it should be enough to explain the issue)
How can I avoid this error?
Check out some other "Exited with Code 9009" errors?
What does "exited with code 9009" mean during this build?
http://support.microsoft.com/kb/908268
Check Path in Environment variable, some basics path information may be missing like visual studio installed path.
I've created an empty VSTO solution with an Excel 2007 Project. When I build the solution I get this error:
Error 1 An error occurred while
attempting to persist the data. The
message returned is: Could not find
the add-in deployment cache file,
"C:\Program Files\Common
Files\Microsoft
Shared\VSTA\Pipeline\PipelineSegments.store".
Please run AddInStore.Update or
Rebuild (or run AddInUtil.exe on the
command line). Also, ensure your code
has permission to read this file.
I've googled to no avail. Any ideas?
Thanks
Following these steps fixed it:
http://social.msdn.microsoft.com/forums/en-US/vsto/thread/ccccfd29-ce29-4aaa-8d89-56c88a1a8dd4
I'm still trying to run my easyhook exercize. right now, i get this error:
System.ApplicationException: Unable to install assembly in the GAC. This usually indicates either an invalid assembly path or you are not admin.
at EasyHook.NativeAPI.GacInstallAssembly(IntPtr InContext, String InAssemblyPath, String InDescription, String InUniqueID)
at EasyHook.Config.Register(String InDescription, String[] InUserAssemblies)
at HookTest.Program.Main()
and the problem seems to originate here:
Config.Register(
"Easy hook test",
"Hook Test.vshost.exe",
"TestInject.dll");
The solution I'm trying to build is composed by two projects, a library and an application. Once I build the solution, i copy testinject.dll to the hooktest debug folder, and then I run it in debug mode.
Maybe I should use an absolute path to indicate where testinject.dll is? or add the library somewhere?
UPDATE 1
"Easy hook test",
#"Hook Test.vshost.exe",
#"I:\Documents and Settings\foo\Desktop\Hook Test\TestInject\bin\Debug\TestInject.dll");
Even with this change, I get the same error
Try changing the target framework from 4.0 to 3.5, that should do the trick.
This usually indicates either an invalid assembly path or you are not admin.
That's as good an error message as you can expect. The path could be wrong because you don't specify the full path of the assembly (i.e. c:\mumble\foo.dll). You commonly don't have admin rights because of UAC. Use a manifest to get the privilege elevation or run Visual Studio in admin mode (change the desktop shortcut).
Even though you yourself are an Admin, it does not mean that apps that you run will be elevated to admin. In fact, VS 2010 will NOT be, nor will most others. You actually have to right-click "Run as Admin...". I actually set my VS start menu shortcut's properties to "Run as Administrator" so that I never forget, as I was burned on this too.