Less compiler issue (probably) - visual-studio-2017

I have installed the less compiler extension
https://github.com/madskristensen/LessCompiler
When I create a less file and save it, it isn't building CSS and min.css file for me.
In the lower right corner, I clicked on the watermark and less is enabled for the project. What am I missing here?
Please take a look at the screenshot.
Update 1:
I have created a test MVC site and added a less file to it. No CSS getting generated over here as well.
Update 2:
I have installed web essential 2017 and WebCompiler is there now. Still no css files. Selecting the file and Shift+Alt+Q not working. Also when i right click on the file, i don't get re-compile menu option as being discussed in the following thread:
https://github.com/madskristensen/WebCompiler/issues/299
I am using Visual Studio Enterprise 2017 version 15.5.6

Had the same issue. For me it turned out node was no longer in my path which is required to compile. The output tab has a drop down with LESS compiler as an option to help troubleshoot.

Related

Where is snippet explorer located?

I have successfully installed the snippet designer (by Mathew Manela) and had successfully exported my own code snippet once from my VS 2017 by following the instruction from this site:
https://marketplace.visualstudio.com/items?itemName=vs-publisher-2795.SnippetDesigner
However, after I closed the VS2017 and come back and attempted to export another code snippet, I can no longer see the option to export code snippet after I highlighted the code and right clicked on it.
I wonder where has the functionality gone?
Also I no longer see the snippet explorer, which according to the link, it is located under view->other window. I did see it before I closed the vs 2017 application.
The snippet I originally created worked and is still working though, which amazes me.
I wonder what have I done incorrectly? How do I export another snippet?
I think I finally figured out what have I done wrong the hard way.
What I did earlier and probably should not have done was downloading the extension from the link above and clicked on it to install. It downloaded and installed like a champ, no complaint. It even worked for 1 time but then vanished in thin air the next time I got into VS2017. There is no way to find it. Maybe I am not supposed to click on the extension to install it outside of VS2017, but there was no warning or error message, which gave user the false impression that everything was fine.
Now, to fix the issue, I went into VS2017, Tools --> Extension And Updates and pick up the SnippetDesigner from there, re-installed it and closed VS2017 for it to finalize.
Then going back into VS 2017 and everything comes back!
Just posted my experience, hopefully someone else does not have to hit their head against the wall trying to figure out why SnippetDesigner is behaving the way I described above.

Your project is not referencing the "UAP,Version=v10.0.10240" framework

I am using Visual Studio Community Edition 2017 and trying to create a UWP application.
I get the following error
Your project is not referencing the "UAP,Version=v10.0.10240" framework. Add a reference to "UAP,Version=v10.0.10240" in the "frameworks" section of your project.json, and then re-run NuGet restore.
I had the same issue on my build machine. What's weird is everything runs fine on my local machine.
I managed to fix this by going into the project properties for my UWP app, and changing the Target version to match the Min version.
The reason I believe this issue is happening is because when targeting a higher framework, on a Windows Server machine (the build agent) it doesn't restore all of the packages between your min and target version. It seems to build fine against the version you target.
By the way Ken, following the instructions given by the error don't fix the issue. Try not to be so rude. I came to this page looking for the same issue, and you are no help at all.
I have the same issue, after I remove my bin and obj folder, I can build mine and see the errors gone.
I recently ran across this same issue when updating the target framework. The issue turned out to be the Nuget Restore task in my VSTS Build definition needed to be updated to the latest version (2.*). Once I did that, the builds worked as expected.
I agree with Jeff. Ken Not sure if you should be giving any answers with this kind of attitude.
The error message is misleading there is not project.json at least you cannot see it in the Visual Studio explorer.
I had the same issue and have min and target version set to the same number but it would not build.
The fix was to make sure in Nuget package manager setting to tick checkbox 'Allow Nuget to download missing packages' and the one below it as well and rebuild the project.
This is a pretty weird mistake, but what worked for me :
1st Solution:
1 - Change your project target to "10.0.10586" (or up)
2 - Make a clean / nuget restore / rebuild
3 - Return the project target to the "10.0.10240"
4 - Make a clean / nuget restore / rebuild
Do not ask me why, but it worked :)
2nd Solution:
If you use a repository with Tortoise, try making a CLEANUP
I had an old Backup folder in my project that contained a project.json. Looks like it might have been from an earlier upgrade. I deleted Backup and got a good build.
This happens in exactly this manner, if projects were generated in the year 2017 in the phase where MS changed to project.json and then decided against it. I tried several solutions (and yeah, Ken White is so wrong!) and the cleanest way was to really build up a new clean project in the lastest and up to date version of Visual Studio (VS2015 did not work sustainable) and just copy over the old project content which is just a few minutes work. This will save you a lot of headaches especially working in a larger team!
I tried the above solutions but nothing worked. I had to backup and remove the UWP project and recreate it from scratch.
I tried a couple of solutions.
Solution 1
Open the solution from Windows explorer and search for project.json files. Open all of them (If you have multiple) and make sure the required framework versions are there. I frequently switch between build 10240 and 17763 and I get this error frequently. (I switch between git branches that target different frameworks of UWP) So instead of adding the exact version I just added only the 10.0 part like this.
"frameworks": {
"uap10.0": {}
},
Now if your project.json files are ok, search for project.lock.json files. If you have one or more of those, delete them.
Now clean your solution
Close VS
Delete all the bin and obj folders.
Reopen the VS and try to run the app.
Solution 2:
Go to project properties
Change the minimum and target version to something else and do a clean build. Then put the actual versions and build again.

