fsprojects-archive / zzarchive-VisualFSharpPowerTools

[ARCHIVED] Power commands for F# in Visual Studio
http://fsprojects.github.io/VisualFSharpPowerTools/
Apache License 2.0
310 stars 77 forks source link

Syntax highlighting does not work in 2013 now #1194

Closed marhoily closed 8 years ago

marhoily commented 9 years ago

On the screenshot you can see a sample code that contains a lot of syntax elements that should have been coloured:

image

I'm using the following version of the extension:

image

And here is why I think the colorization should be on:

image

And here is why I think the colors in settings do not work:

image

vasily-kirichenko commented 9 years ago

Does any other feature work, like Highlight references or Rename refactoring?

marhoily commented 9 years ago

No, no

vasily-kirichenko commented 9 years ago

If I remember correctly, some people had this issue on win 10 and it's been resolved by installing VFPT under administrative privileges. @dungpa, am I right?

dungpa commented 9 years ago

Yeah, please try to remove and reinstall the extension using Admin accounts.

marhoily commented 9 years ago

does installing the extension from VS that started under Adming account counts? I 99% certain my collegue did so and still had the same issue. We both have win10. Anyway I will try reinstalling tomorrow at work.

marhoily commented 9 years ago

Nope, does not work. I installed the tools using VS in admin mode. I installed in launching FSharpVSPowerTools.vsix from the elevated app. Is there any log file I could provide you?

vasily-kirichenko commented 9 years ago

Try to click on the VSIX and launch "Run as Administrator".

dungpa commented 9 years ago

@marhoily Could you try to (1) remove the extension (2) download the vsix and (3) Run the vsix as an elevated app?

If it doesn't work, you may find some F# Power Tools entries in C:\Users\AppData\Roaming\Microsoft\VisualStudio\12.0\ActivityLog.xml.

marhoily commented 9 years ago

@vasily-kirichenko That's why I said I tried to launch it from an elevated app. I do not know how to click on it and launch "Run as Administrator" :)

image

Could you give instructions on how to do it?

@dungpa here is the log of my last session of work on f# code. https://onedrive.live.com/redir?resid=7735C81255E71EA7!25810&authkey=!AOX4ZxYD3S02fag&ithint=file%2cxml

dungpa commented 9 years ago

@marhoily The issue I mentioned is this one https://github.com/github/VisualStudio/issues/28#issuecomment-138260820. Could you log in as an Admin user and click to install?

marhoily commented 9 years ago

I'm sorry guys, I'm not an expert in UAC. vsix does not have a context menu item "run as administrator". I am logged in as an admin. I tried running total commander as admin and then launching the vsix from there. It did not help. I repeat: it did not. If you know better way of running the vsix elevated please, share

dungpa commented 9 years ago

Did you remove the extension from Visual Studio before installing the downloaded version? Do you have the installation log of the extension?

I don't know where things go wrong since there is no error in the log files you attached above.

marhoily commented 9 years ago

I do uninstall before reinstalling. I have done that 5 times by now. the log I provided is the installation log of extansion as far as I understand. If you explain how to retrieve better log I will.

I think that is it: plugin get's installed correctly and there must be some other issue inside.

dungpa commented 9 years ago

Sorry for the confusion.

When you install the extension, VSIXinstaller.exe creates a log file in %TEMP% folder. Installation errors may be written there. Location of VSIXinstaller can be found in this thread https://github.com/zpqrtbnk/Zbu.ModelsBuilder/issues/60#issuecomment-123595734.

Another way to ensure Admin installation is to run VSIXinstaller.exe from elevated command prompts as per http://stackoverflow.com/a/32922451.

marhoily commented 9 years ago

here are log files that accumulated in my temp folder over the last couple of days. https://onedrive.live.com/redir?resid=7735C81255E71EA7!25861&authkey=!AE1XIksgFiQ-Zqc&ithint=folder%2clog

as you can see even in the oldest log when I installed the plugin without elevated permissions there were no errors

As to installing elevated I've done it as you proposed. it did not help. I am 100% sure now that the plugin is installed in elevated

marhoily commented 9 years ago

just accept it: there must be something else wrong

dungpa commented 9 years ago

Yes, it's installed successfully. Sorry.

