AcCoreConsole.exe .in 2015 doesn't do System.Console.WriteLine() like 2013?

AcCoreConsole.exe .in 2015 doesn't do System.Console.WriteLine() like 2013?

CADbloke
Advocate Advocate
9,176 Views
28 Replies
Message 1 of 29

AcCoreConsole.exe .in 2015 doesn't do System.Console.WriteLine() like 2013?

CADbloke
Advocate
Advocate

Greetings,  I have the same tests (same code!) written in NUnit and running in the NUnitLite version 3 runner. How, you ask? - https://github.com/CADbloke/CADtest but I digress...

 

BUT, the tests run fine and look great in the v2013 x64 accoreconsole.exe but v2015 x64 is rubbish. The code does actually run the tests in both versions and produces the same TestResults.xml but the results don't show on the commandline in v2015. Just to add to the joy, the text it does write to the console writes telex-style, slowly, taking a few seconds to write a whole line (well, the 1st line anyway). 

 

What happened?

Is accoreconsole.exe different in v2015?

Did I break it? (yes, I re-installed AutoCAD 2015).

Does v2015 not support System.console.Write...?

 

here are 2,000 words in pictures.

 

2013 looks nice

CoreConsole2013.png

 

2015 sucks. WHY?

CoreConsole2015.png

- - - - - - -
working on all sorts of things including www.tvCAD.tv & www.CADreplace.com
Accepted solutions (1)
9,177 Views
28 Replies
Replies (28)
Message 21 of 29

CADbloke
Advocate
Advocate

@autodaug  Thank you for finding all this out. It makes sense in the context of the reasons they redirected it. I haven't seen the garbage text you mention but I really haven't used the Core console much, just mainly for running NUnit in CADtest. I haven't ran a long session of Core Console, or even AutoCAD with a System.Console allocated, and see if it spits out the same garbage so I haven't noticed that issue.

 

Redirecting the garbage calls separately would have been the correct way to fix it I bet they are wildly inconsistent (such is the nature of very mature, giant code bases). By redirecting everything they seem to have thrown the baby out with the bath water and then swept it all under the carpet. Perhaps they could just have redirected stderr, assuming all the Trace etc. calls go there and not to stdout  ??

 

In the long term I want that to present CADtest's results in a GUI anyway so the Core Console's content will be irrelevant at that stage. Looking into NUnit v3's code I think that subclassing NUnitLite.Runner.TextUI  and calling that from NUnitLite.Runner.AutoRun.Execute(); to write to the Editor rather than the Console could be a way but the GUI idea may be a better use of my time. I would be (lpleasantly) shocked if the text in the Editor was coloured.

 


@autodaug wrote:

As for the slow output and messed up long line scrolling, those are being tracked as bugs, and we've shown some partial workarounds. The good news is that the work on AcCoreConsole is affected by external developer feedback, contrary to what I implied a few posts ago.. 


Yes, this is not your Grandfather's Autodesk. Just for the record, I have noticed a real and solid change in the way Autodesk deals with developers, even insignificant ones like me. In days of old support requests would just vanish into a black hole when there was no easy pre-scripted answer for an outsourced "consultant" to regurgitate, and annual releases seemed to be thrown over a soundrpoof wall. Many years ago I complained about it quite loudly and Shaan Hurley pinged me for it, I was rude but I wasn't wrong. This thread (and things like annual Dev days, ADN on Github etc ) is a great example of this is definitely not the case these days, far from it. Well, ok, I'm still rude and often wrong but Autodesk is much better to deal with these days.

 

It would be nice to see the redirection issue with the Core Console resolved in a more flexible manner. I also understand how resources are not an infinte resource.

 

Thanks again for all your time and effort looking into this.

 

cheeers

Ewen

CAD bloke

 

 

- - - - - - -
working on all sorts of things including www.tvCAD.tv & www.CADreplace.com
Message 22 of 29

jeff
Collaborator
Collaborator

Setting RedirectStandardOutput = true works okay for me.

The strings returned are wchar wide so needed trimming, but did not update to get command line  asynchronously and just used StandardOutput.ReadToEnd().

 

Attached is little app from

 http://www.theswamp.org/index.php?topic=41948.msg538676#msg538676

 

Updated to print out command line info.

The link aboves explains to place dwgs in folder inside solution and scripts

 

 

Pic of updated little testing app that is attached below

 

coreconsole.PNG

 

 

 

You can also find your answers @ TheSwamp
0 Likes
Message 23 of 29

CADbloke
Advocate
Advocate
Very interesting. Thanks. New project: combine the multi-tasking of this with ScriptPro, or something like it. Because heaps of spare time!

cheers
🙂
- - - - - - -
working on all sorts of things including www.tvCAD.tv & www.CADreplace.com
0 Likes
Message 24 of 29

phliberato
Advocate
Advocate

Hello Ewen,

Could you solve this problem? I have the same problem using Autocad 2015 even using FixStdOut function.

 

Thanks

0 Likes
Message 25 of 29

CADbloke
Advocate
Advocate

@pholib wrote:

Hello Ewen,

Could you solve this problem? I have the same problem using Autocad 2015 even using FixStdOut function.

 

Thanks


Nope, other than to use AutoCAD 2013.

 

I did get the NUnit command window to run inside the AutoCAD GUI in CADtest but it takes longer than just running the CoreConsole. See the conditional compilation parts at https://github.com/CADbloke/CADtest/blob/master/CADtest-CS/CADtestApp.cs. I think that worked in later versions as well. My memory is hazy on that (well, on most things). Look for 

#if !CoreConsole

...so, that's how this forum does inline code, eh? Speaking of badly broken ...The CADtest project on Github is (probably) broken at the moment - I haven't had time to revisit it and fix the NUnit references I broke, plus NUnit has progressed since then. I changed versions of the .NET framework along the way and there are a few broken things in it. I haven't looked at it for a while, sorry.

- - - - - - -
working on all sorts of things including www.tvCAD.tv & www.CADreplace.com
0 Likes
Message 26 of 29

phliberato
Advocate
Advocate

Thanks Ewen for your reply! I'm using ReportUnit to show my tests results running in CoreConsole, so..... somehow it is working.... but I would like to know if you solve this someday!

0 Likes
Message 27 of 29

CADbloke
Advocate
Advocate

Bumping this for Answer Day because this was never really answered - who the hell decided that a Console Application should lose all of its console behaviour? It's useless. I'd ask in after 6am PT but that is midnight here in Sydney. I'd ask at a Dev Day but we haven't had one in Australia for years.

- - - - - - -
working on all sorts of things including www.tvCAD.tv & www.CADreplace.com
0 Likes
Message 28 of 29

FlorisvdG
Advocate
Advocate

I know this thread is super old. However, The CADBloke repository sent me here.

Has there been any update on this? Can we get the coloured output from NUnit within acCoreConsole like <2015?

 

0 Likes
Message 29 of 29

CADbloke
Advocate
Advocate

@FlorisvdG wrote:

I know this thread is super old. However, The CADBloke repository sent me here.

Has there been any update on this? Can we get the coloured output from NUnit within acCoreConsole like <2015?

 


No idea, I haven't tried. I gave up after this debacle. 

 

- - - - - - -
working on all sorts of things including www.tvCAD.tv & www.CADreplace.com
0 Likes