Visual Studio 2013 Flexera customer community tab - visual-studio-2013

First of all, they took away the default setup project and give us a 3rd party tool to package ( maybe its a topic for a separate forum), but visual studio keeps opening a new tab with the flexera customer support page(with an irritating javascript error) whenever i have a 'error' in my code .
how can i disable this feature ?

As a workaround, you can go to Solution Properties -> Configuration Properties -> and uncheck the Build action for the setup Project (then close and reopen visual studio).
Later you reactivate it only when setup creation is required.

Another workaround.
Right-click on setup project and choose Unload Project.
When you want to build setup again, use Reload Project.

Not a solution, but another workaround. Edit your hosts file and point that website to localhost. Gets rid of the popups, but not the extra tab in Visual Studio.
1) Run this:
notepad C:\Windows\System32\drivers\etc\hosts
2) Add this text and save the file:
# To get rid of the annoying javascript error popups in Visual Studio
# Example problem URL: http://flexerasoftware.force.com/SupportKBList?searchString=-1014
127.0.0.1 flexerasoftware.force.com
3) Run this:
ipconfig /flushdns
4) Close re-open Visual Studio.

My favorite workaround (10 seconds but must be re-done after each VS2013 restart):
1) Right click the tab and click [Float]
2) Minimize the window and put it in an unused corner of VS 2013

Related

Visual Studio 2017 code colors not working correctly [duplicate]

