Posts

Showing posts with the label Visual Studio

Donate

Unity already has a dependency defined for CommonServiceLocator (VS 2012 Ultimate)

Image
Hello, While trying to add Unity to a Console Project, I encountered an error as stated by the title of this post. After doing some research, I found a post in Stack Overflow which is to update Nuget Package Manager. When I checked my VS, the nuget package manager is an older version. So, I removed/uninstalled it and added the recent version of Nuget package manager through Tools -> Exentsion and Updates then look for Nuget Package Manager. Then install/download it in your VS IDE. See image for current Nuget Package Manager. That's It.. :)

ASP.NET Web Forms Using Master Page Not Found On Visual Studio 2012 IDE

When the RTM versions of Visual Studio 2012 were updated to version 4, I noticed that when you Add a New Item in an Asp.net website or project, "Web Form Using Master Page" has gone missing. I soon realized that Web Form Using Master Page is replaced with "Content Page" in the Add New Item Dialog. :)

Simple Array CRUD Manipulation Using AngularJS Framework

Image
This weekend I decided to create a simple AngularJS CRUD array application. This example was based on Dan Wahlin's AngularJS tutorial. I simply reused the css and js files for simplicity sake. So, let's proceed with the actual scripts and html. Main HTML (Contains the input controls and div with ng-view directive which is the container of the partial view: <div data-ng-controller= "CustomerController" > <h3>CRUD application in AngularJS Array</h3> <hr /> Name:<br /> <input id= "inName" type= "text" data-ng-model= "inputData.name" placeholder= "name" /> <br /> City:<br /> <input id= "inCity" type= "text" data-ng-model= "inputData.city" placeholder= "city" /> <br /> <button class= "btn btn-pr

Generate Sample XML From XSD Using Visual Studio 2012

Image
There was a question on how to generate sample XML from an XSD without using C# or VB.NET Code. I did some googling for a few hours and then stumbled upon a tutorial from Code project which is the reference of this post. Since, Im using Visual Studio 2012, I replicated the steps based from the article. 1. Add a new XSD file to Visual Studio. In my case, I reused the example from MSDN: <xsd:schema xmlns:xsd= "http://www.w3.org/2001/XMLSchema" xmlns:tns= "http://tempuri.org" targetNamespace= "http://tempuri.org" elementFormDefault= "qualified" > <xsd:element name= "PurchaseOrder" type= "tns:PurchaseOrderType" /> <xsd:complexType name= "PurchaseOrderType" > <xsd:sequence> <xsd:element name= "ShipTo" type= "tns:USAddress" maxOccurs= "2" /> <xsd:element name= "BillTo" type= "tns:USAddress" /> </xsd:

Zooming Visual Studio 2012 Code Editor

Image
Just received a newsletter from dotnet videos regarding zooming in/out the code editor. In that email, there were three ways. However, there are several options to do it as presented below: 1). Using the zoom drop down control below the code editor. 2). Using Keyboard combinations: Zoom OUT = Ctrl + Shift + Comma, Zoom IN = Ctrl + Shift + Period 3). Type a zoom level directly in the the zoom control in the bottom left corner of the editor 4). Select a common zoom level from the dropdown list in the zoom control 5). Hold Ctrl key and scroll the mouse wheel (up/down). References: Visual Studio 2012 Zoom In or Zoom Out Visual Studio 2010 Zoom In or Zoom Out Cheers!

Add Connection On Data Source Controls Not Loading SQL Server 2012 Server Or Instance Name

Image
After installing SQL Server 2012 Developer Edition SP1 on my other laptop, I tried creating an ASP.NET app using SQL DataSource control as the datasource control of the GridView. But to no avail, the mssql server instance doesn't load on the server name dropdown contol as shown below: The hardware specifications are as follows: Windows 8 Pro, Visual Studio 2008/2010/2012 and SQL Server 2012 Developer Edition SP1. However, on my other laptop which has a Windows 8.1 OS, the server names were loaded on the Server Name dropdown control. After experimenting for a few hours, I discovered a simple solution which is to Turn Off The Windows Firewall . After that, my sql server instance is loaded on the control as shown below: Cheers!

'Microsoft.VisualStudio.Editor.Implementation.EditorPackage' package did not load correctly (Visual Studio 2012)

After installing updates for my Windows 8 laptop, I did a restart and opened a Visual Studio 2012 instance. Surprisingly, an error pops-up as stated by the title of this  Post. I did some search on Microsoft Knowledge Base and found a patch for it which is available for download. See the link below: Update for Microsoft Visual Studio 2012 (KB2781514) Greg

Visual Studio 2008 Failed Install On WIndows 8 Operating System

Solution: Turn on .NET Framework 3.5 which is built-in Windows 8. Make sure windows updates is turned on also. Cheers!

Debugging jQuery Or Javascript Code Not Working In ASP.NET MVC 3 (VS 2010)

In my MVC 2 post here: Debuggin jquery/javascript code , the workaround was to isolate the javascript codes in a separate .js file. However, there's another way to add breakpoints by referring to localhost html file in the solutions explorer as stated in this website link: Debuggin javascript with IE9/Visual Studio 2010 MVC 3 Greg

Debugging jQuery Or Javascript Code Not Working In ASP.NET MVC 2 (VS 2010)

In an application where there is internal jquery code in your MVC project, placing a breakpoint won't work when you want to enable debugging mode. After searching, a workaround has been provided by Microsoft Team. The solution is to transfer the javascript/jQuery script to an external .js file instead of embedding it in your .aspx script.Refer to the workaround. Solution: http://connect.microsoft.com/VisualStudio/feedback/details/652428/mvc-3-mvc-2-debug-ignores-javascript-breakpoints Cheers! Greg

Remove Dotted Lines Or Whitespaces In Visual Studio 2010

Good evening gents! Use the shortcut keys below to remove the dotted lines or white spaces in your Visual Studio 2010 IDE: 1. ctrl r+w or 2. ctrl e+s Cheers!

How To Debug JavaScript Code In Visual Studio 2008 Or Visual Studio 2010

Here are the simple steps to debug js code in your aspx markup. 1. Open Visual Studio 2008/2010 2. Click Tools then options 3. Expand debugging node then click checkboxes Manages,Native,Script. 4. In your web.config file,make sure to set compilation debug to true. <compilation debug= "true" > <assemblies> <add assembly= "System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /> <add assembly= "System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> <add assembly= "System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /> <add assembly= "System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /> </assemblies> </compilation> 5. Choo

Visual C# 2010 Express (System.Web Namespace Not Found)

When you created a winforms project and you would like to use HttpUtilities or other classes found on System.Web, you might notice that when you tried adding reference to System.Web, it is not found on the .NET Tab. By default, the project is targeted on .NET Compact framework 4.0, so just change it to .NET Framework 4.0. By then,you will be able to add the System.Web namespace in your projects. Cheers

Donate