Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with modify XML Data

Status
Not open for further replies.

Xsi

Programmer
May 29, 2015
121
0
0
SE
Hello people I need to a code that makes following things:

I have got this XML code,

I had help making to create line breaks in the file. I want following:, if you look, it's several sections, starting tag and end

that can be x number of <file> * </ file> x times. the modified tags will be inside of and tags: example in the file I sent: (it can be any line but the structure is always the same)

line 11:

<inContextExact segments="60" words="55" characters="755" placeables="3" tags="0" />
replace 55 with 0

result:

<inContextExact segments="60" words="0" characters="755" placeables="3" tags="0" />

next tag is:

line:14

<crossFileRepeated segments="2" words="20" characters="0" placeables="0" tags="0" />

Cut two words "20" and replace with 0

result:

line:14<crossFileRepeated segments="2" words="0" characters="0" placeables="0" tags="0" />

add the value 20 to the tag words="34"

line 15:

<repeated segments="17" words="34" characters="293" placeables="2" tags="0" />
result:


line 15:

<repeated segments="17" words="54" characters="293" placeables="2" tags="0" />
Here is my code I got so far. (VBA) if you want to rewrite the code in any other lang is it OK! as long the result is fine.
(the only thing my VBA code do its look for >< replace with >\n\r<) because the XML file is 1 line.


Sub XMLSolve()
Dim FSO As Object '//FileSystemObject
Dim ts(1) As Object '//TextStream
Dim s As String, t As String
Dim FileContents As String

'---------------------------------------------------------
Const SEARCH_FOR As String = "><"
Const REPLACE_WITH As String = ">" & vbCrLf & "<"
'----------------------------------------------

s = "<123><456><789>"
s = Replace(s, SEARCH_FOR, REPLACE_WITH)

On Error GoTo ErrHandler:
s = Application.GetOpenFilename()
If s <> "False" Then
Set FSO = CreateObject("Scripting.FileSystemObject")
If FSO.FileExists(s) Then

'//Get File Contents
t = FSO.GetParentFolderName(s) & "\" & Replace(FSO.GetTempName(), ".tmp", ".xml")
Name s As t
Set ts(0) = FSO.OpenTextFile(t, 1, False, -2) '//For reading, use default encoding
FileContents = ts(0).ReadAll
ts(0).Close
Set ts(0) = Nothing

'//Make replacement
FileContents = Replace(FileContents, SEARCH_FOR, REPLACE_WITH)



MsgBox



'//Write new file contents
Set ts(1) = FSO.OpenTextFile(s, 2, True, -2) '//For writing, use default encoding
ts(1).Write (FileContents)
ts(1).Close
Set ts(1) = Nothing

'//Delete Temp file if all actions succeeded
FSO.DeleteFile (t)

End If
End If

'//Check that all files are closed
My_Exit:
If Not ts(0) Is Nothing Then
ts(0).Close
End If
If Not ts(1) Is Nothing Then
ts(1).Close
End If
Set FSO = Nothing
Exit Sub

ErrHandler:
MsgBox "Error " & Err.Number & ": " & Err.Description
Resume My_Exit
End Sub

Here is the XML file:

