Recover deleted files by VisualStudio

Image this: You are working on a new functionality. You open up your IDE and start hacking away. You create several new files, invest your time and effort and then you accidentally delete the wrong file. No problem, that’s what we have Git for, right? But you forgot to add that now deleted file to version control. Aaarrrrggh. There is no way to retrieve that lost file. Bad, bad stupid little programmer. There is one little hack to save you (if you are in Windows): Locate the folder of deleted file and press Ctrl-Z. That will undo your deletion. It …

Continue Reading

VisualStudio has problem when multiple versions of Typescript are installed

You can have several versions of Typescript installed on your machine and each project in Visual Studio can be configured to use different version by specifying that version in .csproj file. Like this But you might still have problems with IntelliSense for some native javascript objects. VisualStudio uses file lib.d.ts  to learn interfaces of window objects, events, etc. This lib.d.ts is updated with each version of typescript you install. When some interface become obsolete, it is removed from lib.d.ts, and VisualStudio then marks usage of such an interface as invalid and refuses to build. Now you have problem. You can either manually update …

Continue Reading

How to set VisualStudio 2015 to always run “as Administrator” in Windows 10

You might have the same problem like me after upgrading to Visual Studio 2015. The project could not be loaded because it depended on IIS and to run IIS it needed administration rights. Solution? Run VS as Administrator. Better still? Make sure that it always runs under administrator rights. Just follow these simple steps 1) Local Visual Studio in Startup menu   2) Right click and select “Troubleshoot compatibility”     3) Select “troubleshoot program” 4) Raise permissions

Continue Reading

How to set default browser in Visual Studio 2010

After every upgrade of Resharper I always encounter the same annoying error: Default browser in Visual Studio is reset to default browser in Windows. I use Chrome but when I need to debug JavaScript I always use Internet Explorer with VS. It’s by all means the best debugging tool for JavaScript I’ve encountered (I know that some people hate MS products, so lets the flame wars begin 🙂 ). One workaround is to right click on any .aspx page and choose “Browse with…” and then set IE as default. But this is not always available. But what if you are …

Continue Reading

StaticExtension not found

I have encountered funny bug/feature when I was writting first xaml file in my new project. I used the StaticExtension the way I was used to… and for some obscure reason it did not work. This is what I typed: <Someclass SomeProperty=”{x:Static SomeOtherClass:SomeStaticProperty}”/> But Visual Studio did not like it and complained that Static is not recognized. I doubled checked project references, compared them with those of last project and did not find anything what could have caused it. After some googling I read that the Static is actually named StaticExtension. The word ‘static’ is just some kind of shortcut. …

Continue Reading