c# - Unable to Use BreakPoints After Trying to Add Command-Line Support -


update 3

this being caused post-build action included uses ilmerge. see here more details

update2

it seems not directly caused adding command-line support, still don't know did cause it. see so question more details.

update

after making below changes allow command-line support, cannot step through program message on breakpoints:

the breakpoint not hit. no symbols have been loaded document

i checked this answer , found missing file microsoft.visualstudio.debugger.runtime.pdb have no idea has gone ..

is there reason why happen because of app.xaml update?


i have wpf application need implement command-line arguments.

following answer @ this question, amended app.xaml remove startupuri attribute:

<application x:class="wpffiledeleter.app"              xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"              xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"              xmlns:local="clr-namespace:wpffiledeleter"              >         <application.resources>     </application.resources> </application> 

i added override method app.xaml.cs:

protected override void onstartup(startupeventargs e) {     base.onstartup(e);      e.args.contains("mytriggerarg")             {             // stuff     } } 

but after inserting break-point @ top of onstartup , debugging application in visual studio, hangs in ready state never allows me step through program.

i tried following values startupuri:

startupuri = "app.xaml" startupuri = "app.xaml.cs" startupuri = "app.xaml.cs.onstartup" 

but application throws "cannot locate resource" ioexception

according ethicallogics's answer, enough define startup parameter in app_start event handler. if delete starupuri xaml need define somethingelse in sratup handler instead of that

how start wpf based on arguments


Comments

Popular posts from this blog

many to many - Django Rest Framework ManyToMany filter multiple values -

java - Jasper subreport showing only one entry from the JSON data source when embedded in the Title band -

Java Entity Manager - JSON reader was expecting a value but found 'db' -