Skip to content

Instantly share code, notes, and snippets.

@ThomasArdal
Created June 17, 2013 06:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ThomasArdal/5795097 to your computer and use it in GitHub Desktop.
Save ThomasArdal/5795097 to your computer and use it in GitHub Desktop.
public class IISExpressTest
{
[Test]
public void IISExpressIsNeverDisabled()
{
XNamespace @namespace = "http://schemas.microsoft.com/developer/msbuild/2003";
var document = XDocument.Load("path to your web project (csproj)");
var element =
document.Descendants(@namespace + "Project")
.First()
.Descendants(@namespace + "PropertyGroup")
.First()
.Descendants(@namespace + "UseIISExpress")
.First();
Assert.That(element != null);
Assert.That(bool.Parse(element.Value), Is.True, "IISExpress is disabled. Shame on you!!!1");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment