Showing posts with label visual studio. Show all posts
Showing posts with label visual studio. Show all posts

Thursday, November 03, 2016

Solving the error "We could not add the account: network_not_available: The network is down so authentication cannot proceed" when trying to sign into Visual Studio

This has been driving me nuts for years. The solution, as it turns out, is ridiculously simple: at the top right of Visual Studio, go to your signed in account => Account Settings ...

On the dialog that pops up, sign out of all accounts and close the window.

While signed out, close and restart Visual Studio.

Sign in again with your accounts. You should be good to go.

Apparently signing out and closing Visual Studio is the only way to truly clear its credential caches. Fuck.

Solving the error "We could not add the account: network_not_available: The network is down so authentication cannot proceed" when trying to sign into Visual Studio

This has been driving me nuts for years. The solution, as it turns out, is ridiculously simple: at the top right of Visual Studio, go to your signed in account => Account Settings ...

On the dialog that pops up, sign out of all accounts and close the window.

While signed out, close and restart Visual Studio.

Sign in again with your accounts. You should be good to go.

Apparently signing out and closing Visual Studio is the only way to truly clear its credential caches. Fuck.

Solving the error "We could not add the account: network_not_available: The network is down so authentication cannot proceed" when trying to sign into Visual Studio

This has been driving me nuts for years. The solution, as it turns out, is ridiculously simple: at the top right of Visual Studio, go to your signed in account => Account Settings ...

On the dialog that pops up, sign out of all accounts and close the window.

While signed out, close and restart Visual Studio.

Sign in again with your accounts. You should be good to go.

Apparently signing out and closing Visual Studio is the only way to truly clear its credential caches. Fuck.

Tuesday, July 15, 2014

Making TFS builds consistent with desktop builds when invoking MSBuild directly on a .*proj file

As it turns out, MSBuild has more than a few quirks when being invoked through TFS compared to being invoked through a command line or from Visual Studio. Some of them are pretty well documented. Others are not, like the fact that in a .*proj file, the OutDir variable is inherited to sub-MSBuild tasks.  There's also quirks because OutputPath is used to determine OutDir, but not in all cases. If you're going to specify OutputPath in the properties when invoking the MSBuild task, you should also explicitly override the OutDir variable as well to ensure consistency, unless you **TRULY** understand the differences between the two and how MSBuild determines OutDir, and you **REALLY** want it to be that way.

Thursday, August 08, 2013

System.ArgumentException: Unable to find the requested .Net Framework Data Provider when using SQLite with MSTest unit tests in Visual Studio 2012

I recently encountered the exception in the post title while migrating solutions from Visual Studio 2010 to Visual Studio 2012. Going back and forth between versions, the problem only occurred for me in Visual Studio 2012, it otherwise did not appear in 2010. I ran across this post on StackOverflow about another developer in a similar circumstance, but I didn't want to depend on whatever machine I was using having the SQLite Db Provider installed in the GAC, so I chose a different route: I added [DeploymentItem]s for each of SQLite.Interop.dll, System.Data.SQLite.dll and System.Data.SQLite.Linq.dll to the top of each of my test suites that require them.  It's perhaps not an ideal solution, but it does seem to be the most pragmatic one for my circumstances.

Tuesday, March 05, 2013

Getting error message with XSD MSBuild task

Lately I've been getting the error message :

error MSB4018: Microsoft.Build.Shared.InternalErrorException: MSB0001: Internal MSBuild Error: xsd.exe unexpectedly not a rooted path

... while I've been building a project that uses that task in a pre-build step to generate code from XSDs. After googling around a little bit, I found the solution on this page. The gist of it was that xsd.exe wasn't in the PATH variable, and therefore Visual Studio couldn't find it. If anybody else has this problem, add this folder to your PATH:

C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\NETFX 4.0 Tools

... or your system's equivalent, wherever the XSD.exe tool is stored on your system.

Tuesday, December 22, 2009

Visual Studio (2010?) Debugging Gotchas - Part I

I recently ran across a problem where I was trying to debug some code and the Visual Studio debugger wouldn't stop in my class. It would stop in the test class from which I was debugging, but not the class I really wanted to debug. I looked on the breakpoint and noticed that it was transparent, so I hovered over it to view the tooltip, and the tooltip informed me that my class had a DebuggerStepThroughAttribute assigned to it. My first thought was "what ? that's bullshit", and then it occurred to me that I hadn't looked at the rest of the (partial) class which was defined in another file that was generated from an XML schema by xsd.exe. Sure enough, xsd.exe places DebuggerStepThroughAttribute attributes on the classes it generates. Why is this default behaviour ? This was an annoying as hell bug that took time out of my day that's better devoted to other things, like being productive so that I don't get shit from my boss. It also took more time than I'd care to admit to, largely due to my inexperience with Visual Studio and .NET. I've had yet to see anything like this coming from a Java / scripting background.

Tuesday, November 10, 2009

Tweaking visual studio

I've recently begun using Visual Studio 2010 Beta 2 more and more as I have increasing amounts of work that require .NET. In order to keep things nicely tabbed the both I and my boss like it, there's a setting that can be set according to instructions founds here : http://mhinze.com/tabs-whitespace-visual-studio/

Monday, August 27, 2007

I love Eclipse now more than ever

Eclipse has always been a very useful platform, with tons of little developer driven quirks that make the programmer's job so muche easier. I found this out especially lately when I've been trying to get into developing with C# in Visual Studio 2005, and I've been missing features that are just there in Eclipse, but you have to buy a plugin for with VS2k5. And here's the great thing about that whole situation : you can develop C# in Eclipse on Windows with a free plugin. But that's really all just a side note. The main point of this post is this : I just now observed an exceedingly useful feature that's been in Eclipse for several versions. Ever press Ctrl + Shift + T to open the quick loader for classes ? It has a text bar at the top so you can type in the simple name of the class you're looking for and it'll filter out the results. In the filtering options up top, there's the usual ? and * filters, but beside that there's also a spot that says "TZ - TimeZone" which I've never really noticed before, and I don't know what made me notice it today. I typed in TZ, and much to my surprise, a whole list of classes remained in the window, filtered, and they all had TZ capital letters in them, following the general naming conventions in Java. Intrigued by this, I typed in MPREF (ManualPaymentRequestEntryFlow) which is a class in my project that I just finished working on, and sure enough, it filtered the list to have that in it (it was the only class not filtered out) . I thought that was just the greatest filter I'd ever seen. And to build on it, if you use the content assist hotkey (Ctrl + Space) with the same scheme, it automatically fills in those classes for you. How cool is that !?