<task name="analyse">
<taskInfo taskId="21a09311-ade3-4e9a-af21-d13be8b7ba45" runAt="2015-05-20 13:48:50" runTime="5 minutes, 53 seconds">
<project name="13955 - HMI Volvo Truck PA15" number="e20d51c0-71dc-4572-8f9b-4c150bf35222" />
<language lcid="1031" name="German (Germany)" />
<tm name="ENG-DEU_en-GB_de-DE.sdltm" />
<settings reportInternalFuzzyLeverage="yes" reportLockedSegments="no" reportCrossFileRepetitions="yes" minimumMatchScore="70" searchMode="bestWins" missingFormattingPenalty="1" differentFormattingPenalty="1" multipleTranslationsPenalty="1" autoLocalizationPenalty="0" textReplacementPenalty="0" />
</taskInfo>
<file name="VT MAIN TRACK_PA15_Default_DE-DE_20150520_102527.xlf.sdlxliff" guid="111f9ba6-82f6-45fb-ac49-8bf6cf57c169">
<analyse>
<perfect segments="0" words="0" characters="0" placeables="0" tags="0" />
<inContextExact segments="60" words="55" characters="755" placeables="3" tags="0" /> ' Replace the Value word="55" with "0"
<exact segments="114" words="334" characters="1687" placeables="14" tags="3" />
<locked segments="0" words="0" characters="0" placeables="0" tags="0" />
<crossFileRepeated segments="2" words="20" characters="0" placeables="0" tags="0" /> 'Cut the value words="20" replace with 0
<repeated segments="17" words="34" characters="293" placeables="2" tags="0" /> 'add the value to current value 20 to 34 so the new value is words="54"
<total segments="449" words="1462" characters="7630" placeables="66" tags="24" />
<new segments="126" words="434" characters="2384" placeables="18" tags="5" />
<fuzzy min="75" max="84" segments="25" words="108" characters="528" placeables="6" tags="3" />
<fuzzy min="85" max="94" segments="23" words="92" characters="454" placeables="7" tags="4" />
<fuzzy min="95" max="99" segments="77" words="260" characters="1318" placeables="13" tags="6" />
<internalFuzzy min="75" max="84" segments="3" words="16" characters="100" placeables="2" tags="2" />
<internalFuzzy min="85" max="94" segments="4" words="25" characters="111" placeables="1" tags="1" />
<internalFuzzy min="95" max="99" segments="0" words="0" characters="0" placeables="0" tags="0" />
</analyse>
</file>
<file name="VT MAIN TRACK_PA15_Default_DE-DE_20150523_254796.xlf.sdlxliff" guid="111f9ba6-82f6-45fb-ac49-8bf6cf57c169">
<analyse>
<perfect segments="0" words="0" characters="0" placeables="0" tags="0" />
<inContextExact segments="60" words="67" characters="755" placeables="3" tags="0" /> ' Replace the Value word="67" with "0"
<exact segments="114" words="334" characters="1687" placeables="14" tags="3" />
<locked segments="0" words="0" characters="0" placeables="0" tags="0" />
<crossFileRepeated segments="2" words="35" characters="0" placeables="0" tags="0" /> 'Cut the value words="35" replace with 0
<repeated segments="17" words="54" characters="293" placeables="2" tags="0" /> 'add the value to current value 35 to 54 so the new value is words="89"
<total segments="449" words="1462" characters="7630" placeables="66" tags="24" />
<new segments="126" words="434" characters="2384" placeables="18" tags="5" />
<fuzzy min="75" max="84" segments="25" words="108" characters="528" placeables="6" tags="3" />
<fuzzy min="85" max="94" segments="23" words="92" characters="454" placeables="7" tags="4" />
<fuzzy min="95" max="99" segments="77" words="260" characters="1318" placeables="13" tags="6" />
<internalFuzzy min="75" max="84" segments="3" words="16" characters="100" placeables="2" tags="2" />
<internalFuzzy min="85" max="94" segments="4" words="25" characters="111" placeables="1" tags="1" />
<internalFuzzy min="95" max="99" segments="0" words="0" characters="0" placeables="0" tags="0" />
</analyse>
</file>
<batchTotal>
<analyse>
<perfect segments="0" words="0" characters="0" placeables="0" tags="0" />
<inContextExact segments="60" words="139" characters="755" placeables="3" tags="0" />
<exact segments="114" words="334" characters="1687" placeables="14" tags="3" />
<locked segments="0" words="0" characters="0" placeables="0" tags="0" />
<crossFileRepeated segments="0" words="0" characters="0" placeables="0" tags="0" />
<repeated segments="17" words="54" characters="293" placeables="2" tags="0" />
<total segments="449" words="1462" characters="7630" placeables="66" tags="24" />
<new segments="126" words="434" characters="2384" placeables="18" tags="5" />
<fuzzy min="75" max="84" segments="25" words="108" characters="528" placeables="6" tags="3" />
<fuzzy min="85" max="94" segments="23" words="92" characters="454" placeables="7" tags="4" />
<fuzzy min="95" max="99" segments="77" words="260" characters="1318" placeables="13" tags="6" />
<internalFuzzy min="75" max="84" segments="3" words="16" characters="100" placeables="2" tags="2" />
<internalFuzzy min="85" max="94" segments="4" words="25" characters="111" placeables="1" tags="1" />
<internalFuzzy min="95" max="99" segments="0" words="0" characters="0" placeables="0" tags="0" />
</analyse>
</batchTotal>
</task>



