c# - Visual Studio gone bonkers: 'The directory name is invalid' error when trying to compile -


For some very strange reason, my visual studio 2008, when trying to compile the C # project, Executable in executable directory with the same name, at least it seems that error message means. After compiling on any of my projects, CSC.exe reports the following compiler error:

Output file 'D: \ Projects \ Examples \ StringBinder WeastString \ Ob \ Release \ StringBuilderVsString.exe '-' The name of the directory is invalid '

When I obj \ release or obj \ debug Looks like all intermediate resources, like stringbilder VsString.pdb are written correctly in that directory. There is no place in the directory or there is an error when running csc.exe from the command prompt.

When running the Process Monitor, I see success only for the files accessed by csc.exe and I do not see any query or written form in those places that does not exist

< P> Any thoughts are welcome to face it.

Resolve! Thanks for the input, I found a solution in between because it is rare, but it can happen to others, so I decided to answer my own question here:

Reasons

< P> An incorrect or inaccessible % TEMP% location, or inaccessible % USERPROFILE% path.

I had transferred to these SSD drives fast to compile these paths. The drive crashed and the OS was no longer found (as reported) and as a result, the moved space (internet cache, my documents and temp) had become inaccessible.

The error mentioned by Visual Studio is misleading: There is nothing to do with the name of the file (even though I'm still wondering why it was asking for executable as a directory), Error% TEMP% location is bad. Fix

solution

% USERPROFILE% or % TEMP% environment variable, (if you forgot, It's here: system> advanced> environment variable ).

Note: Use the USERPROFILE environment variable as the default and default TEMP setting, default % USERPROFILE% \ AppData \ Local \ Temp . This works, but only if the registry is not the key REG_EXPAND_SZ and REG_SZ under HKCU \ Environment \ TEMP .


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -