Visual Studio/TFS

POSTSHARP error PS0052: The plug-in "PostSharp.Patterns.Diagnostics.Weaver" was not found

After some merge of source code branches I've got a build error POSTSHARP : error PS0052: The plug-in "PostSharp.Patterns.Diagnos... required by the type "PostSharp.Patterns.Diagnos... was not found. [C:\Builds\\MAIN_Master\Sou... wasn't able to find immediately which code caused the error, and google also didn't give me an answer.After some investigation I found that PSproj file had missing entries for PostSharp.Toolkit.Diagnosti... ......

My favorite Visual Studio tools

Recently I've setup Visual Studio on new machine and I wanted to install a few tools, that I am using all the time.It includes Resharper, GhostDoc(aka ctrl-shift-d) http://visualstudiogallery.... - alternative to VS 2012 pending window ( http://stackoverflow.com/qu... See also my old post Tools to debug/Trace ASP.NET applications.(many of them are outdated already) ......

Error 409 WebServiceBindingAttribute is required on proxy classes. after creating a new build

After creating new build type 32bitDebug (based on Debug) according to How to: Create and Edit Configurations I received the following error during compileError 409 WebServiceBindingAttribute is required on proxy classes. C:\TFS\myProject\SGEN MyAssemblyNameThe instructions from SO answer http://stackoverflow.com/qu... the properties for the project. In the Build Tab. Select "Generate Serialization assembly:" to Off fixed the problem.See ......

2010 version of TF (TFS command tool) unable to determine the workspace that is working with Vs 2012 and TFS 2012

We upgraded to VS 2012 and TFS 2012 a month ago.I have a backupShelve.cmd that used to work before upgrade, but when I run it yesterday caused the errorUnable to determine the workspace. You may be able to correct this by running 'tf workspaces /collection:TeamProjectColl... The backupShelve.cmd file is the following call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86 tf shelve /replace /comment:"Current backup" CurrentBackupMT01 /nopromptpause After some time I've ......

Using PostSharp.Toolkit.Diagnostics, when not all developers have Pro licenses.

We have only couple of developers who are using PostSharp.Toolkit.Diagnostics and having PostSharp Pro license .However ther are much more developers , who are building our solution, but do not required Toolkit.Diagnostics XmlMulticast features, that are referred in %ProjName%.psproj file.As a workaround I've suggested to to replace locally psproj file with dummy, that doesn't have XmlMulticast(PostSharp feature that available only in Pro edition).If a developer doesn't have PostSharp Pro license, ......

Do NOT Change "Copy Local” project references to false, unless understand subsequences.

To optimize performance of visual studio build I've found multiple recommendations to change CopyLocal property for dependent dlls to false,e.g. From http://stackoverflow.com/qu... CopyLocal? For sure turn this offhttp://stackoverflow.com... set the Copy Local property to false and enforce this via a custom msbuild stephttp://codebetter.com/p... ......

"No matching items found in your workspace" error in the TFS build

After creating MS Build Definition for a new branch I've got an error "No matching items found in $/MyBranch/subDir in your workspace, or you do not have permission to access them".I was trying to find any permission issue for a build user, but http://stackoverflow.com/qu... pointed me, that the error was caused by missing mapping.To fix it it's required in Build Definition Edit open Workspace TAB and add folder ......

Specify Linq To SQL ConnectionString explicitly

When modifying Linq to Sql data model in Visual Studio 2010, it re-assigns ConnectionString that is available on developer’s machine. Because the name can be different on different machines, Designer often replace it with something like ConnectionString1, which causes errors during deployment.It requires developers to ensure that ConnectionString stays unchanged. More reliable way is to use context constructor with explicit ConnectionString name instead of parameterless default constructor GOOD: ......

Visual Studio 10 crashed when tried to open one of solutions

Visual Studio 10 crashed when I tried to open one of my solutions. Closing Visual Studio and rebooting the machine didn’t help.The error message that was logged(see below), didn’t give any useful ideas.Finally It was fixed after I’ve deleted MySolution.suo file, which was quite big, and also Resharper folders.Log Name: ApplicationSource: Application ErrorEvent ID: 1000Task Category: (100)Level: ErrorKeywords: ClassicUser: N/ADescription:Faulting application name: devenv.exe, version: 10.0.40219.1, ......

Extract substrings starting with known text from long lines

I’ve received a .csv report from TripWire logs, where each entry is a long text strings.I needed to extract some substring from each row, e.g “ErrorCode: ABC1234” where preceding text is constant, but actual error code could be different. In TSQL I can do someting similar using patIndex and substring, e.g.select text,substring(TEXT,PATINDEX ('%ErrorCode:%',TEXT),10)In C# I can do it using RightAfter and TrimLength from My StringHelperRightAfter(Text... But I was able to ......