Could someone help me with a batchscript /script

Thank you in advance




 
Yes I have got VB6 also Visual studio 2010

Could you help me out?
that would be a dream! :D

I have added your code to a button and work but two changes I would like to have one button for select folder I see the text under where the location is set.
also of course batch process.
 
I won't write the entire code for you, else you don't learn from it! ;-)

Simply create a new VB6 project with a form. In the toolbox list you will find a DriveListBox, DirListBox and FileListBox.
They are for choosing a drive, a folder and a file respectively.
Then put this code in your form:
Code:
Private Sub Drive1_Change()
Dir1.Path=Drive1.Drive
End Sub

Private Sub Dir1_Change()
File1.Path=Dir1.Path
End Sub

If you now run the form, you'll find that when you change the drive letter, the directory list and file list will automatically snychronize to the new path.
If you put some kind of "Start" button on your form you can then iterate through all files in the chosen Path like this:
Code:
For i = 0 to Form1.File1.ListCount -1
  Fil = Form1.File1.Path & "\" & Form1.File1.List(i)
'...do your processing per file here
Next i

Good luck!

"Knowledge is power. Information is liberating. Education is the premise of progress, in every society, in every family." (Kofi Annan)
Oppose SOPA, PIPA, ACTA; measures to curb freedom of information under whatever name whatsoever.
 
I actually run Visual studio express 2010.

I guess its almost the same thing may some updates in there I guess :)

But Thank you very much! so far! KING
 
Hi again MakeitSo,

I should need osme help I run Visual studio 2010,
I am not sure what to replace the DriveListBox, DirListBox and FileListBox with.

Could you give me a hint?

what about the earlier code?

Code:
[b]Private Sub Drive1_Change()
Dir1.Path=Drive1.Drive
End Sub

Private Sub Dir1_Change()
File1.Path=Dir1.Path
End Sub [/b]

Thank you in advance.
 
In VB.Net you have FileOpenDialog and OpenFolderDialog. I prefer the FileOpenDialog because the folder one is junk.

"Knowledge is power. Information is liberating. Education is the premise of progress, in every society, in every family." (Kofi Annan)
Oppose SOPA, PIPA, ACTA; measures to curb freedom of information under whatever name whatsoever.
 
Dam I don't get it work hmm.
have you got a tutorial or something for this?

I googled loads I think the problem is when I got so little experience earlier I can't combine the things I found on the web.


Thank you in advance.
 
How about:
Code:
'...
Dim allAnalyses

allAnalyses=Directory.EnumerateFiles(mySelFile, "*.xml")

And then iterate through the result:
Code:
Dim allAnalyses
    allAnalyses=Directory.EnumerateFiles(mySelFile, "*.xml")
    For Each analyse As String In allAnalyses
        
    Next

From here on however this is rather something for a new thread in forum796


"Knowledge is power. Information is liberating. Education is the premise of progress, in every society, in every family." (Kofi Annan)
Oppose SOPA, PIPA, ACTA; measures to curb freedom of information under whatever name whatsoever.
 
I finally got this code!!

and its working but it someonething the code complains on:

