VSC PS performance - performance

With PS ISE still being indicated as being deprecated and VSC being pushed in its stead, is anything being done about the performance of Powershell scripts in VSC particularly when debugging, which has never been great but is now laughable ?
I have seen other similar question(s) to the above. Is there anywhere that developers can go to try and ask for the resolution of such issues to be given a higher priority ?

The only times I've experienced performance issues with VS Code were while having a laptop with tons of scanners and AVs installed (official company laptop).
They were scanning VS Code and all the changes non-stop and this caused performance issues. I contacted my security department in my company and requested to add VS Code files to the whitelist. That did it and problems never occurred again. I had the same issue with Windows Terminal btw.
BUT what you can do is create an issue in VSC's official GitHub repo: https://github.com/microsoft/vscode explaining your problem with VS Code. It'll be nice to include anything devs request, because maybe there is something in the code that is performance-heavy.
Based on your PS version (if it's > 6.0) you can post an issue here: https://github.com/PowerShell/PowerShell

Related

(Debug) Error In Xamarin App Development (Visual Studio)

The Basics
So I've been working with Xamarin a decent bit recently, and am looking for a solution to a current problem. I've been using the WoWonder script recently, and launched it on a site. i can confirm that the site is working well, without any hiccups. Although I've reworked some of the UI / UX, and basic functionality, I haven't delved extremely deep into it.
I'm currently using the Mobile Timeline applications to link into the network. I've had to debug a decent amount of problems so far with the NuGet packages, syntax errors, as well as authentication / decryption errors. I solved the first two, and solved the last by switching the SSL & TLS options in the Android Options area.
I would normally seek help from the author of said project, but given people in the comments haven't always gotten their answers, and instead got the runaround (Not to mention the broken english), I thought Stack would be the better option.
So far, I've asked around, and looked around, but haven't found anything. This is my last attempt before I start breaking everything down, line-by-line. I haven't found anyone else having a similar problem, other than the Xamarin > WP8 issue.
The Problem
Screenshots:
https://1drv.ms/u/s!Aub_kvZQCqk8ii7fW8ntcn4dxh-W
https://1drv.ms/u/s!Aub_kvZQCqk8ii9Ksd86tPIHLXMo
SideNote: The project does use 'Xamarin Components," and the syntax / order of things is a mess. It's nothing that breaks anything or issues too many warnings, it just parses a lot that it can't find, or isn't relevant / needed / is outdated.
Edit:
It's difficult to copy the context of the error in the emulator, since it doesn't seem to be showing up in visual studio. I'll transcribe it below.
Code Snippet:
System.Net.HttpRequestException: 500 (Internal Server Error) at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()[0x0002a] in <dcbf7ae3bce147228fa58d5bc31257ae>:0 at WowonderPhone.MainPage+<OnLoginClicked>d_2.MoveNext()[0x00252] in <1284583bda884ff38ca175979b310f47>:0
This has since been fixed. It was a problem on the server side, but had to do with the script, as the person previously mentioned. It wasn't a problem with Apache directives, or heightened security, just an inconsistency in the script syntax. Unfortunately, since another person solved this directly, I don't know the exact margin of error.

Xamarin Forms Universal Windows Platform app blocked by AppLocker

There is a question here about this already (though,short of re-installing Windows, which I'm obviously trying to avoid, the other solutions don't work for me), but I have some research to add, and a possible solution... which I don't understand, but perhaps someone here is able to shed light on how to implement it? I'm using Visual Studio 2015 Community on Windows 10 Pro x-64 with Anniversary Update (and latest cumulative update).
There is a possible work-around - details at https://social.technet.microsoft.com/Forums/windows/en-US/2f51398c-cef2-4686-9505-904d3f71ef6d/windows-10-applocker-packaged-app-white-list-blocks-store?forum=win10itprogeneral - where the resolution is to allow all Windows App Store apps, however no steps are given, so I don't know how to do that.
There is a relevant hot fix at https://support.microsoft.com/en-gb/kb/2719305, however that is targetting an older version of Windows, so I'm not sure of the repercussions of trying that. I'm leaving that as my last resort short of re-installing.
And finally, there is re-installing, as per the other thread on here, as the Anniversary Update is considered the suspect (and I'm past the rollback window). I already had the AU when I first tried UWP, so I never had it working to begin with to know if this is the culprit or not. I have never touched applocker myself (had never heard of it) - I have this problem out of the box.
Apart from the time involved, I don't want to re-install as there has been mixed success with it - for one person it fixed it, for another it fixed it initially but the problem came back. I am trying to get a permanent fix (and only re-install if I can't find one).
Anyone know a permanent fix for this? Or how to implement the first suggestion? Or implications of the second?
P.S. for the sake of completeness (and to pre-emptively answer this question), one of the things I already tried is the MS trouble-shooter for this issue (I think I found this one on MSDN from memory). It suggested using my MS login instead of my local user, and to change the temp environment variables back to default (I had them pointing to RAMdisk), but doing those things failed to fix the issue.
Well, I ended up re-installing Windows, having corrupted it along the way, and that ended up fixing the issue. I found along the way that the problem actually stops ALL apps from the store installing (I never did find out how to implement the store fix I mentioned in my question), and that provides a quick way to see if the problem is fixed (rather than trying to build/deploy your UWP app each time you think you've fixed it, just try installing a store app).
I did find something that MAY be a solution, at https://answers.microsoft.com/en-us/windows/forum/windows_8-winapps/this-app-wasnt-installed-error-0x80073cf9/92ec7c44-51ef-4c6a-9331-22958e01b4ec?page=1, which relates to how to recover from a corrupted user profile (I'm not being allowed to upload a snapshot of the relevant reply due to still being relatively new here. Sigh) - which I now believe to have been the cause - however I didn't get to try it out as I'd already corrupted Windows at that point. Note that none of the other solutions in that thread worked for me, so I would start with this one first, as the other solutions only worked for some people. If you have this problem then I would try that first before re-installing.
P.S. at one point it looked like the Anniversary Update may have caused the problem, however after I re-installed I tried before applying the AU, and then again with the AU, and it kept working afterwards,so that was NOT the culprit. It was the user profile/Windows being corrupt.

Waiting for a background operation to complete

I have been suffering from the all too common 'Waiting for a background operation to complete...' message in Visual Studio 2012 (Professional) for a while now but it has been fairly sporadic.
Lately though, I am really struggling to use Visual Studio as pretty much whenever i try and do anything with any Razor views (mostly clicking to move the cursor) visual studio hangs and the above message appears for about a minute at a time.
(If when its finished doing stuff i then click in the view again, the process repeats, and repeats, and repeats.....)
I have searched high and low, and read loads of articles regarding this and peoples suggestions and tried changing indentation settings, resetting settings, etc but none have worked.
Has anyone come across something else that may work as this is seriously impeding my ability to use visual studio and sadly provoking much cursing.
I also had the same issue with VS2012 and unfortunately I had to format my pc after trying all the following solutions:
Move/clean the symbols cache
Reset VS preferences
Install Upgrade 2
Uninstall/Reinstall VS
After formatting and reinstalling VS2012, it started working like a charm again (obviously).
Sorry for that.
I know I asked this question a while back, but I thought best to put up my findings as they may help others.
The exact reason for the Waiting dialog is still unknown, but I have since moved my project to a local disk and implemented Team Foundation server to perform the hosting and backup of the main project files.
Since moving to local disk and using TFS, I have not experienced any more of the VS Waiting dialog.
Check if IIS or another process (BizTalk maybe) is locking your DLLs/references
Kill/stop IIS if it is

Installing a Custom Visual Studio Language Service

I've written a new Visual Studio language service for my software studio's internal scripting language following the directions from a very useful article Writing Your First Visual Studio Language Service. I've got my grammar working great, some simple goto cases up and running, and text coloring. I've done my testing both in the Irony GrammarExplorer and the Visual Studio Experimental Hive, and I feel I'm ready to use it normally in visual studio and deploy it out to a few other programmers for some early testing and feedback.
The problem is I don't know how to install the language service. I have this nice little DLL that works in the Experimental Hive, but no clue how to have it running whenever I start up visual studio. I've looked all over the internet and found that particular step is glossed over everywhere I look. Maybe I'm just blind, or it's much easier than I think it to be, but I'd really appreciate it if someone could give me detailed steps on how to install my language service.
Thanks in advance!
After getting the Tumbleweed badge on here I managed to track down the solution. There were a couple important bits people might find useful.
First off a PLK (Package Load Key) is needed. It can be generated here: http://msdn.microsoft.com/en-us/vstudio/cc655795.aspx
Be sure to make sure that all the information you enter is correct, and is entered into the Assembly for the dll.
The PLK is installed by adding to the rsx file for the solution, usually as item 104, and then matching that item number in the ProvideLoadKey attribute in your code.
Next testing the PLK is a bit of a hassle. Tips can be found here: http://msdn.microsoft.com/en-us/library/bb164677%28v=VS.90%29.aspx I highly recommend first using the /noVSIP switch with the experimental hive right from the start. I found using /log doesn't really help, it's much better to use the Package Load Analyzer once you've installed your package and are still having PLK issues.
A more detailed description from the package load analyzer can be done with this command line:
devenv /command tools.analyzepackage /analyzeargs {your GUID} analyzepkg.txt
Once you're satisfied and ready to deploy, there is a tutorial that seemed more buried than it should be over at MSDN http://msdn.microsoft.com/en-us/library/bb458038%28VS.90%29.aspx
One thing that I found was curious with the RegPkg tool found in the VS SDK bin directory was that it would cause my package to load fine in the development solution it existed in, but would not not load in other solutions. There appears to be an extra step to call devenv /setup which I was missing, and this is taken care of in the deploy tutorial I provided in the previous paragraph through the use of a Custom Action.
Anyway I hope this helps someone running through the same process as me.
One other thing that I spent a couple of hours bumping into that the MSDN tutorial doesn't mention: If you're deploying to a 64-bit computer, the instructions as given won't work. After quite a bit of searching, I stumbled across a posting halfway down this forum thread that explains it: http://social.msdn.microsoft.com/Forums/en/vsx/thread/989c5bea-3dd0-4e60-891a-f8f006e1b9a2
The MSDN tutorial says to install your registry keys here and regpkg.exe generates registry keys here as well:
HKEY_LOCAL_MACHINE\Software\Microsoft\VisualStudio\9.0\...
But on 64-bit computers, Visual Studio loads its settings not from there but from here:
HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\VisualStudio\9.0\...
Notice that extra "Wow6432Node" in there; the registry keys are otherwise identical but for that extra "Wow6432Node" in the path. So on 64-bit machines, you'll either need to use those extended registry keys, or you can install a hybrid 32/64-bit .dll to both sets of registry keys without ill effect. I have a .reg file that installs to both sets of keys, and it works very nicely.
Hope this helps save somebody else some time!
(For what it's worth, I used the "Codebase" mode for regpkg, not the "Assembly" mode.)

MS Team Foundation Server in distributed environments - hints tips tricks needed

Is anyone out there using Team Foundation Server within a team that is geographically distributed? We're in the UK, trying work with a team in Australia and we're finding it quite tough.
Our main two issues are:
Things are being checked out to us without us asking on a get latest.
Even when using a proxy, most thing take a while to happen.
Lots of really annoying little things like this are hardening our arteries, stopping us from delivering code and is frankly creating a user experience akin to pushing golden syrup up a sand dune.
Is anyone out there actually using TFS in this manner, on a daily basis with (relative) success?
If so, do you have any hints, tips, tricks or gotchas that would be worth knowing?
P.S. Upgrading to CruiseControl.NET is not an option.
Definitely upgrade to TFS 2008 and Visual Studio 2008, as it is the "v2" version of Team System in every way. Fixes lots of small and medium sized problems.
As for "things being randomly checked out" this is almost always due to Visual Studio deciding to edit files on your behalf. Try getting latest from the Team Explorer, with nothing open in Visual Studio, and see if that behavior persists. I bet it won't!
Multiple TFS servers is a bad idea. Make sure your proxy is configured correctly, as it caches repeated GETs. That said, TFS is a server connected model, so it'll always be a bit slower than true "offline" source control systems.
Also, if you could edit your question to contain more specific complaints or details, that would help -- right now it's awfully vague, so I can't answer very well.
We use TFS with a somewhat distributed team - they aren't too far away but connect via a slow and unreliable VPN.
For your first issue, get latest on checkout is not the default behaviour. (Here's an explanation) There is an add-in that will do it for you, though.
Here's the workflow that works for us:
Get latest
Build and verify nothing's broken
Work (changes pended)
Get latest again
Deal with merge conflicts
Build and verify nothing's broken
Check in
[edit] OK looks like you rephrased this part of the question. Yes, Jeff's right, VS decides to check some files out "for you," like sln and proj files. It also automatically checks out any source file that you edit (that's what you want though, right? although you can change that setting in tools > options > source control)
The proxy apparently takes a while to get ramped up (we don't use it) but once it has cached most of the tree it's supposed to be pretty quick. Can you do some monitoring and find the bottleneck(s)?
Anything else giving you trouble, other than get-latest-on-checkout and speed?
From my understanding you can have multiple TFS Application servers in different locations. They either can both talk to the same SQL Server or you could use SQL Server mirroring. Having your own local TFS server would likely speed up your development times.

Resources