Python Triple Quoted Strings in Visual Studio 2010 - visual-studio

I'm used to using Idle for Python development, but decided to give Visual Studio 2010 + IronPython a try last week. It seems to work fine, but I noticed that triple-quoted (multi-line) strings don't highlight correctly in the editor. See photo:
Does anyone else have this problem or know of a good fix? Apart from that bug, Visual Studio seems to be great for Python.

This is a bug that is already fixed for the next release - I screwed up storing our state while processing line-by-line when fixing another bug.
If you're really anxious you can actually build the MSI which includes the tools from the sources on CodePlex. Once you have the VS SDK installed it should be as simple as running Scripts\Bat\Dev.bat to setup the enlistment environment and then msbuild Msi\Installer.proj which will produce an MSI in Bin\Debug.

Related

What is background build in Qt VS tools

Relates to Error while using Qt in Visual Studio 2019
I have the same error. Unfortunately I cannot still fix it, as Qt VS Tools for VS 2015 aren't updated. But my question is not how to avoid background build.
My question: what is background build?
Oh, I believe you are running into the 32767 names for this.
Let me preface this by stating that 2015 may have been the last time I used Visual Studio or developed anything for a Microsoft platform.
Part of your answer is in this discussion.
I believe the latest (or more current) name for "background build" is "live code compilation."
This is a resource robbing, highly annoying, syntax checking thing Microsoft thought would be great. It ranks right up there with Microsoft Clippy as far as tragic ideas go.
Basically, as you type, visual studio tries to build your stuff, puts squiggles under errors and generally consumes a whole lot of resources.
If you are using that Qt plug-in to build a QMake project this can cause all kinds of hardship, especially when you have UI files that need to MOC compile and are in the designer modifying the .UI file.
Whatever version of Visual Studio I was forced to use for that project, the first thing I did was find out how to turn that off.
Qt appears to not play well with Visual Studio it seems.
Here is a more complete description if you happen to have the plug-in.
BuildOnSave is an extension for Visual Studio 2019 and 2017 that
builds the current solution as soon a file is saved, and in
combination with the the extension SaveAllTheTime, enables a live,
background build experience while you type.

How do I add versions to “Visual Studio Version Selector”, my list is empty

