Showing posts with label Visual Studio 2012. Show all posts
Showing posts with label Visual Studio 2012. Show all posts

Friday, May 15, 2015

Setting up MSBuild as an External Tool in Visual Studio

If you want to use MSBuild as an External Tool for your MSBuild files, fortunately, this is very easy to accomplish in Visual Studio.

  1. From the Tools menu, click External Tools
  2. When the External Tools dialog displays, click on the Add button
  3. Type in MSBuild (32-bit or 64-bit respectively) and point to the location of your MSBuild executable
  4. For the Arguments, select "Item Path" from the list of available arguments by clicking on the ellipsis (...) button
  5. Check the checkbox for "Use Output window" and "Prompt for arguments"
  6. Click on the OK button
  7. MSBuild will now display as an External Tool listed in your Tools menu
  8. Whenever you want to run your MSBuild (.proj) file, you simply open the MSBuild file and select the External Tool from the Tools menu.
  9. That is all there is to it!!
 The locations of MSBuild for the respective versions of Visual Studio are the following:

Visual Studio 2012:  C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe, C:\Windows\Microsoft.NET\Framework64\v4.0.30319\MSBuild.exe

Visual Studio 2013:  C:\Program Files (x86)\MSBuild\12.0\Bin\MSBuild.exe, C:\Program Files (x86)\MSBuild\12.0\Bin\amd64\MSBuild.exe

Visual Studio 2015:  C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe, C:\Program Files (x86)\MSBuild\14.0\Bin\amd64\MSBuild.exe











Sunday, March 8, 2015

Visual Studio Help on DVD

It has been years since Microsoft stopped shipping MSDN DVDs with Visual Studio or even providing the MSDN Help ISO Images on the MSDN Subscriptions site.

However, believe it or not, the MSDN DVD/ISO Images still exist!

I actually found this little tidbit from the Help menu in Visual Studio 2013 under "Order Help on DVD".

Clicking on this link takes you to this site which allows you to download the Visual Studio Help in the form of an ISO Image: http://www.microsoft.com/en-us/download/details.aspx?id=34794

You can download an ISO image either for Visual Studio 2012 or Visual Studio 2013!!

This is a handy dandy feature if you want to install the MSDN Help locally rather than having to search for it on the Internet.  I used to do this frequently until Microsoft stopped shipping the MSDN Documentation ISOs.

It is good to know that I still have that option available to me after all these years!!

Friday, January 9, 2015

Identity and Access Tool for Visual Studio 2013

If you have been working with Windows Identity Foundation in the past, you may have known about the Identity and Access Tool that was available with Visual Studio 2012 (that was previously available through the Windows Identity Foundation SDK in Visual Studio 2010).  You could download the Identity and Access Tool from Visual Studio Gallery here: https://visualstudiogallery.msdn.microsoft.com/e21bf653-dfe1-4d81-b3d3-795cb104066e

However, if you check Visual Studio Gallery, you will notice that there is no update for the Identity and Access Tool for Visual Studio 2013 even though several features/functionality are missing in the Visual Studio 2013 release that were previously available through the Identity and Access Tool extension.

According to another article, Microsoft is aware of the deficiencies in Visual Studio 2013: http://bartwullems.blogspot.com/2013/11/visual-studio-2013-where-is-identity.html

Therefore, if you are continuing to develop with Identity-based solutions that require Claims authentication, for the time being, you are forced to use Visual Studio 2012.

In addition, you can vote for this UserVoice item so that hopefully Microsoft includes this functionality in a future release of the Visual Studio IDE:

Thursday, May 1, 2014

Manually unbinding a Visual Studio Solution from Source Control

 

If you have ever downloaded a Visual Studio solution from the Internet that was bound to source control, you may know that by default, the solution will always try to open with connections to the Source Control Provider. 

In some cases, Visual Studio may offer you an option to remove the source control binding, but in other cases, it may fail to load the solution altogether!

Well, fortunately, there is an easy way out of this situation.  However, it requires a bit of manual editing to remedy this situation.

  1. If the project is already unloaded in Visual Studio, right click on the project file and select “Edit MyProj.csproj”
  2. Now when you open up the project file, you should see some XML elements that begin with Scc
  3. Delete all of the Scc elements and save the file
  4. Now, when you open the solution, the project should be unbound from source control and you should be able to work with the solution file again!
<SccProjectName>SIM Example</SccProjectName>
<SccLocalPath>1~11fc7323-753a-426e-8db0-537b3138b51d</SccLocalPath>
<SccAuxPath>http://localhost/VaultService</SccAuxPath>
<SccProvider>SourceGear Vault Visual Studio 2005 Client:{7BE9CE03-56BF-4682-9C06-78C68B134B30}</SccProvider>

Sunday, December 1, 2013

Differences between One ASP.NET MVC and ASP.NET MVC 4 Project Templates

As many of you know, Visual Studio 2013 began shipping a new template with .NET Framework v. 4.5 called "One ASP.NET".

This template basically allows you to pick and choose which ASP.NET Web Technologies you would like to use within your solution:


However, if you are used to the available MVC Templates that shipped with ASP.NET MVC 4 in Visual Studio 2012, you will notice that there are far fewer options to customize your MVC project!


Of course, you can still access these from beneath the Web-->Visual Studio 2012 section in Visual Studio 2013, but this is certainly one of the limitations with using the One ASP.NET Project Template.


 If you are looking to build an MVC Mobile Application, this is one definite project template that you will miss!

Tuesday, November 19, 2013

Generate Unit Tests is back in Visual Studio 2012/2013!

As you may recall, Visual Studio 2010 offered the ability to generate Unit Tests from a given block of code.

Of course, this was limited to the MSTest Unit Testing framework, therefore, when Microsoft released Visual Studio 2012, they decided to remove this capability since they began offering support for additional Unit Testing frameworks such as NUnit.

Well, fortunately, enough developers complained about losing that feature (several thousand, in fact), therefore, Microsoft finally decided to bring back that particular feature through an Extension in the Visual Studio Gallery!  The extension supports both Visual Studio 2012 and Visual Studio 2013.

You can download this extension here: http://visualstudiogallery.msdn.microsoft.com/45208924-e7b0-45df-8cff-165b505a38d7?SRC=Home


Thursday, November 14, 2013

Migrating from Moles to Fakes

If you have used Microsoft Moles for developing your Unit Tests with Visual Studio 2010, as many of you already know, you are out of luck when it comes to using Visual Studio 2012 or Visual Studio 2013 since Moles is no longer supported on either of these IDEs.

Instead, if you have Visual Studio 2012 Ultimate Edition or Visual Studio 2013 Premium Edition and above, you can migrate to the use of the Fakes Framework.

Of course, migration to the Fakes Framework is not an automated migration process.  In fact, the code has to be manually migrated through search and replace and a significant amount of editing.  There are a great deal of articles that provide a great deal of detail on how to migrate, but this is the "For Dummies" version if you will:


  1. Open up your solution in Visual Studio 2012/2013
  2. For all of the broken references that refer to Moles Assemblies, right-click on the original assemblies and select "Add Fakes Assembly"
  3. Remove all of the broken references to the Moles Assemblies from the References area of each Unit Test project
  4. You can also remove all of the .moles files from each of your Visual Studio projects.
  5. Now, comes the very manual and very tedious part of replacement.
    • For every using statement that includes the extension .Moles, replace it with .Fakes
    • For every assembly that begins with "M", replace it with Shim
    • For ever assembly that begins with "S", replace it with Stub
    • Remove all instances of the [HostType("Moles")] attribute from all Test Methods
    • In addition, for every use of a Shim, you will have to surround the code with a using statement: using (ShimsContext.Create()) { }
  6. Now, make sure that all of your projects in the solution compile.
  7. If you are able to successfully compile your solution, you can now proceed to run all of your Unit Tests.
  8. Verify that all of your Unit Tests pass after the migration to Fakes.



Developing with .NET Framework 4.5.1 using Visual Studio 2012

If you are unable to develop using Visual Studio 2013 because of the system requirements (such as the requirement for Internet Explorer 10), fortunately, you can still develop on the .NET Framework v. 4.5.1 platform using Visual Studio 2012!

This is due to the recently released Developer Pack for Visual Studio 2012 which makes it possible to add .NET 4.5.1 support to Visual Studio 2012: http://www.microsoft.com/en-us/download/details.aspx?id=40772

Therefore, if you still want to leverage .NET 4.5.1 in the development of your .NET Application but cannot yet migrate to Visual Studio 2013, you can continue developing on Visual Studio 2012 until you are able to migrate your system to meet the compatibility requirements of Visual Studio 2013!

 

Wednesday, July 31, 2013

Adding a Service Reference to an ASMX Service

If you need to add a Service Reference to a non-WCF Service (namely an ASMX Service), the process of obtaining that Service Reference is not exactly straight forward within the Visual Studio IDE/environment.

