Skip to main content

Posts

Showing posts with the label VS 2010

Visual Studio solution files backward compatible?

Last week a colleague asked me if it was possible to open a Visual Studio 2012 solution file in Visual Studio 2010? The answer is  “it depends’' : Starting from VS 2010 SP1 you can switch between Visual Studio versions without having to go through the annoying conversion/migration process. However this is only true if you are using a compatible framework version and that all the project types in your solution are supported.

Help! The Microsoft BIDS are gone?!

After doing a clean install of my pc I also wanted to install the BIDS(=Business Intelligence Designer Studio) to start some Microsoft Report Services development. But I couldn’t find a version for Visual Studio 2012? So where did it go and how should I develop SSIS, SSRS and SSAS stuff using VS 2012? I discovered that with the 2012 release of SQL Server, the BIDS plugin for Visual Studio was renamed to SSDT, SQL Server Data Tools. SSDT is available for both Visual Studio 2010 and 2012. You no longer need the SQL Server installation media to install it but instead you can just download it from the Microsoft Download Center : You can use this version of the Data Tools to develop applications for both SQL 2008, SQL 2008 R2 and SQL 2012(and of course SQL Azure). After installing it, some new templates are added to your Visual Studio:

Visual Studio: Speed up your build time

One of the options that people overlook in Visual Studio, is the ability to build multiple projects in parallel. This can give you a huge improvement in build time, so it’s certainly a good idea to try to change this number. You can find this option under Tools –> Options –> Projects and Solutions –> Build and Run :

Team Foundation Server: Map different branches to the same folder using the SAK

Last week when giving a Team Foundation Server for Administrators course, I got a great tip from one of the students(thanks Guy!). Let’s first set the scene and explain the situation. For every release they make a new branch is created(and they do a lot of releases). By default every branch is mapped to a different folder so if you don’t clean up your workspace you end up with lots of folders each containing a specific (released) version of the source code. Because they only need one release on disk at a time, they decided to update the workspace mapping to put the active release in a ‘Release’ folder on their local disk. So with every new release, they update the mapping and map a different release to this ‘Release’ folder. Everyone is still with me? Now the problem is that when they try to load the solution in the release folder, Visual Studio gets confused and gives the following message: There appears to be a discrepancy between the solution's source control information ab...

Get rid of the ‘Missing XML comment for publicly visible type or member’ warning

For a long time, I had the (good?) habit to document all my public API’s. But keeping the documentation up-to-date has always been a long and boring task. After a discussion with my fellow developers, I decided to stop adding documentation. Most developers said they don’t look at the documentation but just read the code or  have a look at my unit tests to understand what’s going on. After removing all the documentation, I’m left with a long list of warnings inside my application complaining about ‘Missing XML comment for publicly visible type or member’ .  How to remove these warnings? There are 2 ways to remove these warnings: Turn off the comment generation: Go to the Project properties(Right click on your project and choose Properties from the context menu) Go to the Build tab Uncheck the XML documentation file checkbox Repeat this for every project in your solution Disable the warning: Go to the Project...

Visual Studio: Reference a different DLL depending on your build configuration

For a Windows 8 application we are building, we have to deploy versions that connect to different backends. We could have created different branches  but this would result in lots of merges. Instead we decided to go for a provider model combined with conditional compilation symbols. This allows us to easily switch between providers by changing the build configuration. This brought us half way there but we had still an issue because we also had to use a different 3th party component depending on the backend. So what we actually want is that when setting the build configuration to QA, the 3thparty.component.QA winmd file was loaded and if we switch to Production the 3thparty.component.Production winmd file was loaded. This is perfectly possible by changing the project file and editing the underlying MSBuild settings: Unload the project. Choose Edit project and open it using the XML editor. Find the reference to the component you want to change depending on the build configurati...

Coming soon(hopefully): TfPlugable, a solution to dynamically deploy plug-ins for TFS

Team Foundation Server always offered a rich extensibility model. It is very easy to create your extensions. The only problem was how to get these extensions to your users. But this can change… Martin Hinshelwood started the idea to simplify this process(think ‘NuGet for Team Foundation Server Extensions’). These are the key integration points he wants to cover: TF Job – These jobs can be schedules or one off and run within the context of the TFS Server Itself. They are a compiled DLL that has to be deployed to a particular folder on the TF Server in order to be loaded and registered with TFS. TF Event Sink – Events are fired on the TF Server as a result of Work Item, Build, Source Code changes and implement the ISubscriber interface. Again they need to have the containing DLL dropped into the correct folder on the TF Server. Custom Controls – Sometimes you want to extend the UI of work items capability to display data and this requires both server side and client ...

Hosting your own NuGet feeds

