Resolving “Validation (): Element ‘xxxx’ is not supported” warning in Visual Studio 2005/2008

Delete the files from “C:\Documents and Settings[Username]\Application Data\Microsoft\VisualStudio\9.0\ReflectedSchemas” folder (or “…\VisualStudio\8.0\…” if running Visual Studio 2005) in Windows XP. In Windows 7 it is under “C:\Users{User Profile}\AppData\Roaming\Microsoft…etc”. Remember also the “VisualStudio” part of the path will be different depending on the version installed. I closed Visual Studio (always a good idea for changes that will … Read more

How do you tell the Visual Studio project type from an existing Visual Studio project

In the project XML files: Console applications contain: <OutputType>Exe</OutputType> WinForms applications contain: <OutputType>WinExe</OutputType> Library (.dll) projects contain: <OutputType>Library</OutputType> and do NOT contain a <ProjectTypeGuids> ASP.NET and WCF projects contain: <ProjectTypeGuids>{603c0e0b-db56-11dc-be95-000d561079b0};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids> <OutputType>Library</OutputType> The GUIDs do something to define exactly what type of project it is. The ones above were taken from an ASP.NET app. They exist … Read more

Determine assembly version during a post-build event

If (1) you don’t want to download or create a custom executable that retrieves the assembly version and (2) you don’t mind editing the Visual Studio project file, then there is a simple solution that allows you to use a macro which looks like this: @(Targets->’%(Version)’) @(VersionNumber) To accomplish this, unload your project. If the … Read more

Exclude files from web site publish in Visual Studio

Exclude files and folders by adding ExcludeFilesFromDeployment and ExcludeFoldersFromDeployment elements to your project file (.csproj, .vbproj, etc). You will need to edit the file in a text editor, or in Visual Studio by unloading the project and then editing it. Add the tags anywhere within the appropriate PropertyGroup (Debug, Release, etc) as shown below: <PropertyGroup … Read more