# Sunday, October 31, 2004
Something usefull i posted in my old blog and promised Christian and Günther to post it again...

#Region "NDoc()"
    Sub NDoc()
        Dim nDocPath As String = "C:\Program files\NDoc\bin\.net-1.1\"

        Dim objProj As Object()
        Dim proj As Project

        'Get Project
        objProj = DTE.ActiveSolutionProjects
        If objProj.Length = 0 Then
            Exit Sub
        End If
        proj = DTE.ActiveSolutionProjects(0)

        If (proj.ConfigurationManager.ActiveConfiguration.ConfigurationName = "Debug"Then
            MsgBox("You cannot run this Macro in the Debug-configuration." & vbCrLf & _
            "Switch to ""Realease"", build the project and run this Macro again.")
            Exit Sub
        End If

        proj.ConfigurationManager.ActiveConfiguration.Properties.Item("DocumentationFile").Value =
            proj.Properties.Item("AssemblyName").Value() & ".xml"
        proj.Save()

        Dim XmlString As String = "<project>" & vbCrLf & _
            "    <assemblies>" & vbCrLf & _
            "        <assembly location=""" & proj.Properties.Item("FullPath").Value() & _
            "bin\Release\" & proj.Properties.Item("OutputFileName").Value() & """ documentation=""" & _
            proj.Properties.Item("FullPath").Value() & "bin\Release\" & _
            proj.Properties.Item("AssemblyName").Value() & ".xml"" />" & vbCrLf & _
            "    </assemblies>" & vbCrLf & _
            "    <namespaces>" & vbCrLf & _
            "    </namespaces>" & vbCrLf & _
            "    <documenters>" & vbCrLf & _
            "        <documenter name=""MSDN"">" & vbCrLf & _
            "            <property name=""OutputDirectory"" value=""" & _
            proj.Properties.Item("FullPath").Value() & "doc\"" />" & vbCrLf & _
            "            <property name=""HtmlHelpName"" value=""" & _
            proj.Properties.Item("AssemblyName").Value() & """ />" & vbCrLf & _
            "            <property name=""IncludeFavorites"" value=""True"" />" & vbCrLf & _
            "            <property name=""Title"" value=""" & _
            proj.Properties.Item("AssemblyName").Value() & _
            """ />" & vbCrLf & _
            "            <property name=""SplitTOCs"" value=""False"" />" & vbCrLf & _
            "            <property name=""DefaulTOC"" value="""" />" & vbCrLf & _
            "            <property name=""IncludeHierarchy"" value=""True"" />" & vbCrLf & _
            "            <property name=""ShowVisualBasic"" value=""True"" />" & vbCrLf & _
            "            <property name=""RootPageContainsNamespaces"" value=""True"" />" & vbCrLf & _
            "            <property name=""SortTOCByNamespace"" value=""True"" />" & vbCrLf & _
            "            <property name=""OutputTarget"" value=""HtmlHelpAndWeb"" />" & vbCrLf & _
            "            <property name=""HeaderHtml"" value="""" />" & vbCrLf & _
            "            <property name=""FooterHtml"" value=""Copyright © " & Year(Now) & _
            " &lt;a href=http://www." & _
            proj.Properties.Item("AssemblyName").Value().Split(".".ToCharArray)(0) & _
            ".com&gt;" & _
            proj.Properties.Item("AssemblyName").Value().Split(".".ToCharArray)(0) & _
            " &lt;/a&gt; - all rights reserved."" />" & vbCrLf & _
            "            <property name=""FilesToInclude"" value="""" />" & vbCrLf & _
            "            <property name=""LinkToSdkDocVersion"" value=""MsdnOnline"" />" & vbCrLf & _
            "            <property name=""ShowMissingSummaries"" value=""True"" />" & vbCrLf & _
            "            <property name=""ShowMissingRemarks"" value=""False"" />" & vbCrLf & _
            "            <property name=""ShowMissingParams"" value=""True"" />" & vbCrLf & _
            "            <property name=""ShowMissingReturns"" value=""True"" />" & vbCrLf & _
            "            <property name=""ShowMissingValues"" value=""True"" />" & vbCrLf & _
            "            <property name=""DocumentInternals"" value=""False"" />" & vbCrLf & _
            "            <property name=""DocumentProtected"" value=""True"" />" & vbCrLf & _
            "            <property name=""DocumentPrivates"" value=""False"" />" & vbCrLf & _
            "            <property name=""DocumentProtectedInternalAsProtected"" value=""False"" />" & _
            vbCrLf & _
            "            <property name=""DocumentEmptyNamespaces"" value=""False"" />" & vbCrLf & _
            "            <property name=""IncludeAssemblyVersion"" value=""False"" />" & vbCrLf & _
            "            <property name=""CopyrightText"" value="""" />" & vbCrLf & _
            "            <property name=""CopyrightHref"" value="""" />" & vbCrLf & _
            "            <property name=""ReferencesPath"" value="""" />" & vbCrLf & _
            "            <property name=""SkipNamespacesWithoutSummaries"" value=""False"" />" & _
            vbCrLf & _
            "            <property name=""UseNamespaceDocSummaries"" value=""False"" />" & vbCrLf & _
            "            <property name=""AutoPropertyBackerSummaries"" value=""False"" />" & vbCrLf & _
            "            <property name=""AutoDocumentConstructors"" value=""True"" />" & vbCrLf & _
            "            <property name=""DocumentAttributes"" value=""True"" />" & vbCrLf & _
            "            <property name=""ShowTypeIdInAttributes"" value=""True"" />" & vbCrLf & _
            "            <property name=""DocumentedAttributes"" value="""" />" & vbCrLf & _
            "            <property name=""GetExternalSummaries"" value=""True"" />" & vbCrLf & _
            "            <property name=""EditorBrowsableFilter"" value=""Off"" />" & vbCrLf & _
            "            <property name=""UseNDocXmlFile"" value="""" />" & vbCrLf & _
            "        </documenter>" & vbCrLf & _
            "    </documenters>" & vbCrLf & _
            "</project>"

        Dim FileWriter As System.IO.StreamWriter
        FileWriter = System.IO.File.CreateText(proj.Properties.Item("FullPath").Value() & _
        proj.Properties.Item("AssemblyName").Value() & ".ndoc")
        FileWriter.WriteLine(XmlString)
        FileWriter.Close()

        proj.ProjectItems.AddFromFile(proj.Properties.Item("FullPath").Value() & _
        proj.Properties.Item("AssemblyName").Value() & ".ndoc")
        proj.Save()

        If System.IO.Directory.Exists(proj.Properties.Item("FullPath").Value & "\doc\") = False Then
            System.IO.Directory.CreateDirectory(proj.Properties.Item("FullPath").Value & "\doc\")
        End If

        Dim hasDocDir As Boolean = False

        For Each pitem As EnvDTE.ProjectItem In proj.ProjectItems
            If pitem.Name = "doc" Then
                hasDocDir = True
            End If
        Next

        If hasDocDir = False Then
            proj.ProjectItems.AddFolder("doc")
            proj.Save()
        End If

        If System.IO.File.Exists(proj.Properties.Item("FullPath").Value & "\doc\" & proj.Properties.Item("AssemblyName").Value & ".chm") = False Then
            Dim chmWriter As System.IO.StreamWriter = 
                System.IO.File.CreateText(proj.Properties.Item("FullPath").Value() & "\doc\" & _
            proj.Properties.Item("AssemblyName").Value() & ".chm")
            chmWriter.WriteLine("")
            chmWriter.Close()
        End If
        proj.ProjectItems.AddFromFile(proj.Properties.Item("FullPath").Value() & "\doc\" & proj.Properties.Item("AssemblyName").Value() & ".chm")
        proj.Save()

        If proj.Properties.Item("PostBuildEvent").Value = "" Then
            proj.Properties.Item("PostBuildEvent").Value = """" & nDocPath & _
                 "NDocConsole.exe"" -documenter=MSDN -project=""$(ProjectDir)" & _
                 proj.Properties.Item("AssemblyName").Value() & ".ndoc"" -verbose" & vbCrLf & _
                 "copy $(ProjectDir)doc\" & proj.Properties.Item("AssemblyName").Value() & _
                 ".chm $(TargetDir)"
        Else
            Dim existing As String = ("" & proj.Properties.Item("PostBuildEvent").Value)
            Dim exArr As String() = existing.Split(vbCrLf)
            existing = ""
            Dim y As Integer
            For y = 0 To (exArr.Length - 1)
                If exArr(y).IndexOf(nDocPath) = -1 And exArr(y).IndexOf(".chm") = -1 Then
                    existing = existing & vbCr & exArr(y)
                End If
            Next
            existing = nDocPath & _
                 "NDocConsole.exe -documenter=MSDN -project=""$(ProjectDir)" & _
                 proj.Properties.Item("AssemblyName").Value() & ".ndoc"" -verbose" & vbCrLf & _
                 "copy $(ProjectDir)doc\" & proj.Properties.Item("AssemblyName").Value() & _
                 ".chm $(TargetDir)" & _
                 existing
            proj.Properties.Item("PostBuildEvent").Value = existing
        End If
        proj.Save()

        MsgBox("The file """ & proj.Properties.Item("AssemblyName").Value() & _
            ".ndoc"" has been added to the project." & vbCrLf & _
            "NDoc was registred as PostBuildEvent.")

    End Sub
#End Region
Sunday, October 31, 2004 5:54:24 PM (W. Europe Standard Time, UTC+01:00)  #    Disclaimer  |  Comments [16]  | 
# Saturday, October 30, 2004

After DotNet 101 died in 2001, i realized a few other corpses today ...

vbCity last article 06/25/2004

DotNetWire last news 03/25/2004

Saturday, October 30, 2004 10:16:17 PM (W. Europe Standard Time, UTC+01:00)  #    Disclaimer  |  Comments [15]  | 
# Friday, October 29, 2004
Friday, October 29, 2004 9:13:22 AM (W. Europe Standard Time, UTC+01:00)  #    Disclaimer  |  Comments [16]  | 
# Tuesday, October 26, 2004

In the past weeks i have looked at several template based solutions for ASP.NET 1.1, because i can't wait for .NET 2.0.

Region MasterPages and it's variations all around the web
No WYSIWYG/VS.NET support - No solution for me.

Masterpages reinvented
Nice try, but i don't want to add so much lines to the code behind.

I also realized SiteMesh.NET (http://joe.truemesh.com/blog/000275.html - hey Joe fix that damn JS error!!!), but i don't like that approach.

So i decided to think about other concepts and wrote something that solves following for me:

  • MasterPage
    • WYSIWYG in VS.NET
    • CodeBehind
  • Other pages
    • WYSIWYG in VS.NET
    • CodeBehind

... with one line of code in the client pages.

I'll talk about my solution on the VFL-NiederRhein UG Meeting in november or december. So if you are interested keep an eye open.

Tuesday, October 26, 2004 9:48:46 PM (W. Europe Standard Time, UTC+01:00)  #    Disclaimer  |  Comments [35]  | 
# Friday, October 22, 2004

visit Micheals Blog ...

Friday, October 22, 2004 1:25:35 PM (W. Europe Standard Time, UTC+01:00)  #    Disclaimer  |  Comments [24]  | 

...

Friday, October 22, 2004 9:13:31 AM (W. Europe Standard Time, UTC+01:00)  #    Disclaimer  |  Comments [15]  | 
# Friday, October 01, 2004

I had a data crash a few weeks ago and lost a few lines of code my business objects.

Brent Moore reported me a error and so each line came back to my mind and back to the assembly managing the data of StaticDust.

Thanks Brent

ASP.NET | C# | Projects
Friday, October 01, 2004 8:40:37 PM (W. Europe Standard Time, UTC+01:00)  #    Disclaimer  |  Comments [23]  | 
# Wednesday, September 29, 2004

it's done - because of the loads of features i added in the last weeks (thanks to everybody who gave me feedback) it was necessary to redesign iFused from the architectural point of view and yes i polished the UI a bit. I hope you all like it - I LOVE FEEDBACK.

http://www.staticdust.net/

ASP.NET | C# | Projects
Wednesday, September 29, 2004 7:21:15 PM (W. Europe Standard Time, UTC+01:00)  #    Disclaimer  |  Comments [12]  | 
Wednesday, September 29, 2004 10:07:19 AM (W. Europe Standard Time, UTC+01:00)  #    Disclaimer  |  Comments [25]  | 
# Monday, September 27, 2004



Michael Willers: Security oder Praxis?

Den Satz "Security ist wichtig" haben Sie schon so oft gehört, dass er Ihnen fast schon aus den Ohren heraus kommt.

Viel schlimmer noch: Sie sind fest entschlossen, es in Zukunft richtig zu machen und auf Sicherheit zu achten. Und müssen dann doch bei Ihren Kunden frustriert feststellen, dass der altbekannte Satz "Security ist, wenn nix geht" eben doch eine unumstößliche Tatsache zu sein scheint. Oder positiver formuliert: "Wenn nix geht, geht auch nix kaputt."

Stichworte:

Monday, September 27, 2004 1:23:09 PM (W. Europe Standard Time, UTC+01:00)  #    Disclaimer  |  Comments [27]  |