Visual Studio 2013 Not Opening *.cshtml files - razor

I cannot figure out why Visual Studio is not opening CSHTML files. The error message I get this:
The document cannot be opened. It has been renamed, deleted or moved.
The file exists. I can change the extension to .html and open the file no problem. If I change the extension back to .cshtml with the file still open it lets me modify it. If I close the file and try to open it again I get the above message. Every other file type will open except .cshtml. Any help would be GREATLY appreciated!!
**** UPDATE ****
Figured out that it has something to do with the HTML Editor used by default for .cshtml files. If I right click, open with... and select a different editor, it will open but I lose all intellisense and it doesn't recognize any of the razor syntax. Installing Update 4 for VS 2013 to see if that works.

Just Install Visual Studio 2013 Update 5, this will solve the problem

According to your try, it seems the Application (VS 2013) haven't granted necessary file operation permission on disk (this could be related to IDE files or project files). This could occur by a corrupted operating system.
Solution:
Check Directory permission manually OR Try to reinstall OS and then VS (reinstalling the VS itself doesn't take effect in many cases).

I had installed Xamarin studio and Xamarin for visual studio. Once I uninstalled Xamarin, the problem was solved!
Another thing I tried before removing Xamarin was I right click on .cshtml file and choose "Open with..." and then select "Source Code (Text) Editor". For me in this case i had intellisense.
Hope this helps a friend.

Related

HelpNDoc : Problem to generate CHM format help - Error HHC5010

I would like to generate a CHM help file with HelpNDoc.
But I get an error message:
HHC5010: Error: Cannot open "c:\users\philippeDocuments\HelpNDoc\Output\chm\creabook.chm". Compilation stopped.
I tried to create the CHM folder myself, in the "Output" folder but no result.
I'm running Ubuntu 22.04.1 LTS and using Wine as a Windows emulator.
Maybe it's an authorization issue?
What is surprising is that I was able to generate the Word and html documentation.
Is someone can help me ?
I do not use Ubuntu or Wine as an environment and would like to recommend a machine with Windows for compiling CHM help files.
Despite the close connection of CHM help files with the Windows operating system, I do not want to completely exclude the possibility of compiling in a Wine environment.
My good old compiler Error Message Reference shows the following:
HHC5010: Cannot open ""file name"". Compilation stopped.
Problem: The specified file either doesn't exist, or another program has it open and is denying permission to read the file.
Result: The .chm file is corrupt and cannot be used.
Solution: If another program does have the file open, close the program. Otherwise either correct the name in your project file or remove it.
Please make sure that the CHM help file "c:\users\philippeDocuments\HelpNDoc\Output\chm\creabook.chm" is not open in Wine's HTML help viewer by using e.g. wine hh creabook.chm.
Please also try if you can open another CHM help file in your environment. Maybe you have to specify a windows path, e.g.
wine hh.exe `winepatch -w /some/dir/somefile.chm`
As mentioned above, this is somewhat problematic outside of Windows.
See also some notes at Installing Microsoft HTML Workshop under Wine

Cannot start editting my Html file in Visual Studio Code

I create a file with html extension with visual studio code. I can create the file but I cannot edit it. Can you help me solve this issue
Try running Visual Studio Code as an administrator if you are using Windows.
Right Click Visual Studio Code > Run as Administrator, follow the instructions from then on.
You can also edit file permissions entering here:
Right Click File > Properties > Security tab
This should lead you to an User Selection screen, select your user and click Edit, see if the checkmarks for Write and Read are activated, activate them otherwise, click OK and restart Visual Studio Code, try to access the file then.
If you are using Linux, try changing the read and write permissions so that you can make modifications to the file. This is done through chmod. Use Bash (or the terminal emulator you are given for doing this).
Example:
chmod +rw <file_here>
That should be enough.
More description would be better...Don't understand " create a file with html extension". Try to create a .txt file and open it with vscode and see if you can edit it. If can, you can create another .txt file in your PC, change the suffix of the filename(.txt) to (.html) and then try to open it with vscode, check if you can edit it.
html extension with visual studio code it have a lot of problems, so you can create index.html by yourself. Example:
Open VS then press on File then click on new window.
You can save as this window in your project folder.
Don't forgot to save it with .html file type so browser and VS can read it.

SSIS file path changing to C:\windows\system32 depending on how I open the project file

I've been working with SSIS reading different files - from CSVs to XLSXs - with no problems. My paths are relative, so SSIS searches for the files from the project's folder.
Well, today my colleague tried to run a package and he got a curious error message saying that the file could not be found under the "C:\windows\system32" folder. There's no configuration that would point SSIS to that folder and with me and a third colleague it's working well.
After some investigation we discovered that the problem has nothing to do with the user itself, but with how the user opens the project. Since the beginning I've been opening the project by double clicking the ".dtproj" file. My colleague first opens the SSIS development interface then opens the project file from the menu.
Has anyone noticed that behavior? What could be the cause for that?
error message print
Microsoft Visual Studio 2008
Version 9.0.30729.4462 QFE
Microsoft .NET Framework
Version 3.5 SP1
Installed Edition: IDE Standard
This happens because the different ways of launching the IDE end up with different current directories for the IDE process. You can test this by creating a package with only a Script Task, with the one line:
MessageBox.Show(Environment.CurrentDirectory);
And then running this project after launching it both ways.
Double-clicking the project or solution file sets the folder containing that file as the current directory. (I assume this is standard Windows process launching behaviour when starting a process based on the file extension association.) SSIS packages then look in the current directory when the path to the configuration file is relative.
We use relative paths to configuration files all the time to simplify deployment, and have to always remember to open the solutions by double-clicking the SLN file.

MySql Web Configuration Tool Error in VS 2012

When I press the button for MySql Web Configuration in Visual Studio 2012 it immediately shows the following error.
This is in a basically blank web app MVC 4 - nothing added really and yet I can't get this thing to fire up - any ideas?
I
your problem is located in a file called "machine.config", there are 2 files.
1st:
C:\Windows\Microsoft.NET\Framework\ [version_no] \Config
2nd:
C:\Windows\Microsoft.NET\Framework64\ [version_no] \Config
backup each file before making any changes
open each file with notepad
search document for the following sections
<membership>
<profile>
<roleManager>
within these sections, remove everything after MySql.Web and stop before the closing end quote... it should like this when your down ---> MySql.Web"
same and repeat for the next machine.config file
close Visual Studio
reopen your project and try the website configuration tool.
not sure why this works. just know how to fix it.

PhpStorm File open issue

I new to using PhpStorm, I am trying to figure out 2 things which are giving me issues:
When i have the phpstorm already open and i use windows explorer to open a php file i get a cannot find file error. If I close PhpStorm and try to open, it works fine. Any reason why it happens do I need to change any settings?
How do I view projects I created using phpstorm any feature similar to eclipse so I can switch and back between multiple projects.
Thanks in advance.
It's a bug.
PhpStorm doesn't have workspaces concept, File | Reopen recent project is what you can use now.