There are multiple ways to host your own NuGet feeds: Using a fileshare Using MyGet Using the NuGet server package Using the NuGet Gallery  code Hosting your NuGet feeds using a fileshare This is probably the easiest solution. Just create fileshare on a server somewhere and put all your packages on this share. This approach has one big disadvantage, it becomes rather slow when the number of packages grows. Hosting your NuGet feeds on MyGet MyGet , also known as ‘NuGet as a Service’ allows you to create and host your own NuGet feed. It allows you to include packages from the official NuGet feed or upload your own NuGet packages. It offers lots of nice features and best of all if you don’t need private feeds, it’s free! Hosting your NuGet feeds using the NuGet server package This option needs a little bit more work. Create an empty ASP.NET MVC(or WebForms) project. Download the NuGet.Server package from the official NuGet feed. This will ...

WebDeploy error: System.UnauthorizedAccessException: Attempted to perform an unauthorized operation.

When trying to deploy a web application from Visual Studio, it failed with the following error message: This error message didn’t help much so I logged on to the server where I found the following error info in the Event log: User: Client IP: 10.1.210.31 Content-Type: application/msdeploy Version: 9.0.0.0 MSDeploy.VersionMin: 7.1.600.0 MSDeploy.VersionMax: 9.0.1631.0 MSDeploy.Method: Sync MSDeploy.RequestId: 3e4d3744-90cf-4c95-85c9-28eb30970c3e MSDeploy.RequestCulture: nl-BE MSDeploy.RequestUICulture: en-US ServerVersion: 9.0.1631.0 Skip: objectName="^configProtectedData$" Provider: auto, Path: A tracing deployment agent exception occurred that was propagated to the client. Request ID '3e4d3744-90cf-4c95-85c9-28eb30970c3e'. Request Timestamp: '8/01/2013 11:41:32'. Error Details: System.UnauthorizedAccessException: Attempted to perform an unauthorized operation.    at System.Security.AccessCon...

Visual Studio Extensibility: Configure Custom Tool in an ItemTemplate

Last week I created a Visual Studio custom tool to encrypt configuration files(more information about the process here and here ). To simplify the usage and improve the discoverability I also created a custom Item Template. But how can I automatically set this custom tool when a new item is created? Open the .vstemplate-file. Add a WizardExtension-node to the XML file: Afterwars specify a CustomTool attribute on the ProjectItem:

TFS API Blog Series

Since 2009 Shai Raiten is writing about TFS API making his blog one of the best resources for any information about customizing and extending Team Foundation Server. This resulted in a long list of blog posts: Basic TFS API Part 1: Domain Picker TFS API Part 2: Domain Picker Using Registered Servers (Cache) TFS API Part 3: Get Project List Using ICommonStructureService TFS API Part 4: Get TFS User List (Mail, Sid, Account, Domain) TFS API Part 7: Use IEventService To Get User Event Subscriptions TFS API Part 8: Subscribe/Unsubscribe Events Using IEventService TFS API Part 12: Set Security For Area/Iteration TFS API Part 13: More About Connecting TFS (Custom Credentials, Prompt) TFS API Part 20: Bye TeamFoundationServer and Welcome TfsTeamProjectCollection TFS API Part 25: Get TFS User List (Mail Sid, Account, Domain) – TFS 2010 TFS API Part 29 – TFS Impersonation TFS API Part 32 – Add and Remove Users From Application Groups Sou...

Team Foundation Server Source Control Explorer Extension

Last week when searching for an easy solution to delete some files from the TFS database, I found the following Visual Studio Extension: TFSSCExplorerExtension . “TFSSCExplorerExtension (Team Foundation Server Source Control Explorer VS 2010 Extension) is  aVisual Studio 2010 Extension Package that adds new features to the TFS Source Control Explorer window for TFS 2010 . ” A separate release is available for Visual Studio 2012 here . It offers the following features: Move to Folder: Move support for multiple files. Branch to Folder: Branch support for multiple files. Merge from Sources: Select items to Merge. File Icon Change: Branched files are shown with a different icon. Drag & Drop: Adds drag & drop support between file list in the left side and folder tree in the right side. Show/Hide deleted items: Quicker alternative then going to Tools – Options. Destroy: Permanently removes files or folders from Source Control. ...

Installing the Web Deploy 3 publish components for Visual Studio 2010

I talked about some of the great features of Web Deploy 3 before. But how do you get the new publishing experience in Visual Studio 2010? It took me some to figure out what software should be installed. You’ll need the following component: Web publish 1.1 forVS 2010 The easiest way to get this software is by using the Web Platform Installer. Download it here or open it if you already installed it before. Go to the Products tab and search for Microsoft Web Publish 1.1 for Visual Studio 2010. Click on Add and start the installation by clicking Install. Once the installation has completed, you’ll see the new and improved Web Publishing wizard when you click Publish in a web application.