Code:
Public Class SdlStudioChanger

    Private Sub BT_Browse_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BT_Browse.Click

        ' Set Folder PATH default
        FolderBrowserDialog1.SelectedPath = My.Computer.FileSystem.SpecialDirectories.MyDocuments

        ' Show the new folder button
        FolderBrowserDialog1.ShowNewFolderButton = True

        If FolderBrowserDialog1.ShowDialog() = Windows.Forms.DialogResult.OK Then
            ' Get the full path to the file that selected by the user.
            Dim mySelFile As String = FolderBrowserDialog1.SelectedPath

            ' Displays the full path of the file selected by the user in the box (TextBox)
            TB_chemin_dossier.Text = mySelFile

            'Displays the folder name (only) selected, the user"Subtlety, use the" IO.Path.GetFileName "on the path to a folder
            'To get the name of the target folder.
            'While "IO.Path.GetDirectoryName" would have shown you the folder path CONTAINING file
            'Targeted by the specified path as a parameter
            'MsgBox("Du har valt: " & IO.Path.GetFileName(mySelFile))
            For Each filename As String In IO.Directory.GetFiles(mySelFile, "*.xml")

                Dim analyse
                Dim exactContexts
                Dim subnode
                Dim repeated
                Dim realRepeated
                Dim tmpValue

                analyse = CreateObject("Msxml2.DOMDocument.6.0")
                analyse.Load(filename)

                exactContexts = analyse.SelectNodes("//inContextExact")

                For i = 0 To exactContexts.Length - 1
                    subnode = exactContexts(i)
                    For Each att In subnode.Attributes
                        If att.Name = "words" Then
                            att.Value = "0"
                            Exit For
                        End If
                    Next att
                Next i

                repeated = analyse.SelectNodes("//crossFileRepeated")

                For i = 0 To repeated.Length - 1
                    subnode = repeated(i)
                    For Each att In subnode.Attributes
                        If att.Name = "words" Then
                            tmpValue = att.Value
                            att.Value = "0"
                            Exit For
                        End If
                    Next att

                    realRepeated = subnode.NextSibling
                    For Each att In realRepeated.Attributes
                        If att.Name = "words" Then
                            att.Value = Val(att.Value) + Val(tmpValue)
                            Exit For
                        End If
                    Next att
                Next i

                analyse.Save(filename)
                MsgBox("nu är filen: " & filename & " ändrade")
            Next
        Else
            'if the user has not selected a folder, it is a warning
            MsgBox("Ingen fil vald", MsgBoxStyle.Exclamation, "Inga markerade mappar")
        End If

    End Sub

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    End Sub

End Class

PE3SflV.png
 
Two things:
1) this is just a warning. In this case you can ignore it.
2) far more serious is this line:
Code:
 For Each filename As String In IO.Directory.GetFiles(mySelFile, "*.xml")
'...
analyse.Save(filename)
You should never iterate over the collection you are (sort of) changing. Apart from possible side-effects a copy of your array is probably being re-queried with every Next.
Assign the result of GetFiles to a string array variable and use that array in your for each instead.

"Knowledge is power. Information is liberating. Education is the premise of progress, in every society, in every family." (Kofi Annan)
Oppose SOPA, PIPA, ACTA; measures to curb freedom of information under whatever name whatsoever.
 
I did this code is it ok?

Code:
  Dim tmpValue As String = ""
 
Yeah, that's fine.

"Knowledge is power. Information is liberating. Education is the premise of progress, in every society, in every family." (Kofi Annan)
Oppose SOPA, PIPA, ACTA; measures to curb freedom of information under whatever name whatsoever.
 
I have a little question I am almost really done with my code and yours haha!

How do I add an alert that tells me how many files are modified? when its finished?


also if there is no xml files in the folder i select then msgbox no xml files in the folder.
Thank you in advance
 
1.) Two simple integer variables should suffice for that.
Code:
Dim contextModified As Integer = 0
Dim repeatModified as Integer = 0
then later, before you set the words to "0", just add a little checker before it:
Code:
 If att.Value <> 0 Then contextModified = contextModified+1
att.Value = "0"

And the same if block for "repeatedModified". Now you have the amount of modified nodes in these two variables each.

The other is as simple as:
Code:
If Not Directory.GetFiles(mySelFile,"*.xml").Any() Then
        MsgBox("No files to process.")
    Else 
        'do your stuff
    End If

"Knowledge is power. Information is liberating. Education is the premise of progress, in every society, in every family." (Kofi Annan)
Oppose SOPA, PIPA, ACTA; measures to curb freedom of information under whatever name whatsoever.
 
new code