When I want to edit C# Unity scripts, they open in Visual Studio. It is supposed to provide auto complete for all Unity related code, but it doesn't work.
Here you can see the missing functionality:
As seen, the transform object does not open the autocomplete menu.
Unity version: 5.5.2f1
Visual studio 2015
Visual Studio Tools for Unity is installed
There is no auto-completion because the script says "Miscellaneous Files" instead of the of the name of the Project. Take a look at the image below that came from the video in your question:
The "Miscellaneous Files" message can happen for many reasons:
It can happen when you open your Unity C# file from another folder instead of opening it from Unity Editor.
This can also happen because Unity crashed while Visual Studio is still open therefore corrupting some files.
It can happen because Unity was closed then re-opened but is no longer connected to Visual Studio. When Visual Studio is opened you get "Miscellaneous Files" and no auto-completion.
This can happen when Visual Studio Tools for unity is not installed.
When you create a script from Unity then quickly open it before Unity finish processing it or before the round icon animation stuff finish animating.
Most of the times, restarting Unity and Visual Studio should fix this.
I can't tell which one is causing the problem but I will cover the most likely solution to fix this.
Fix Part 1:
Download and Install Visual Studio Tools for unity from this link. Do this while Unity and Visual Studio are both closed.
From Unity Editor, go to Edit → Preferences... → External Tools. On the External Script Editor drop down menu, change that to Visual Studio 2015.
Fix Part 2:
If newly created C# files are coming up as Miscellaneous then follow the instruction below:
From Visual Studio, go to Tools → Options... → Tools for Unity → Miscellaneous. Under Show connectivity icon, set it to true then restart Visual Studio.
When you re-start, connection icon should now be available in Visual Studio. Click it then choose the Unity instance to connect to. The red 'x' icon should now turn into a brown checkmark icon. Now, when you create a new C# file in Unity, it should open without saying Miscellaneous.
Fix Part 3:
Still not fixed?
Re-import project then open C# Project.
Close Visual Studio.
From Unity, re-import project by going to Assets → Reimport All.
Now, open the project in Visual Studio by going to Assets → Open C# Project. This will reload the project and fix possible solution file problems.
Fix Part 4:
Still not fixed?
Fix each C# file individually.
Click on Show All Files icon.
Select the script that doesn't do auto-complete then right-click and select Include In Project.
Fix Part 5:
Not fixed yet?
Credit goes to chrisvarnz for this particular solution which seems to have worked for multiple people.
Close Visual Studio
Go your project directory and delete all the generated Visual Studio files.
These are the files extensions to delete:
.csproj
.user
.sln
Example:
Let's say that the name of your Project is called Target_Shoot, these are what the files to delete should look like:
Target_Shoot.csproj
Target_Shoot.Editor.csproj
Target_Shoot.Editor.csproj.user
Target_Shoot.Player.csproj
Target_Shoot.Player.csproj.user
Target_Shoot.sln
Do not delete anything else.
Double click on the script again from Unity which should generate new Visual Studio file then open Visual Studio. This may solve your problem.
Fix Part 6:
If not working, check if you are having this error:
The "GetReferenceNearestTargetFrameworkTask" task was not found
Install Nuget PackageManager from here.
Restart Visual Studio.
See this answer for more information.
Fix Part 7
Make sure all of the projects are loaded.
In Solution Explorer it should tell you # of # projects.
If all of the projects are not showing, right click on "Solution (# of # projects)" and click Load Projects.
Try this,
In Unity Editor Go to Menu, Click on Edit -> Preferences -> External Tools -> External Script Editor. Set it to Visual Studio (your installed version of VS).
Now in Menubar go to Edit -> Project Settings -> Player Settings -> Other Settings -> Under Configuration -> Check API Compatibility Level -> Change it to your installed .Net version. In my case I set it to .Net 4.x
Now if Visual Studio is running already go to Visual Studio, it will ask to reload project. Reload the project. Check if it works, if not close Visual Studio. Now Open cs file from Unity Editor, and now it should work.
I found another way to fix this issue in a more convenient manner:
Select the broken file in Solution Explorer.
Open its Properties.
Switch field "Build Action" from "Compile" to "None".
Then switch it back to "Compile".
This will kill the synchronization between Unity and Visual Studio somehow.
The next time Visual Studio will reload the project, it will prompt a warning.
Just click on "Discard".
If you have done all of the above and still isn't working , just try this:
Note: you should have updated VS.
Goto Unity > edit> preference >External tools> external script editor.
Somehow for me I had not selected "visual studio" for external script editor and it was not working. As soon as i selected this and doubled clicked on c# file from unity it started working.
I hope it helps you too.
Unload and reload the project, in Visual Studio:
right click your project in Solution Explorer
select Unload Project
select Reload Project
Fixed!
I found this solution to work the best (easiest), having run into the problem multiple times.
Source: https://alexdunn.org/2017/04/26/xamarin-tips-fixing-the-highlighting-drop-in-your-xamarin-android-projects/
This page helped me fix the issue.
Fix for Unity disconnected from Visual Studio
In the Unity Editor, select the Edit > Preferences menu.
Select the External Tools tab on the left.
For External Script Editor, Choose the Visual Studio version you have.
Click regenerate Files
You Done
Select project in Visual Studio
Click "Refresh" button
I hit the same issues today using Visual Studio 2017 15.4.5 with Unity 2017.
I was able to fix the issue by right clicking on the project in Visual Studio and changing the target framework from 3.5 to 4.5.
Hope this helps anyone else in a similar scenario.
Two Alternative Options:
Fix 1
#singleton pointed me in this direction. Instead of changing the target in Visual Studio you should change it in Unity since the project is auto-generated.
First delete the auto generated Visual Studio files:
.csproj
.user
.sln
Then from within Unity go to PlayerSettings and under 'Other Settings' change the 'Scripting Runtime Version' from Stable 3.5 to Experimental 4.6.
However, that didn't fix it for me.
Fix 2
I noticed all of the references to Unity related code was marked with a yellow warning. Check your error logs and see if this is the case. In particular see if you get the following error: getreferenceNearestTargetframeworkTask
If so try:
Start Visual Studio Installer again.
On the Build Tools 2017, click Modify,
Ensure that "Nuget targets and build tasks" are ticked. This should become ticked if you click on Universal Windows Platform development.
Update 2020 with Visual Studio Community 2019 and Unity 2019.3:
Open Visual Studio Installer as Administrator, select to modify your current installation and add "Game development for Unity"
If you add a new c# script in Unity now, and open it (automatically) with Visual Studio, it is not described as "Miscellaneous" at the top of the window but with "Assembly-CSharp", and the autocomplete works.
i found my solution by creating the .cs file from visual studio itself instead of unity editor
right click on project folder in solution explorer
add > new item
type "unity" on the search field on the top right
select "CSharp MonoBehaviour"
name your script on the bottom and click Add
In my case, correct .net version was not installed on my PC. I install the .net 3.5 on my pc and that worked for me.
For Windows or macOS:
Download/Install the Visual Studio IDE (with Unity Tools)
When installing, make sure you include installation of
Game development with Unity
Then using Unity (you can double click one of your C# files), open a new C# project and the Visual Studio IDE should open with your new project structure.
From there, you should be able to see what you are looking for.
For example:
For Linux (suggestion):
Try Monodevelop - Additional Information, it provides code completion/hints.
My autocomplete also didn't work because Visual Studio Tools for Unity wasn't installed. So, after you install that, delete the auto generated Visual Studio files. Others said that you open file again and the problem is solved but it's not.
The trick is: instead of normally double-clicking the file, you need to open the C# file from Unity by right click and then "Open C# Project".
The issue I faced was that the C# Project was targeting a different .NET Framework (4.7.2), whereas the Unity project had a different target (.NET 3.5).
I fixed this by changing the target in Unity as-
File -> Build Settings -> Player Settings -> Other Settings -> API
Compatibility Level : Set it to the .NET version you already have
installed (Check your .NET Version here). In my case, it was 4.x
After this, Visual Studio worked perfectly and autocorrect was fixed too.
Try pressing Ctrl + Alt + Space (which toggles between suggestion and standard completion modes)
For some odd reason, the "Game development with Unity" tool can become disabled in Visual Studio.
To fix this..
Open Visual Studio
Go to Extensions → "Manage Extensions" → Installed
Find "Visual Studio 2019 Tools for Unity"
If it is disabled, enable it
Restart VS
Credit to Yuli Levtov's answer on another Thread
The following works for me.
Go to Edit->Preferences->External Tools->External Script Editor Select Scripting Editor
I solved to install the same version of .NET on WIN that was configured in my Unity project. (Player Settings)
Go to Options on the Tools menu and then select Documents in the Environment node. (If Documents does not appear in the list, select Show all settings in the Options dialog box.)
Put a tick on "Miscellaneous files in Solution Explorer" and Click OK. (This option displays the "Miscellaneous Files" node in Solution Explorer. Miscellaneous files are files that are not associated with a project or solution but can appear in Solution Explorer for your convenience if you tick this option.)
Locate your file in the Solution Explorer under "Miscellaneous Files". Then drag and drop your file to where it should belong and voila! This will copy the file to where you drop it. You may now safely delete the older file under Miscellaneous Files folder if you wish to do so
Credits: https://stackoverflow.com/a/47662523/10471480
In case Scripts folder is not visible:
Click on "Show all files" in Solution Explorer
Locate the Scripts folder.
Right Click on Scripts and select "Include in Project"
Keep in mind that if you are using the ReSharper tool, it will override the IntelliSense and show it's own. To change that, on VS, go to Extensions -> ReSharper -> Options -> IntelliSense -> General then choose Visual Studio and not ReSharper.
Before restarting and/or re-installing VS, First try opening any other of your projects to see if Intellisence works, if it does, then issue probably lies with your current project. First, most probable victim would be the NUGET packages with pending updates. To Fix this,
Right click on references
Proceed to Manage NUGET Packages Under NUGET Packages
proceed to updates Install Updates and recheck Intellisence
I tried all of these but ended up finding out that I needed to right-click the solution in Solution Explorer and add existing items and find the C# assembly file in Window's Explorer. There seem to be a bazillion different problems that give you this error, this is likely the most simple solution. If you double click on your script from unity, it does not seem to drag the assembly along.
Another possible fix:
In the project window, click on the Assets folder
Right click, and Create -> C# Script
Double click that, and wait.
For some reason, this work.
None of the above solutions worked for me. However I opened the ProjectName.CSPROJ file and manually added the new file and it worked like charm
What worked me is that I copied all the code inside the broken class and removed that file.
Then, I opened an empty file with the same name and pasted back.
Result: beautiful syntax highlights came back!
"Preferences" -> "External tools" -> set you exteranl tool
Thats one fix. Also for VS you can use ReSharper by JetBrains, but I recommend use Rider. That one is also free for students.
It provides less performance than visual studio, but more than VS+Resharper definitely.
Have a good day, mate)
Try with combination: Ctrl + Alt + Space
one of the above methods are worked for me and I just found a solution to this problem,
1. First, go to the project directory and delete .sln file
2. Second, go to unity and double click your script. Then Visual Studio will be open with an error,
Then click ok and close Visual Studio editor.
Finally, turn off your Windows Defender and then go to your project directory and there will be .csproj file. Just double click and open this from your Visual Studio editor and open the scripts folder inside the assets folder and open the scripts and autocompletion will be working perfectly fine.
These actions solved the problem for my projects in Visual Studio 2022
FIX 1
Solution
Assembly-CSharp (right-click)
Load Entire Dependency Tree
FIX 2
Solution
Assembly-CSharp
References
Double click on any lib to force loading

Moving from Visual Studio to Sublime Text

I'm working with Sublime Text for a while now and it works perfectly! But at my new work they're using Visual Studio, with some plugins and shortcut changes I'm now be able to work a little bit faster but I prefer Sublime Text.
Why I'm stuck to Visual Studio at my work is because of 3 things:
1. TFS: Team Foundation Server
I've found the Sublime TFS plugin, I haven't tested it yet but I think it works the same as the Sublime SVN plugin which I don't like (no status on checkout, just waiting until it's done). For SVN I'm using TortoiseSVN which works nicely. Is there something like TortoiseSVN for TFS?
2. Solutions
If I browse to the solution/product folder on my computer, add a new file and go back to Visual Studio I've to include that file into the solution/project. I'm used to exclude files which I don't like to use in my project instead of include. Is it possible to change this?
3. Build system
After every change I've to build. Instead of just save (F5) and go to my browser (ALT-TAB) which refreshes automatically after every change, I have to save (F5), build (SHIFT-F6), go to my browser (ALT-TAB) and refresh (F5) with Visual Studio. I'm pretty handy with it now, but I think this can be done easier. So is it possible to build automatically after saving?
What I did until now is searching on Google. I've found some interesting things but nothing which covers these 3 things. For example; here a simple tutorial for the build system. I hope someone can help me out with this so I can say good bye to Visual Studio and return to Sublime Text with love.
I have setup a shortcut key in Visual Studio to open my files in Sublime Text Editor. Below is a step by step guide to doing this.
Step 1:
Open Visual Studio, Go to "Tools" menu and Select "External Tools..."
Step 2:
Click on "Add". Set up a Title say "Open in Sublime" , browse to "sublime_text.exe" to the set the Command textbox. For the arguments fill them with $(ItemPath):$(CurLine):$(CurCol) - this will tell Sublime to open the Visual Studio's current file and go to the same location within that file. Set the Initial Directory to $(ItemDir).
Step 3:
Now if you go Menu > Tools you will find our newly added "Open In Sublime" option. Now let's take this one step forward and setup a shortcut key for this.
Step 4:
Go to Menu > Tools > Options, Under Environment select "Keyboard". In the "Show command containing:" field search for "externalcommand6" and press in your shortcut key combination you want to assing and click the "Assign" button. Avoid combinations that are already in use.
That's it you're done
Sublime text editing is now just a keystroke away.
You can use them both. Visual studio is an ide and manages a lot more then just editing the text files.
If you want to use your text editor of choice you just need to get familure with the command line tools that VS hides from you.
For TFS tasks you need to use TF
When you need to build just invoke MSbuild which is what Visual Studio more or less does anyway. You can also edit the project files by hand as there just msbuild files.