Here are the steps that you need to follow:


  1. Add a Service Reference
  2. Type in the Url to the ASMX Service and click on the Go button
  3. Click on the Advanced Button
  4. Click on the Add Web Reference button
  5. Once again type in the Url to the ASMX Service
  6. Click on the arrow icon next to the Address Bar to locate the Web Service (or click on the Enter key)
  7. Enter a name for the Web Reference in the Web Reference Name textbox
  8. Click on Add Reference
  9. You should now have the ASMX Web Reference configured in your project.




Friday, April 5, 2013

Visual Studio 2012 Update 2

Visual Studio 2012 Update 2 is now available!

You can download it from here: http://www.microsoft.com/en-us/download/details.aspx?id=38188

To read more about the improvements made in Update 2, you can click here: http://support.microsoft.com/kb/2797912

Also, just as you could do so with Visual Studio 2012 Update 1, you can also execute Visual Studio 2012 Update 2 with the /Layout switch in order to obtain an offline installation. (http://www.windowsvalley.com/visual-studio-2012-update-1-offline-installer/)




Monday, March 25, 2013

Visual Studio Toolbar differences between Visual Studio 2010 and 2012

If you are switching from Visual Studio 2010 over to Visual Studio 2012, most of the main toolbar menu headers should be the same.

However, the ONE major difference between the 2 IDEs is the switch from the Data menu item to the SQL menu item.



In the case of Visual Studio 2012, while the SQL menu item replaces some of the functionality for Schema and Data Comparisons, as well as the Transact SQL Editor, it does not completely replace the Data menu item.

In the case of the Data menu item, you also have 2 menu items for "Show Data Sources" and "Add New Data Source".  



While neither of these menu items seem to exist in Visual Studio 2012, you can perform these same operations in the Data Sources pane which is usually hidden along with the Toolbox.




Tuesday, March 5, 2013

Changing the Color Scheme in Visual Studio 2012

If, like me, you do not like the color themes that ship out-of-the-box with Visual Studio 2012, fortunately, Microsoft has recently released a Visual Studio 2012 Color Theme Editor!!

You can read more about the Visual Studio 2012 Color Theme Editor as well as download it from here:
http://visualstudiogallery.msdn.microsoft.com/366ad100-0003-4c9a-81a8-337d4e7ace05

Sunday, February 24, 2013

Deployable Dependencies option missing in Visual Studio 2012

I was recently reading an article regarding how to deploy ASP.NET MVC 4 to a Shared Hosting Provider and the article mentioned using the "Add Deployable Dependencies" option.

Well, I was using Visual Studio 2012 and I did not see this option anywhere!


 Well, as it turns out according to this Microsoft Connect feedback item, this option was removed from Visual Studio 2012: http://connect.microsoft.com/VisualStudio/feedback/details/735553/add-deployable-dependencies-missing-from-vs11-beta

Therefore, while this option still exists in Visual Studio 2010 (and Visual Studio 2010 SP1), it was built into the NuGet Package Manager alongside Visual Studio 2012 so that all required assemblies are automatically bin deployed.




Publishing Web differences between Visual Studio 2010 and Visual Studio 2012

I recently switched over from developing my Web Applications using Visual Studio 2010 to Visual Studio 2012 and was trying to publish one of my ASP.NET MVC Web Applications using Visual Studio 2012 and I came across this dialog:


This dialog was COMPLETELY different from the dialog I used to see in Visual Studio 2010!!


In Visual Studio 2010, I had the option to also select from a variety of choices for publishing as well as the ability to create new Publishing profiles directly from within the IDE:


Needless to say, I still have not figured out how to create a Publishing profile in Visual Studio 2012 similar to how I was previously able to do so using Visual Studio 2010.

If you are like me and want the capabilities of the Visual Studio 2010 IDE available in Visual Studio 2012, please vote for this Visual Studio UserVoice feedback item:

http://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/3687139-provide-a-publish-web-dialog-similar-to-visual-stu

Friday, February 22, 2013

Team Foundation Server in the Cloud error message

I was trying to check my source code into Team Foundation Server which is hosted in the cloud and I received the following error message:


As it turns out, believe it or not, there are worldwide outages in  the Windows Azure cloud due to an expired SSL certificate!!  There is currently no estimated timeline as to when all of the servers (including the TFS Server will be back online).

You can read more about the Windows Azure Cloud Storage outage here:
http://www.windowsazure.com/en-us/support/service-dashboard/


Sunday, February 10, 2013

Visual Studio 2012 Productivity Power Tools now available!

I had a friend ask me the other day if Microsoft had released the Visual Studio 2012 Productivity Power Tools. 

As it is, Microsoft has a significant lag time between releasing their IDE and then releasing updates to support missing features such as the case with the Visual Studio 2012 Productivity Power Tools.

The last time I checked was several months ago shortly after the release of the Visual Studio 2012 IDE, but I just checked again this morning and lo and behold!, they were now available for download.

You can download the Visual Studio 2012 Productivity Power Tools from the Visual Studio gallery here:
http://visualstudiogallery.msdn.microsoft.com/3a96a4dc-ba9c-4589-92c5-640e07332afd

Saturday, February 9, 2013

Installing Visual Studio 2012 Update 1 Offline

If you download Visual Studio 2012 Update 1 from here: http://www.microsoft.com/visualstudio/eng/downloads#d-visual-studio-2012-update

You will notice that the download link only consists of a few MB download which does not comprise the full update.  Instead, Update 1 consists of a Web Installer which downloads the remainder of the components needed to install the update.

Well, what if you do not have an active Internet connection (such as when you are building a virtual machine)?  Fortunately, there is a method to download the packages offline for installing when you do not have an active Internet connection (or if you have a slow connection such as in a restaurant or a coffee shop).

You can find instructions for downloading the packages for an offline installation here: http://www.windowsvalley.com/visual-studio-2012-update-1-offline-installer/

Essentially, the method consists of executing the Update 1 Web Installer with the /Layout switch and specifying a download location for all of the packages.

Once you have the offline packages, you should be able to execute the Update 1 installer and it should look for the offline packages locally before attempting to download them over the Internet.


Sunday, February 3, 2013

Merging ASP.NET Web Application projects with ASP.NET MVC Projects

If you want to learn how to merge an ASP.NET Web Application project with an ASP.NET MVC project, you can follow this article here: http://www.hanselman.com/blog/IntegratingASPNETMVC3IntoExistingUpgradedASPNet4WebFormsApplications.aspx

This might be useful if you start out with an ASP.NET Web Application project that you have built quite some time ago and have now decided you want to leverage the power and flexibility of ASP.NET MVC with Entity Framework and jQuery.

One of the notable things that is missing from Scott Hanselman's article is manually editing the Visual Studio project file in order to get the right click Visual Studio MVC functionality into the project.

You can accomplish this by doing the following:


  1. Simply open a valid ASP.NET MVC Web Application project file in Visual Studio
  2. Unload the project and right click and select it for Editing.  
  3. Right click and select Edit the .csproj file
  4. Review the ProjectTypeGuids element in the ASP.NET MVC Web Application Project and copy them to the clipboard
  5. Follow steps 1-3 for the ASP.NET Web Application project file and replace your existing ProjectTypeGuids
  6. Save the resultant ASP.NET Web Application project file.
  7. Reload the ASP.NET Web Application project
  8. Right click on the Controllers or Views directory in Visual Studio and verify that you now are able to add appropriate Controllers or Views to the respective directory!

Tuesday, September 4, 2012

Windows Server 2012 RTM released on MSDN!

Windows Server 2012 RTM is now available for download from MSDN!

http://msdn.microsoft.com/subscriptions

In addition, Visual Studio 2012 developers out there will be pleased to know that Visual Studio 2012 RTM installs successfully on Windows Server 2012 RTM!!


Friday, August 17, 2012

Visual Studio 2012 Must Have Features

If you have started using Visual Studio 2012, there are several new features that I consider "MUST HAVE" as part of every developer's toolbelt:

  1. Code Coverage
  2. Unit Test Mocking using Microsoft Fakes
  3. Code Metrics
  4. PowerPoint Storyboarding
  5. Code Clone
  6. UML Modeling using Activity, Sequence, Class, Component diagrams etc.
  7. Code Review
  8. Request Feedback from Customers
  9. UI Testing
  10. Web Performance Testing
  11. Load Testing
  12. Test Case Management

However, if you look at the comparison chart for Visual Studio 2012 editions here: http://www.microsoft.com/visualstudio/11/en-us/products/compare

You will discover that many of these features are reserved exclusively for Premium Edition users and in many cases Ultimate Edition users.

Fortunately, if you are a Microsoft partner, in all likelihood you already have access to the Premium Edition of Visual Studio 2012.  However, if you were hoping for the Ultimate Edition instead, those licenses are largely reserved for the Enteprise Microsoft Partners/Vendors or Partners that have achieved the Team Foundation Server competency.  If you do not fall into one of those categories, unfortunately, you may have to fork out the necessary cash to upgrade to the Ultimate Edition.

Ideally, Microsoft would offer all features/functionality in the Premium edition and reserve exclusive "Extension Packs" for the Ultimate Edition so that all Microsoft partners can reap the development benefits normally associated with Ultimate Edition.

If you work at a company that only has access to Visual Studio 2010/2012 Professional Edition, I feel your pain, I really do....