Need help to remember Visual Studio Shortcut Keys: IntelliCommand

For a developer being productive in it’s development environment is of the uppermost importance. One thing to make you more productive is knowing all(or some) keyboard shortcuts. Before I printed out the Visual Studio keybinding posters , but now I found a better alternative:   IntelliCommand . From the Visual Studio Gallery : “IntelliCommand - an extension for Visual Studio 2010 and 2012 which helps to find the short keys. It shows the help windows with all possible combinations when you press Ctrl or Shift or Alt or their combinations (hold it for about 2 seconds to see this window). Also it shows the list of possible combination when you press first combination of chord shortcut keys, like Ctrl+K, Ctrl+C (this combination comments selected text in editor).” Intelli Command shows all available shortcut keys for combination of Control + Shift after couple seconds: Ctrl+K was pressed. Visual Studio waits for second combination:

Show deleted items in Visual Studio Team Foundation Source Control

By default when you delete an item from TFS source control, it’s not really deleted. Instead it’s marked as deleted and no longer visible in source control but it’s not deleted from the TFS database. (If you really want to delete something from the database, you can use the TFS Destroy command . But what if you want to “undelete” a deleted item? To allow this, we first have to show those deleted items in Source Control Explorer. Inside Visual Studio, go to “Tools-Options”, select “Source Control-visual Studio Team Foundation Server” and check the “Show deleted items in the Source Control explorer”.

Visual Studio 2012: Design Patterns UML diagrams

Last week I discovered this great Visual Studio extension: Design Patterns UML Toolbox Provides Visual Studio 2012 UML toolbox items representing the majority of the Gang of Four design patterns. The patterns are split into Creational, Structural and Behavioural sections, and includes a supporting UML profile. The extension adds new toolbox items to the UML toolbox. More information: Visual Studio Gallery Codeplex site Blog post by Giles Davies

Team Foundation Server 2012 and Visual Studio Compatibility

After upgrading our internal Team Foundation Server environment to the 2012 version, I got a lot of questions from our development teams about compatibility with different Visual Studio versions. To help them(and you) here is the compatibility matrix(the full matrix for all TFS versions is available here ): Clients and tools Team Foundation Server 2012 Visual Studio 2012 or Team Explorer 2012 Yes Visual Studio 2010 or Team Explorer 2010 Yes (1) Visual Studio 2008 or Team Explorer for Visual Studio Team System 2008 Yes (2) Team Explorer for Visual Studio 2005 Team System No (3) Team Web Access for Team Foundation Server 2010 Not applicable Team Web Access for Visual Studio Team Foundation Server 2012 Yes MSSCCI 2008 No MSSCCI 2010 No MSSCCI ...

TF30172: You do not have permission to create a new team project.

Last week a colleague tried to create a new team project on our freshly installed Team Foundation Server 2012 environment. But when he choose the Add new Team Project option from Visual Studio 2010, he got the following error back: TF30172: You do not have permission to create a new team project. Don’t be fooled, this error has nothing to do with security. So don’t go check all your permissions, it will not help. Instead open up Team Explorer 2012(or Visual Studio 2012) and create the new project from there. That’s it!

Caliburn.Micro: Design time support

WPF and Caliburn.Micro are a powerful combination. You create a viewmodel and related view, name your controls appropriately  and all magic happens automatically. Controls are bound to the View Model’s properties and methods for you. The problem is that it is all happing at run time not at design time. So when you are developing inside Visual Studio or Expression Blend you aren’t able to see how the form will look like with bound data. Caliburn.Micro supports design-time binding out-of-the-box. How can we configure this? In the constructor of my ViewModel, I check if we are executing in design time: public class SampleViewModel : Screen { public SampleViewModel() { if (Execute.InDesignMode) LoadDesignData(); } } In this sample I populate my ViewModel with some sample data at design time. private void LoadDesignData() { this.Sessions.Add(new ProfilerSessionViewModel() { Id = Guid.NewGuid(), Duration = "30ms", Name = "Session 1", Started = Dat...

Disable NuGet Package Restore

Enabling the NuGet  package restore feature is easy. Just right click on your solution inside Visual Studio and choose the 'Enable NuGet Package Restore' option. However what if you want to disable this again? I couldn’t find an option to do this, so let’s investigate all the changes that this option made. First it added a .nuget folder containing a nuget.targets file and nuget.exe. So we’ll start by removing this folder and all its content from your solution. Second it added an import to this target file to all your projects that are using NuGet packages. To remove this import right click on each project and choose unload project. Right click then on the csproj file and choose the Open with… option from the context menu. Choose the XML editor to edit the file. Browse the following line and remove it from the csproj file: <Import Project="$(SolutionDir)\.nuget\nuget.targets" /> We are not there yet. There is one other change that is done to your pro...