How to make TFS not auto check source control from Visual Studio?

every time I open my Solution in Visual Studio it tries to communicate and validate every file is update to date in source control. I am working on a very large project and was wondering how I could disable it for this Solution? Furthermore is I am curious as to also how to enable it?
In Visual Studio 2010:
1) Go to Tools -> Options -> Source Control -> Environment.
2) In "Source Control Environment Settings," select "Custom" from the drop down.
3) Uncheck "Get everything when a solution or project is opened."
(This is a global setting. It is not Solution-specific.)
You can install the TFS power tools, assuming you use TFS 2010 then you can download them here open up a visual studio command prompt and run the command tfpt connections this will bring up a dialogue which will show all of your available TFS servers and Collections.
There are 2 options you can try, firstly uncheck "Automatically connect to server on startup" this should stop VS trying to connect to TFS when you open a solution. If that doesn't work then click on the "+" next to the TFS server and select the collection you are using for source control. Hit the "Edit" button and you should see a checkbox called "Server is Offline" select this and you will no longer be connected to TFS.
To reverse the behaviour use the same tool to togle the values back to their defaults

Open the start page in Visual Studio after closing a project?

When you start Visual Studio you get a start page with all the latest projects in a list.
But when you've opened and closed a project, how do you open that start page again?
(Without restarting VS)
Visual Studio 2010-2015
There's a menu item View -> Start Page
Additionally you can choose to keep the start page open when loading a project. There's a check box below the projects list for that.
(Tested in VS2010, VS2012, VS2013, VS2015)
In current versions, you can also use the Quick Launch (Ctrl+Q) to search for the command
(Just type "Start Page" in Quick Launch)
Visual Studio 2017
There's a menu item File -> Start Page
You can configure the behavior of the IDE on startup via Tools -> Options -> Environment -> Startup.
In Visual Studio 2017, the start page will open automatically when the solution is closed. As far as I know, this cannot be changed directly in the IDE but there's an extension that adds that feature. See this question on SO and this VSIX-Extension (but this will disable the start page completely - if you try to open it manually, it will be immediately closed automatically)
You also have the Start Page icon in the toolbar :
In VS2013 by default I do not see the "Start Page" command in the View menu but adding it was simple. The icon also looks different in VS2013.
Right click on the toolbar and choose Customize... at the bottom then go to Commands
Switch to Toolbar/Standard and then click the Add Command button an locate the View group on the left
Finally locate the Start Page item and click OK.
In VS 2017 the new location for viewing the start page
is under the 'file' menu. as appears in this link:
https://developercommunity.visualstudio.com/content/problem/4603/view-start-page-menu-item-is-missing.html
In VS 2017 it's in File->Start Page.
By now there is an extension exactly for that purpose:
https://visualstudiogallery.msdn.microsoft.com/e64380ab-e3aa-4ac7-aa11-95719c5c91e9
I tried it an it works like a charme in VS 2015 :)
To get start page in visual studio 2017 Go to File -> Start Page
In case of Visual Studio 2019, go to File->Start Window.
It used to be automatic in VS2008 - Anything you had open outside of any solution/project (including the start page) would close when you opened a project/solution, then when closed that product/solution it went back to what was open before. That is how it should work, they broke it in VS2010. So all the prior VS users searching for the answer - there is none - technology continues to regress.
You can create custom shortcuts in VS under Tools > options > Environment > Keyboard.
makes it super easy to reopen the start page.
Here is my setup if you get confused
custom start page shortcut
In VS 2022 it's in Tools->Option->Environment->General->On Startup
Screenshot