I have VS 2008, 2010, and 2012 installed.
Initially, VS2013 Team Explorer was installed (Shell only). I uninstalled that.
Now, the Visual Studio Version Selector shows an empty list when executing a .sln file. Nothing shows.
How can I repopulate this list? Where is it stored? Registry? I tried to find entries, but since it doesn't actually have any items in the list, I couldn't search for a specific string.
I just encountered the same issue after installing Visual Studio 2015 parallel to an existing 2013 installation. In my case it turned out that that the problem was related to the solution file itself: It seems that the version selector does not like BOMs etc. (don't know how the solution got crippled, though). Make sure that the solution starts with
Microsoft Visual Studio Solution File, Format Version 12.00
and has no space, non-printable character etc. before that. After saving the file, the effect should be immediately visible with the correct icon returning.
I just ran into a similar problem where this dialog started popping up after a recent Windows Update (Win10) on 1/6/2018. That update caused all sorts of havoc in terms of broken file associations.
I tried searching for solutions and trying a few things but everything was overly complicated and messy.
My solution was to run the Visual Studio (2013) repair.
After the repair, I did receive a warning (from vs installer) about update 3 failing to update but I restarted the computer and sln files can now open without needing that version dialog. Everything seems to be compiling and running fine as well.
Just ran into this situation for VS2017 then I realized I have unfinished updates for Visual Studio when checking Visual Studio Installer.
The installer displayed a hint that I should restart my computer to complete the update and after doing so, the version selector works again.

Are there any functional differences between a VS2012 and VS2013 Solution?

The title of this question probably seems a bit convoluted so let me explain it in more detail.
I work for a company that has recently requested that all their pre-VS2013 Projects and Solutions be upgraded to VS2013. During my initial upgrade tests I noted that some of the solutions prompted for an Upgrade to be functionally sound under VS2013.
These Solutions/Projects typically launched the Migration Wizard and presented the message that non-functional changes to the Project were required to run under VS2013 and as long as there were no errors present afterward, the Projects compiled and ran without any issue.
While there were other VS2012 Solutions/Projects that displayed no dialogs whatsoever and simply ran under VS2013 without issue.
My initial presumption was since the latter mentioned Projects weren't identified by VS2013 as having any components that required alteration for the upgrade; that they were simply upgraded behind the scenes, compiled without error and simply ran.
But after a short conversation with the Company Supervisor and a peek at the Solution files, it appears that those Solutions are still configured for VS2012 and not VS2013.
Below are a few lines of code from each Solution File:
VS2013 Solution File
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.30110.0
VS2012 Solution File
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
As you can see the VS2012 Solution File indicates # Visual Studio 2012 while the VS2013 Solution File shows # Visual Studio 2013 with an additional line appended to the file stating VisualStudioVersion = 12.0.30110.0
So the real question/concerns here regarding this migration effort are:
Is there any way to FORCE a VS2012 project to VS2013 as opposed to simply opening the project/solution under VS2013
Are there any potential caveats that should be taken into consideration when at some point VS2012 becomes outdated/deprecated by Microsoft? E.g. If tomorrow VS2012 were to become obsolete would there be potential areas of concern for these types of Projects running in a Production Environment?
The targeted goal is to have all our Projects and Solutions migrated to and running under VS2013 for continuity of the environment and simply do away with any Pre-VS2013 items.
Thanks
The ability to open projects created in earlier VS versions without converting them was first added to VS2012. By popular demand, moving to a new VS version could be pretty painful if not all members of a team migrated at the same time.
There is no point about fretting about this, VS2013 just doesn't have any trouble opening and saving projects like this. Nor does it have a way to force the conversion. In the olden days it could be done by running devenv.exe with the /upgrade option. Not sure if that still works, you'd have to try. I've seen SO users recommending editing the project file, I do not think that's a good idea.
It will automatically prompt you for an upgrade when you add any feature that wasn't supported in a previous release. Hard to come up with examples of that for VS2013, beyond Windows Phone 8.0 projects, VS2013 is a relatively minor increment from VS2012.

Visual Studio text editor does not recognize F# source?

I have got the following problem with F# code recently: almost the complete code is underlines with curly red lines (indicating problems) and whenever I hover with the mouse cursor over any word the pop-up appears with the message "Unexpected token". IntelliSence doesn't work either.
Nonetheless if I start the project it is executed without any problem.
This happens both to already existing F# files and to newly created F# projects. I remember it was working just 2-3 months ago!
I tried to deactivate all possible extensions but it doesn't help.
Any ideas?
I get this too. Sometimes, simply exiting and going back into VS helps. When I tweeted the problem, Don answered with this:
"do you have "python tools for visual studio alpha" installed? if so, uninstall it or apply the hot fix"
This wasn't relevant to me (as I haven't been anywhere near python) but I'm posting here in case it helps you.
-- Edit: here's a link to the patch, thanks to Alexander Galkin: http://pytools.codeplex.com/workitem/599
I haven't seen this situation before but here's a guess at why it's happening and how you might cure it.
Visual studio works on a system for plugins. Even the stuff that is "native", like the C#/F#/VB.NET project systems, are just plugins that uses the visual studio shell. It looks like the F# plugin has been damaged in someway.
If this is Visual Studio 2010:
You might try opening the visual studio installer and trying a repair installation or deactivation and reactivating the F# project system
If this is Visual Studio 2008:
You might try uninstalling and reinstalling the F# plugin

Pex and F# in Visual Studio 2010 Ultimate

I have been trying using Pex in a F# project but I have faced several issues on which I would appreciate some help:
Visual Studio Pex addin worked for half an hour and not for complex project exploration.
After that each time I run a Pex Exploration from within Visual Studio 2010 I get a !warning! [metadata] no explorations found after applying all filters; did you forget a [PexClass] or [PexMethod] attribute? error message. If I copy and paste the command run by visual studio when doing the exploration and remove some attributes (like sourceFilter ...) and run it from a command console then I get some generated tests. Any idea why visual studio generates an invalid command?
After a while the Microsoft.Pex.Framework.dll either disappears from the .Net Reference list and I have to reference it manually using its file path or I can't even reference it any more and I have to uninstall/reinstall Pex. (A reference to C:\Program Files (x86)\Microsoft Moles\PublicAssemblie\Microsoft.Pex.Framework.dll could not be added. Please make sure that the file is accessible, and that it is a valid assembly or COM component.)
All these issues don't occur when I work on a C# project.
Issues 1 2 3 occurred with the Academic version.
Using the version available for MSDN Subscriber I never got it working within visual studio (Visual Studio 2010 Ultimate NO SP1). However it worked from the command prompt. I did not face problem 3 with this version.
Has anyone managed to get Pex working with F# within visual studio ? If yes can you you tell me how you did it ? Which versions (VS and Pex) do you use ?
I have had some success running Pex with F#. The version I used, if I believe my Downloads folder, was the academic version of Microsoft Pex and Moles 0.94.51006.1 Release for (x86). The installation file was named pex.academic.x86.msi.
I don't know if that version predates yours.
My impressions from my trials were that Pex and F# were not a very good combination: Pex insisted on creating test cases with null inputs. As generating null values in F# isn't all that common, that's typically not the scenarios in which I'm interested. Adding lots of assumptions to eliminate those just left me with Pex not being able to generate test cases. Admittedly, the functions I was testing were too complex, I still like the idea behind Pex and might try it again on smaller/easier pieces of code.
Using Pex and its GUI inside VS 2010 worked relatively fine, but not without frustration.

Resources