a developer's notes – a semi-technical web development BLOG

October 28, 2011

How to Uninstall Sql Server Express that gets installed with Visual Studio 2010

Filed under: SQL — Duy Nguyen @ 1:12 pm
Tags: , , , , , , , ,

1. Go to Add/ Remove Programs.
2. Choose “Microsoft SQL Server 2008”
**I had Microsoft SQL Server 2008 R2 installed but you still need to select “Microsoft SQL Server 2008” NOT “Microsoft SQL Server 2008 R2”. If you do choose R2, you will see the SQLEXPRESS instance but you will not be able to select it!

3. Click on the REMOVE link (This will allow you to chose the instance to remove. See image)

4. Select SQLEXPRESS and remove!

Advertisements

October 4, 2011

Can’t debug into a Javascript file. Error “No Disassembly Available” or “This breakpoint will not currently be hit. No symbols have been loaded for this document”

Ever put a break point in visual Studio 2010 on a .js file to get this?

This breakpoint will not currently be hit. No symbols have been loaded for this document.”

Then you decide to user the ‘debugger;’ statement. But then Visual Studio gives this error: “no disassembly available“.

You are probably loading your .js file dynamically. If you are, remove (or comment out) where you are loading and load it with an explicit script tag.

example: I was loading the script file like this:

<script src="<%=Url.StaticContent("/MyApplication/Scripts/views/script.js")%>" type="text/javascript" ></script>

I just commented out that line and hard coded the script file like this:

<script src="http://localhost/MyApplication/Scripts/views/script.js" type="text/javascript"></script>

Now I am able to user the debugger; statement AND able to put a break point in Visual Studio.

September 29, 2011

Missing Modules Window in Visual Studio 2010

Filed under: General Tips — Duy Nguyen @ 1:44 pm
Tags: , , , ,

If the Modules Window in Visual Studio 2010 is not under Debug, Windows, Modules, you can get it back by pressing Ctrl-Alt-U.

September 14, 2011

Navigating in Visual Studio

Filed under: General Tips — Duy Nguyen @ 9:30 am
Tags: , , , , , , , , , ,

Have you ever jump around from code to code only to find yourself not knowing what class file you were at or what method you were navigating from? I get lost all the time when I am digging around in code.

I used to use bookmarks to place where I want to remember. They are great but what if you forgot to create one? Is there a “Back” button like you have on your windows browser?

In Visual Studio there is! Check out the Navigate Backwards and Navigate Forwards button!

You can simply click backwards to see where your last mouse cursor was. I usually hit F12 on a method or class to see its definition. And sometimes I find myself down a rabbit hold. Just click on the Navigate backwards to get back where you were!

If they are missing, customize the Standard toolbar. The Navigate Forward and Navigate Backwards is on the “View” Category.

September 5, 2011

There Is No Source Code Available For the Current Location

Filed under: ASP.NET — Duy Nguyen @ 2:25 pm
Tags: , , , , , , , , , , , , , ,

(Taken from:http://www.marvinpalmer.com/MarvinPalmer/post/There-Is-No-Source-Code-Available-For-the-Current-Location.aspx

When using trying to debug with Visual Studio and programming using .NET, you get a Visual Studio dialog that says “There is no source code available for the current location.”

1.The “Show Disassembly” button will be available. Click on it. You can step through the disassembly which does eventually take you into the code.
2. If you click “Show Disassembly” and then “Step Into” code (F11) just like you would have if the code window had loaded, you will see code mixed with other stuff.
3. When you see the code to debug, just right-click the window and choose “Go to Source Code” which opens up the code

Debugging into Classic ASP with Visual Studio

Filed under: Classic ASP — Duy Nguyen @ 2:22 pm
Tags: , , , , ,

1. First, navigate to the page your trying to debug into to load the IIS Worker Process.

2. Enable “Script source access” in IIS under the Home Directory tab. This allows VS to access the script files in ASP

3. In the Home Directory tab, click Configuration under application settings. Then click the Debugging tab. Check the box for Enable ASP server-side script debugging.

4. In Visual Studio, you need to enable Just-In-Time debugging for script files. In VS2008 go to Tools -> Options. Navigate to Debugging -> Just-In-Time. Click the check box to enable scrip debugging:

5. Add a “stop” statement to your VB code where you want the JIT debugger to break execution.

6. Finally, use the attach to process feature. In the Debug menu in VS2008. Ensure that “Attach to:” has “Script” selected and that your w3wp.exe has “Script” as one of the Types. If “Script” is not listed in the types, you have not configured IIS correctly for debugging.

7. You should now be able to navigate to the page you are trying to access. The debugger should load when the stop statement is reached and you can use the Debugging controls inside Visual Studio.

How to find SQL Instances installed and uninstall SQL Server 2005 Express

Filed under: General Tips — Duy Nguyen @ 2:17 pm
Tags: , , , , , ,

Run this script in Management Studio to find what instances are installed:

http://blogs.msdn.com/b/sqlserverfaq/archive/2009/03/20/how-to-list-all-the-installed-sql-server-on-the-server-using-tsql.aspx

1. In add/remove find Microsoft SQL Server 2005 Express
2. Uninstall
3. Choose Microsoft SQL Server 2005 Express instances
4. If prompted to do so, stop any Microsoft SQL Server 2005 Express services in services.msc

How to use Microsoft’s DebugView with ASP.NET for debugging

Filed under: General Tips — Duy Nguyen @ 2:17 pm
Tags: , , , , ,

This is a great article.

UPDATE: But this doesn’t seem to work with .NET 4 web apps. Only 3.5 or less.

http://www.dotnetcurry.com/ShowArticle.aspx?ID=337

“Error updating Jscript IntelliSense, See Error List” In Visual Studio 2008

Filed under: General Tips — Duy Nguyen @ 1:23 pm
Tags: , , , , , ,

http://stackoverflow.com/questions/895270/visual-studio-2008-jquery-intellisense-sporadically-fails-restarting-vs-fixes

I don’t know if you guys have ever notice this error in Visual Studio 2008 while trying to edit a .aspx file. But if you have, then you’ll know how slow the IDE takes to respond to your key strokes. By default, it takes 15 seconds before you can type again. You can lower the timeout value to if you want to speed up your IDE.

HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\HTML Editor\JsFailsafeTimeout

HKEY_CURRENT_USER\Software\Microsoft\VWDExpress\9.0\HTML Editor\JsFailsafeTimeout

Install order for Visual Studio and SQL Server

Filed under: General Tips — Duy Nguyen @ 1:06 pm
Tags: , , , , , ,

Install SQL Server 2005 BEFORE you install Visual Studio 2005/2008. If you install Visual Studio first, you will have a hard time installing SQL Server because Visual Studio , by default, will install SQL Server Express. And when you try to install SQL Server on top of an existing Express installation, you won’t be able to install SQL Server Management Studio.

Create a free website or blog at WordPress.com.