Newly created items are not added to the solution until I close and reopen it (VS2017)

This is slowly driving me crazy. It is a problem I did not have with VS2015 and only showed up when I started using VS2017. I have upgraded to the first service pack and that did not change anything.
It is a C# .NET Core project if that matters. Any time I create a new file (e.g. Foo.cs) it doesn't seem to get associated with the solution. If I try and reference it from an existing file then the IDE doesn't recognize it and it reports an error. Any open tabs I have with these files shows them as "Miscellaneous files" where it would normally have "ProjectName(netcoreapp1.1)".
If I close the solution and then reopen it then everything works fine. Building or rebuilding the solution does not fix the issue. Is anyone else seeing this problem?

VSCode "go to definition" not working

I installed Visual Studio Code 1.1 with the C/C++ extension,
opened my C++ project and tried to use "Go to definition" in vain.
The "Go to definition" is not working at all.
Example, go to definition of a class member:
int i = m_myVar;
(I opened a simpler project with one file and it was working for this one)
In the end, what I want is good indexation of my big project, is there a way to install Intellisense?
I had a the same issue: F12 and Ctrl + Click and Right Click "Go To Definition" wasn't working.
The fix for me was:
Go to Extensions
Click "Disable All Installed Extensions"
Close and Reopen VS Code
Back to Extensions and "Enable All Extensions"
Essentially enable/disable all extensions fixed the issue.
I recently came across this same issue and after trying all of the suggested solutions I could find with no success, I found this article:
https://code.visualstudio.com/docs/setup/linux#_visual-studio-code-is-unable-to-watch-for-file-changes-in-this-large-workspace-error-enospc
Basically my project grew too large and VS code was no longer able to track all files, which messed up the "go to definition" functionality.
After following the steps on the link to increase the maximum number of files to be tracked, the issue was resolved.
The correction is pretty simple (tested on Ubuntu 18.04):
Add this line:
fs.inotify.max_user_watches=524288
to the end of the file /etc/sysctl.conf
After saving, run the following command:
sudo sysctl -p
Hopefully this will be useful to someone else, this has been bothering me for the last few days.
I had a similar problem except with Python and google searches for solutions kept bringing me back to this post so I figured I'd post my solution here in the hopes that it might help other people.
I was working on a remote cluster through VScode Remote and was getting similar errors to the original question(all 'go to ___' functionality was unavailable and was even getting a 'too large to track' error) and I thought I had to increase the number of watches, which didn't end up helping.
All I needed to do was install a python interpreter on the remote VScode server. This fixed my problem.
I believe vscode 1.1 (well, 1.1.1 actually) + the C++ extension (cpptools) is as much Intellisense as we can get for now.
You should load your big project with the "open folder" function to make vscode know about the other files.
https://blogs.msdn.microsoft.com/vcblog/2016/03/31/cc-extension-for-visual-studio-code/ warns about letting the indexing finish first (red icon in lower right corner during indexing) and mentions the current limitations on the source code parsing.
It wasn't working on my laptop as well after installing a few VSCode extensions. I decided to close and re-open VSCode with administrator permission and suddenly it sorted out.
I have been trying to fix this for a long time. In the end, what worked for me was simply reinstalling VSCode, then installing the latest C/C++ extension (v0.18.1). Then, in your .vscode/c_cpp_properties.json file, under includePath, add your include folder which has all your header files.
I tried the methods mentioned in this thread none of them seemed to work for me. A simple solution that worked for me is that I closed the current workspace and created a new workspace, added the folders which I required(same as the old workspace), and saved the new workspace. Waited for a couple of minutes to index and IntelliSense is able to find definitions now.
I am using VSCode 1.52.1 on Ubuntu 20.04.
In my case, for whatever reason,c_cpp_properties.json has become set to Disabled in ~/.config/Code/User/settings.json.
Manually changing it to Enabled solved the problem.
Fixed mine by UNCHECKING C_Cpp > Default > Limit Symbols To Included Headers
Your mileage may vary. Good luck!
Have you saved your workspace? Or did you just open a folder with File->Open Folder? This question already has many answers, but none of them address this case, which was my issue.
The question is not specific enough for me to know if you are having the exact same symptoms as my case.
If:
You have not saved your workspace. vscode doesn't say "(workspace)" at the top of the window.
None of the goto functions are working, but instead report: "No ___ found for ____"
The tag parser database icon in the bottom right is always there but only reports "Parsing open files", rather than telling you how many files have been parsed.
Then:
Try saving your workspace.
If you have multiple versions of a language on your PC, specify the exact language you are using in the VScode(in my case, I am using Python, so I must specify the version to the python Interpreter in VS Code)
If you could not do it whatsoever, then uninstall all the other versions that you don't use and then if you go to VS Code, it will ask the version to be used, and you would have only one version, so when you select the version, the "Go To Definition" will be activated.
I was having a similar issue with java on Ubuntu 20.04 using OpenJDK version 11 (openjdk-11-jdk in apt). At first I didn't have the JRE installed, so I installed it and it still didn't work.
Afterwards, I went to the CTRL + SHIFT + P menu and then to Java: Configure Java Runtime, there I saw in the Java Tooling Runtime tab that /usr/lib/jvm/java-11-openjdk-amd64 was selected, changed it to /usr/lib/jvm/java-1.11.0-openjdk-amd64 just to see if it would work, and after a restart it did. I'm not sure why this is, but I hope it may help somone else.
For python ensure your code analysis settings are correct. In my case the languageServer was accidentally set to 'None'. Reverting it to 'default' or 'pylance' did the trick.
Just to inform if none of above works then
In my case i was using Kite extension in my VS code, I just disabled it and it worked. I think kite extension is blocking this feature.
OS: Linux Ubuntu 22.04
if you encountered with following error:
"The .NET Core SDK cannot be located. .NET Core debugging will not be enabled. Make sure the .NET Core SDK is installed and is on the path."
Normally Vscode remains unable to locate .Net sdk. need to set path manually.
sudo ln -s /snap/dotnet-sdk/current/dotnet /usr/local/bin/dotnet
restart omnisharp & restart vscode
No need to do anything. Just close and re-open. It will work.
I also faced similar problem. In my mac os cmnd + 'click' is used to 'go to definition' then it suddenly stoped working. If that is the case then please follow these steps:
restart vs code
restart pc
uninstall all extensions and reinstall again followed by a pc restart.
I had a similar issue with the extension C/C++ installed. I solved it by downloading an older version of the extension and upgrading to the last version. Somehow it solved the problem...

Flex/Flash Builder stand alone has a duplicate "Open Resource" menu

I've seen an issue a few different installations whereby the Open Resoure menu open in Navigate appears twice, which wouldn't be a problem if it didn't disable the CTRL+SHIFT+R shortcut to it.
I've seen it affect both Flex Builder 3 and Flash Builder 4, but it only seems to affect the standalone version when it is installed after the plugin version. Re-installation doesn't seem to help.
NOTE: I'm posting this with the intent of self-answering
I recently spotted the answer posted by Kammerer on a related question, but it doesn't appear will in search results. I'm reproducing the solution here, but please vote up the original answer if this answer helped.
Open %FLEX_BUILDER_HOME%\plugins\com.adobe.flexbuilder.standalone_3.0.214193\plugin.xml
%FLEX_BUILDER_HOME% is the installation directory for Flex/Flash Builder
Requires elevation on Windows Vista/7
The version number may not match the above
Search for com.adobe.flexbuilder.standalone.navigate and comment out (or remove) the entire <actionSet> ... </actionSet> node that contains it
Save the file
Run %FLEX_BUILDER_EXE -clean
%FLEX_BUILDER_EXE% is FlexBuilder.exe or FlashBuilder.exe, depending on your version