T-SQL: Cannot drop the index because it does not exist or you do not have permission.
Quick tip: The table name and index name are required to drop an index, otherwise SQL Server will return an error.
e.g.
DROP INDEX [dbo].[IX_MyIndex]
fails with …
Msg 3701, Level 11, State 6, Line XX Cannot drop the index 'dbo.IX_MyIndex', because it does not exist or you do not have permission.
However,
DROP INDEX [dbo].[MyTable].[IX_MyIndex]
will work fine if it exists and you have sufficient permissions. (Use Select user_name() to determine your user context, which will help to verify the permissions being used.)

Step 1. Make VS recognize a .build file as an XML file.
- Right-click a .build file in the “Solution Explorer” and select “Open With …”
- In the “Open With” dialog, select “XML Editor” and “Set as Default”

Step 2: Enable intellisense for .build files.
Get the schema file for NAnt:
- Version 0.86 Beta 1 is at http://nant.sf.net/release/0.86-beta1/nant.xsd
- Version 0.85 is at http://nant.sf.net/release/0.85/nant.xsd
Copy it to the “xml\Schemas” subdirectory of your VS installation:
- Note that you can check this path via Tools > Options > Text Editor > XML > Miscellaneous

- Open the file so that it appears in a Visual Studio editor window.
- Click the file’s editor window (to activate it) and specify the schema to use (within the “Properties” window).

- Note that this dialog has changed from VS 2005 to 2008:

(VS 2005)

(VS 2008)
If all of that is not enough, make sure to enter an xmlns and make sure it is equal to the xmlns specified in the XSD schema.
!!!!! Even though the schema is available at http://nant.sf.net/release/0.86-beta1/nant.xsd and http://nant.sourceforge.net/release/0.86-beta1/nant.xsd, you must reference the former url in your build file because it is the one referenced in nant.xsd. !!!!!
Here is an example of what I mean:
<?xml version="1.0" ?> <project xmlns="http://nant.sf.net/release/0.86-beta1/nant.xsd" name="MyProject"> <!-- stuff here --> </project>
Hope that helps someone. Happy Programming!
Want to get jQuery DataTables to work in an ASP.Net MVC project ???
Here is a demo project in C# that should get you started. If I find the time, I’ll post details on how this was put together (but I think most developers will benefit more from running and stepping through the source code anyway).
Hope this helps someone. Happy Programming!
Are you repeatedly getting a less than helpful error dialog in Visual Studio 2010?
Go to the command line and run devenv.exe with logging, reproduce the error in the IDE and then open ActivityLog.xml:

C:\>cd "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE" C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE>devenv /Log C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE>cd %APPDATA% C:\Documents and Settings\username\Application Data>cd "Microsoft\VisualStudio\10.0" C:\Documents and Settings\username\Application Data\Microsoft\VisualStudio\10.0>dir ActivityLog.xml /B ActivityLog.xml C:\Documents and Settings\username\Application Data\Microsoft\VisualStudio\10.0>notepad ActivityLog.xml
Look for entries with type=Error, e.g.
<entry> <record>263</record> <time>2009/10/24 22:50:09.218</time> <type>Error</type> <source>Editor or Editor Extension</source> <description>System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.VisualStudio.Editor.Implementation.VsFontsAndColorsInformation.GetEditorFontForItem(IVsColorTable colorTable, Int32 itemIndex, FONTCOLORPREFERENCES2 fontColorPreferences) at Microsoft.VisualStudio.Editor.Implementation.VsFontsAndColorsInformation.TryGetItemValue(String itemKey, ResourceDictionary& itemValue) at Microsoft.VisualStudio.Text.Classification.Implementation.EditorFormatMap.CreateResourceDictionaryFromProvision(String key) at Microsoft.VisualStudio.Text.Classification.Implementation.EditorFormatMap.GetProperties(String key) at Microsoft.VisualStudio.Text.Classification.Implementation.ClassificationFormatMap.GetDefaultProperties() at Microsoft.VisualStudio.Text.Classification.Implementation.ClassificationFormatMap..ctor(ICollection`1 formats, IClassificationTypeRegistryService classificationTypeRegistry, IEditorFormatMap formatMap) at Microsoft.VisualStudio.Text.Classification.Implementation.ClassificationFormatMapService.GetClassificationFormatMap(String category) at Microsoft.VisualStudio.Text.Classification.Implementation.ViewSpecificFormatMap.AttachToFormatMaps() at Microsoft.VisualStudio.Text.Classification.Implementation.ViewSpecificFormatMap..ctor(IClassificationFormatMapService classificationFormatMapService, IEditorFormatMapService editorFormatMapService, ITextView textView) at Microsoft.VisualStudio.Text.Classification.Implementation.EditorFormatMapService.<>c__DisplayClass1.<GetEditorFormatMap>b__0() at Microsoft.VisualStudio.Utilities.PropertyCollection.GetOrCreateSingletonProperty[T](Object key, Func`1 creator) at Microsoft.VisualStudio.Text.Classification.Implementation.EditorFormatMapService.GetEditorFormatMap(ITextView textView) at Microsoft.VisualStudio.Text.Editor.Implementation.OutliningAdornmentManagerFactory.CreateTagger[T](ITextView textView, ITextBuffer buffer) at Microsoft.VisualStudio.Text.Tagging.Implementation.TagAggregator`1.GatherTaggers(ITextBuffer textBuffer)</description> </entry>