Visual Studio Editor does not underline errors anymore

My Visual Studio (2008) Editor has stopped to underline Errors (this nifty wavy red lines). I can't really tell when, but it can be related to the installation of .Net Framework 3.5 SP 1 or the MVC Beta (which I guess is unlikely). Furthermore have I installed and uninstalled both CodeRush and Resharper for evaluation purposes (decided not to keep either one of them).
Does anyone know the problem and how to restore this functionality again?
Have you checked Tools→Options...→Text Editor→C#→Advanced→Underline errors in the editor?
I usually like to reset my settings after messing around with plugins, as they tend to mess with settings: Tools→Import and Export Settings...→Reset all settings.
About possible causes.
For VS 2012 and 2013 if you have more than one instance of Visual Studio on different machines binded to one "live" account and have installed ReSharper on one of them, it disables the native IntelliSense and error underlines (to replace by it's own rules) that will be synchronised through your account to another machine without ReSharper.
Found it in Visual Studio 2019 as: Tools > Options > Text Editor > General > Show error squiggles
This is generally called Disable Squiggly or Wavy lines in Visual Studio.
How you will do in Visual studio 2013?
TOOLS -> Options... -> Text Editor -> C/C++ -> Advanced -> Disable Squiggles: True/False (Under IntelliSense) -> Press OK
I know its an old question, and with various solutions, but I have fixed it in different way. I'm working with Unity3D on my C# code using VS2017, when suddenly VS decides to stop underlining error while im typing. However, if I close the file tab and reopen, it suddenly undelines the error.
For example:
class A {
public int x;
s;
}
should obvsiouly give an error for that lonely 's' symbol. But, VS doesn't underline it until I close and reopen this file tab.
Solution:
Copied the entire Unity Project folder (which is like a regular VS Solution folder basically) and worked with the new folder, which issue was gone there.
For visual studio 2017 act according to HeeJae's comments in:
https://developercommunity.visualstudio.com/content/problem/113112/design-time-error-checking-isnt-working.html
i.e:
Hi. you are probably hitting a known issue. can you try this?
1.Update to latest release If that doesn’t solve it
2.Go to Tools\Options\Projects and Solutions\General and uncheck “Allow parallel project initialization”.
3.Close VS.
4.Delete the “.vs” directory beside their solution file.
5.Reopen VS.
..
thank you
You can re-enable the "Allow parallel project initialization" option after the issue was solved.
I tried to upgrade VS, reset VS settings, clear VS cache and everything people do conventionally but none of them solved this issue! At the end the mentioned solution worked for me magically.
Good luck
Unloading and loading same project again from the solution does the trick. Just right click on the project and click "Unload Project". Once unloaded, again right click the same project and click "Reload Project". Error highlighting will return.
I had the same issue with 2017. There was a 'disable intelisense' option, make sure that is set to false.
For everyone wondering in 2021..
search for "C_Cpp.errorSquiggles" in the settings.
Make sure to have it active for the user, as well as the workspace.
No need to restart Visual Studio.
For me (VS 2019) , after trying the other answers also, setting the scope of analysis from "Current document" to Open document" brought back the missing error markers
Just go to settings and search for errors and Image in Error Squiggles. You can see the Error squiggles (Modified: Workspace - Right now you can't see it because I modified it). Just click on modified and you will see the disabled option. If by mistake you disabled it, just enable it and you can see the red line errors again in your code.
In latest edition, check for .vscode folder in same project folder. There will be a setting.json file in that. Delete the key value pair of "C_Cpp.errorSquiggles": "Disabled". Restart the vs code.

Resources