Code:
Public Class SdlStudioChanger

    Private Sub BT_Browse_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BT_Browse.Click

        ' Set Folder PATH default
        FolderBrowserDialog1.SelectedPath = My.Computer.FileSystem.SpecialDirectories.MyDocuments

        ' Show the new folder button
        FolderBrowserDialog1.ShowNewFolderButton = True

        If FolderBrowserDialog1.ShowDialog() = Windows.Forms.DialogResult.OK Then
            ' Get the full path to the file that selected by the user.
            Dim mySelFile As String = FolderBrowserDialog1.SelectedPath




            ' Displays the full path of the file selected by the user in the box (TextBox)
            Tb_FilePath.Text = mySelFile

            'Displays the folder name (only) selected, the user"Subtlety, use the" IO.Path.GetFileName "on the path to a folder
            'To get the name of the target folder.
            'While "IO.Path.GetDirectoryName" would have shown you the folder path CONTAINING file
            'Targeted by the specified path as a parameter
            'MsgBox("Du har valt: " & IO.Path.GetFileName(mySelFile))
            If Not IO.Directory.GetFiles(mySelFile, "*.xml").Any() Then
                MsgBox("No files to process.")
            Else


                For Each filename As String In IO.Directory.GetFiles(mySelFile, "*.xml")

                    Dim analyse
                    Dim exactContexts
                    Dim subnode
                    Dim repeated
                    Dim realRepeated
                    Dim tmpValue As String = ""
                    Dim contextModified As Integer = 0
                    Dim repeatModified As Integer = 0


                    analyse = CreateObject("Msxml2.DOMDocument.6.0")
                    analyse.Load(filename)

                    exactContexts = analyse.SelectNodes("//inContextExact")

                    For i = 0 To exactContexts.Length - 1
                        subnode = exactContexts(i)
                        For Each att In subnode.Attributes
                            If att.Name = "words" Then
                                att.Value = "0"
                                Exit For
                            End If
                        Next att
                    Next i

                    repeated = analyse.SelectNodes("//crossFileRepeated")

                    For i = 0 To repeated.Length - 1
                        subnode = repeated(i)
                        For Each att In subnode.Attributes
                            If att.Name = "words" Then
                                tmpValue = att.Value
                                If att.Value <> 0 Then contextModified = contextModified + 1
                                att.Value = "0"
                                Exit For
                            End If
                        Next att

                        realRepeated = subnode.NextSibling
                        For Each att In realRepeated.Attributes
                            If att.Value <> 0 Then repeatModified = repeatModified + 1
                            If att.Name = "words" Then
                                att.Value = Val(att.Value) + Val(tmpValue)
                                Exit For
                            End If
                        Next att
                    Next i

                    'msgbox'
                    analyse.Save(filename)

                Next

            End If

            'if the user has not selected a folder, it is a warning
            MsgBox("Ingen fil vald", MsgBoxStyle.Exclamation, "Inga markerade mappar")
        End If



    End Sub

I think I have put an if somewhere wrong cause I get a msg (ingen fil vald) all the time. hmm
 
Solved partly by using


Code:
 Dim intcount As Integer = Nothing




            For Each filename As String In IO.Directory.GetFiles(mySelFile, "*.xml")


       
                intcount = intcount + 1



 MsgBox("det är (" + intcount.ToString + ") filer som är modiferade")
 
I am finished now need to find a tutorial how to compile it?

I guess I get all errors while I press ctrl + F5
cause I have done the settings wrong.

SvHPSLK.png




error:

Code:
See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
   at SDL_studio_analys_Changer.SdlStudioChanger.BT_Browse_Click(Object sender, EventArgs e) in C:\Users\daniel.elmnas.TT\Desktop\iw_selection_dossier\iw_selection_dossier\Interface.vb:line 75
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
SDL studio analys Changer
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Users/daniel.elmnas.TT/Desktop/iw_selection_dossier/iw_selection_dossier/bin/Debug/SDL%20studio%20analys%20Changer.exe
----------------------------------------
Microsoft.VisualBasic
    Assembly Version: 10.0.0.0
    Win32 Version: 12.0.51209.34209 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34238 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34251 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34234 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Runtime.Remoting
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34245 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Remoting/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
----------------------------------------
CustomMarshalers
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/CustomMarshalers/v4.0_4.0.0.0__b03f5f7f11d50a3a/CustomMarshalers.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top