Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 VA Outline Bug
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

bmacadam
Starting Member

USA
1 Posts

Posted - Mar 02 2017 :  1:27:15 PM  Show Profile  Reply with Quote
I discovered a problem today in VA Outline that I believe is a bug. I'm using a string format expression in C# that appears to cause problems with parsing the code file. The result is that any methods after the method that contains the expression do not appear in the outline.

I created a simple console app that replicates the issue. It builds and runs but the outline does not display Method2. Here it is:


using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace TestConsole
{
    class Program
    {
        static void Main(string[] args)
        {
            TestClass tc = new TestClass();
            tc.Method1(2017, 1);
        }
    }

    class TestClass
    {
        public TestClass()
        {
        }

        public void Method1(int DatabaseYear, int DatabaseMonth)
        {
            string fileName = "test";
            string folder = "testFolder";
            string errorMessage = "Failed to copy";

            // this is the line
            string s = $"Error while copying {fileName} to {Path.Combine(folder, $"Data{DatabaseYear}{DatabaseMonth:D2}01.dat")}. {errorMessage}";
            Console.WriteLine(s);
            Console.ReadLine();
        }

        private void Method2()
        {

        }
    }
}



Here's my version information:
VA_X.dll file version 10.9.2118.0 built 2016.12.12
DevEnv.exe version 14.0.25420.1 Professional
msenv.dll version 14.0.25431.1
Comctl32.dll version 6.10.14393.447
Windows 10 10.0 Build 14393
8 processors (x86-64, WOW64)
Language info: 1252, 0x409

Platform: Project defined
Stable Includes:

Other Includes:

Stable Source Directories:

feline
Whole Tomato Software

United Kingdom
19066 Posts

Posted - Mar 02 2017 :  2:01:17 PM  Show Profile  Reply with Quote
Thank you for the very clear example, having working code that shows the problem always makes things easier to test :) I am seeing the same problem here:

case=104114

It's not just VA Outline that is having a problem here, it is also showing up in the Alt-M list and colouring. I had to look up the $"" syntax to see what it was doing. For now, if you don't have to many of these lines, turning them back into String.Format calls should fix this, but this will require changing your code to work around this problem.

zen is the art of being at one with the two'ness
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000