Resharper setting to show method usage expanded.

During code analysis my favorite key is Shift-F12 to show usage of method/variable. And after this I needed to expand the list to show each line of usage. Recently my collegue showed me that the results may be expended by default, which is very convenient. To set it select Resharper menu->Options->Search & Navigation->Expand search Results Tree by Default. I wourd suggest to Resharper to enable this setting by default ......

Message during Edit and Continue doesn't give an option to edit.

During my Edit and Continue session I received a message --------------------------- Microsoft Visual Studio --------------------------- Modifying a catch handler around an active statement will prevent the debug session from continuing while Edit and Continue is enabled. --------------------------- OK --------------------------- I would expect that Visual Studio give me option to edit, but stop Edit and Continue or Cancel, but it only disallow edit . I've posted the suggestion to MS Connect Related ......

Generated tests assign enums to enum constructor

When Visual Studio generates tests, for initial value for enums it uses enum constructor. MyClass.TracingMode tracingMode = new MyClass.TracingMode(); // TODO: Initialize to an appropriate value It looks strange. Is it worth to suggest in MS Connect to change the default ......

Visual Studio:"The following breakpoint cannot be set" message

In Visual Studio I’ve started the application with debugging(F5) and then tried to click url in one of the source code comments. After opening URL within VS I suddently start to receive dosens of messages like the following for each breakpoint that I have: --------------------------- Microsoft Visual Studio --------------------------- The following breakpoint cannot be set: At MyClass.cs, line 836 character 6 ('Namespace.MyClass.MyFunct... line 17) Unknown error. --------------------------- OK ......

TFS: how to find checked out files in different workspace

My machine crashed and I wanted to find which files were checked out by me on that machine. It wasn't obvious, but finally I found, that I can search for user. You need to have installed Team Foundation Server Power Tools In Visual Studio- select menu File-Source Control Explorer - Find in Source Control- specify username and it will show all workspaces ......

VS 2010 snippet manager and quickCode

During the last few years I've used QuickCode and it was very helpful. Visual Studio 2010 has Code Snippets Manager that MS finally made quite convenient to use, so I will use it in a future. I will need to convert my QuickCode commands to VS snippets. I am sure I will miss Alt-Q hotkey for some time. Code snippets links: MSDN:Creating Code Snippets TIP:Create New Code Snippets from Existing Ones CodePlex Snippet Editor Codeplex Snippet Designer ......

TFS work items tips

We started using TFS to track requests using Work items. 1. Telerik's TFS Work Item Manager (beta version for TFS 2010 is available) that could be interesting to use instead of standard VS2010, especially for someone who doesn’t want to have VS installed on their machine.(thanks to dimarzionist who pointed to the tool).See also TFS Project Dashboard 2.Visual Studio TFS work item attachments Tab I've found that Outlook emails can be dropped to TFS work item attachments. Just open TFS work item attachment ......

Comment in JavaScript code doesn't comment the server command

Comment in JS code doesn't comment the server command. It is correct, but can be visually confusing. I had the following line in markup ASCX file. // var trs = document.getElementById('&l... %>').getElementsByTagNam... Visual Studio showed it as green comment. However when server control pnlOutsideSearch was renamed, the errors were generated, and it took me some time to realize, what wrong with the line, tha it was look like just comment ......

"The project type is not supported by this installation" for Workflow project

Download from ActivityExecutionContext in Workflows caused "The project type is not supported by this installation" when opened the solution. On my machine I have Workflow only for VS 2008, but not for VS 2005, but the download solution was in 2005 format. I've explicitely started VS 2008 and then converted solution from 2005 to 2008. Error disappeared. Similar problem with Moral: If you are trying to develop with .NET 3.0 maybe it’s a good idea to check that .NET 3.0 is installed first... described ......

Insert new lines in XML text using Visual Studio.

UPDATE: I've recently was adviced that I can use VS command Edit/Advanced/Format Document(Ctrl-K,Ctrl-D) and it does better formating. I 've got XML files as one long string, not formatted. IE explorer shows them nicely with all indentation and ablility to collapse parts. However to edit or compare files using Windiff or Winmerge it will be convinient to have them with short lines, e.g. each element in a new line. Fortunately VS has ability to insert new lines in replace operation. 1.Click Ctrl-H ......

Full Visual Studio/TFS Archive

«November»
SunMonTueWedThuFriSat
2627282930311
2345678
9101112131415
16171819202122
23242526272829
30123456