Could you enable Diagnostics mode and check Output windows http://fsprojects.github.io/VisualFSharpPowerTools/faq.html#What-is-Diagnostic-mode-When-should-I-use-it? There might be relevant information. Thanks.

marhoily commented 9 years ago

This is all I've got in the output:

[VFPT][Information 05:29:43 PM] [SyntaxConstructClassifier] [Fast stage] Total = 00:00:05.2375220 getCategoriesAndLocations, 00:00:02.8649888 ParseFileInProject, 00:00:02.3392494 GetAllUsesOfAllSymbolsInFile, 00:00:00.0109201 instance.GetAllUsesOfAllSymbolsInFile, 00:00:00.0088777 LS GetAllUsesOfAllSymbolsInFile, 00:00:00.0021656 LS allSymbolsUses, 00:00:00.0006516 LS ParseAndCheckFileInProject, 00:00:00.0001709

[VFPT][Information 05:30:04 PM] [SyntaxConstructClassifier] [Fast stage] Total = 00:00:00.0265129 getCategoriesAndLocations, 00:00:00.0256012 ParseFileInProject, 00:00:00.0006919 GetAllUsesOfAllSymbolsInFile, 00:00:00.0001210 instance.GetAllUsesOfAllSymbolsInFile, 00:00:00.0001048 LS ParseAndCheckFileInProject, 00:00:00.0000912 LS GetAllUsesOfAllSymbolsInFile, 00:00:00.0000018 LS allSymbolsUses, 00:00:00.0000003

[VFPT][Information 05:30:04 PM] [SyntaxConstructClassifier] [Fast stage] Total = 00:00:00.0129418 getCategoriesAndLocations, 00:00:00.0125731 ParseFileInProject, 00:00:00.0001424 GetAllUsesOfAllSymbolsInFile, 00:00:00.0000949 instance.GetAllUsesOfAllSymbolsInFile, 00:00:00.0000840 LS ParseAndCheckFileInProject, 00:00:00.0000695 LS GetAllUsesOfAllSymbolsInFile, 00:00:00.0000021 LS allSymbolsUses, 00:00:00.0000006

[VFPT][Information 05:30:44 PM] [SyntaxConstructClassifier] [Fast stage] Total = 00:00:00.0079673 getCategoriesAndLocations, 00:00:00.0076042 ParseFileInProject, 00:00:00.0001563 GetAllUsesOfAllSymbolsInFile, 00:00:00.0000875 instance.GetAllUsesOfAllSymbolsInFile, 00:00:00.0000723 LS ParseAndCheckFileInProject, 00:00:00.0000577 LS GetAllUsesOfAllSymbolsInFile, 00:00:00.0000031 LS allSymbolsUses, 00:00:00.0000006

[VFPT][Information 05:30:44 PM] [SyntaxConstructClassifier] [Fast stage] Total = 00:00:00.0280868 getCategoriesAndLocations, 00:00:00.0276781 ParseFileInProject, 00:00:00.0001715 GetAllUsesOfAllSymbolsInFile, 00:00:00.0001061 instance.GetAllUsesOfAllSymbolsInFile, 00:00:00.0000927 LS ParseAndCheckFileInProject, 00:00:00.0000781 LS GetAllUsesOfAllSymbolsInFile, 00:00:00.0000018 LS allSymbolsUses, 00:00:00.0000003

marhoily commented 9 years ago

If I had to guess I would say that vfpt or some module of it just fails to initialize earlier than it is able to log about it

ReedCopsey commented 9 years ago

I'm seeing this same behavior on all of our systems with VS 2013 here - some of which are Windows 7, some Windows 10. Installing extension as an administrator has no effect. Most other functionality seems to work, but the coloring doesn't seem to do anything.

vasily-kirichenko commented 9 years ago

I have the same problem on VS 2015, but it colors types at least. In VS 2013 everything works ok.

dungpa commented 9 years ago

It seems syntax coloring does happen but colors are reset to default ones. Until we know how to fix this, please try to modify colors manually on Fonts and Colors dialog.

ReedCopsey commented 9 years ago

@dungpa is correct - I was wrong - it seems like it just stomps the colors back to black on white, so it looks like its doing nothing until you manually overwrite them.

vasily-kirichenko commented 8 years ago

Fixed long ago.