Question
...
...
Just clicked the gmStudio button “.NET IDE” to open a project in Visual Studio and noticed this error in the log that mentions “log4net”. Is this a gmStudio error?
...
Selected Visual Studio Version: VS2013
------------------------------------------------------------------
log4net:WARN Unable to set property [securityContext] on object [log4net.Appender.FileAppender] using value [log4net.Util.NullSecurityContext.Instance] (with acceptable conversion types)
Answer
gmStudio has a batch file call SetEnv.cmd
that sets the VS environment by finding and running a by finding and running a batch file called vsvars32called vsvars32.bat.
vsvars32.
bat is bat
is part of the VS distributions and is version specific.
...
...
SetEnv.cmd
, if you want. We pass in the DevEnv string, e.g., VS2013....
Code Block |
---|
SetEnv.cmd ----------------------- |
@echo off |
:: default to VS2010 if not specified. |
if [%1]==[] set vssetup="%VS100COMNTOOLS%vsvars32.bat" |
if [%1]==[VS2003] set vssetup="%VS71COMNTOOLS%vsvars32.bat" |
if [%1]==[VS2005] set vssetup="%VS80COMNTOOLS%vsvars32.bat" |
if [%1]==[VS2008] set vssetup="%VS90COMNTOOLS%vsvars32.bat" |
if [%1]==[VS2010] set vssetup="%VS100COMNTOOLS%vsvars32.bat" |
if [%1]==[VS2012] set vssetup="%VS110COMNTOOLS%vsvars32.bat" |
if [%1]==[VS2013] set vssetup="%VS120COMNTOOLS%vsvars32.bat" |
if [%1]==[VS2015] set vssetup="%VS140COMNTOOLS%vsvars32.bat" |
:: If you do not have VisualStudio installed, and only the SDK, you will |
:: need to use something like the following command depending on the target |
:: framework SDK installation. |
:: if [%1]==[VS2008] set vssetup="C:\Program Files\Microsoft.NET\SDK\v2.0\Bin\sdkvars.bat" |
echo Selected Visual Studio Version: %1 |
if exist %vssetup% goto callvs |
:: If Visual Studio was not detected we should scan for one that exists so we can build |
echo WARNING: Selected Visual Studio Not Found, scanning for one installed |
set vssetup="%VS140COMNTOOLS%vsvars32.bat" |
set foundVS=VS2015 |
if exist %vssetup% goto callOtherVS |
set vssetup="%VS120COMNTOOLS%vsvars32.bat" |
set foundVS=VS2013 |
if exist %vssetup% goto callOtherVS |
set vssetup="%VS110COMNTOOLS%vsvars32.bat" |
set foundVS=VS2012 |
if exist %vssetup% goto callOtherVS |
set vssetup="%VS100COMNTOOLS%vsvars32.bat" |
set foundVS=VS2010 |
if exist %vssetup% goto callOtherVS |
set vssetup="%VS90COMNTOOLS%vsvars32.bat" |
set foundVS=VS2008 |
if exist %vssetup% goto callOtherVS |
set vssetup="%VS80COMNTOOLS%vsvars32.bat" |
set foundVS=VS2005 |
if exist %vssetup% goto callOtherVS |
set vssetup="%VS71COMNTOOLS%vsvars32.bat" |
set foundVS=VS2003 |
if not exist %vssetup% goto err |
:callOtherVS |
echo Found Version %foundVS% |
:callvs |
echo ------------------------------------------------------------------ |
CALL %vssetup% |
goto end |
:err |
echo %vssetup% NOT FOUND |
echo Unable to setup .NET Framework SDK command line tools. |
echo See %0. |
exit /b 1 |
Sent: Wednesday, July 13, 2016 1:08 PM
To: Mark Juras
Subject: RE: Migration of TabCtl32.TabDlg
Just clicked the gmStudio button “.NET IDE” to open a project in Visual Studio and noticed this error in the log that mentions “log4net”. Is this a gmStudio error?
Selected Visual Studio Version: VS2013
------------------------------------------------------------------
log4net:WARN Unable to set property [securityContext] on object [log4net.Appender.FileAppender] using value [log4net.Util.NullSecurityContext.Instance] (with acceptable conversion types)
From: Mark Juras [mailto:mark.juras@GreatMigrations.com]
Sent: 11 July 2016 15:59
To: Andrés Meerhoff <ame@greycon.com>
Subject: RE: Migration of TabCtl32.TabDlg
Just minor things. Mainly some design ideas and process changes that will make it easier and more helpful.
Like making sure the log is cleared each time you start a run. I also decided that the indenting is not a good idea as it makes it harder to compare. And found that shared files consolidation can also introduces some differences in logging. I am thinking a better way to do it might be reference an external logger DLL in each VBP rather than adding a separate module and then adding a control file that allows turning logging on and off to “focus the logging lens” on one part of the code at a time. Also planning to explore upgrading gmTraceLogger to something like log4net – although I found that to be a too feature rich for my needs.
From: Andrés Meerhoff [mailto:ame@greycon.com]
Sent: Monday, July 11, 2016 2:28 PM
To: Mark Juras
Subject: RE: Migration of TabCtl32.TabDlg
We used trace logging a few months ago when migrating one of the vb6 projects (an in-house control that used GDI), as a way to generate a sample application with test cases that just used that component.
In that way we validated that it worked fine at an earlier stage without having to wait for the migration of the main app.
But we are not currently using trace logging any longer. What kind of improvements did you make on that area?
From: Mark Juras [mailto:mark.juras@GreatMigrations.com]
Sent: 11 July 2016 15:03
To: Andrés Meerhoff <ame@greycon.com>
Subject: RE: Migration of TabCtl32.TabDlg
I found using instrumented code that generates trace logs on both sides is helpful to identifying behind the scenes issues. I have made some improvements to the process for doing that using it as part of the upgrade development process.
A huge challenge is that form initialization is quite different, and that can lead to state differences and functional defects. But not always, so using those parts of the log comparison takes more thought.
The other issue is premature re-engineering/refactoring that is needed to get to runnable, but also makes it harder to compare trace logs.
The trace logging process is a bit primitive, but even so it can provide information that truly expedites issue resolution. I was also finding that property use of MigrationSupport.Utils.ResumeNext can assist with cleaning up bad coding practices; albeit not an issues if the original code avoided the evil On Error Resume Next.
Are you trace logging in your project?
September is coming up; but it sounds like the real deal is March. I think it will be an impressive result if you retool the staff and complete a full .NET deployment to production within two years of start.
From: Andrés Meerhoff [ame@greycon.com]
Sent: Monday, July 11, 2016 1:49 PM
To: Mark Juras
Subject: RE: Migration of TabCtl32.TabDlg
We started delivering versions of the latest migrated executables to QA, so they can do some exploratory testing/side by side testing, but only on the forms that we flag as migrated.
They found lots of runtime issues on forms that we thought were ready though.
Pressure has increased on ourselves a bit more now that the app “runs”.
The plan is to freeze the vb6 code development on the trunk version of SVN on September probably, move the vb6 team to .Net at that time, and by the end of the year release the new migrated version. There’s a project for a new customer that will go live in March probably using the migrated version.
From: Mark Juras [mailto:mark.juras@GreatMigrations.com]
Sent: 11 July 2016 14:17
To: Andrés Meerhoff <ame@greycon.com>
Subject: RE: Migration of TabCtl32.TabDlg
Just realized I did not answer your question.
I have requested Character.IsLowerCase, but we have some other priorities right now -- specifically I have a functional equivalence objective for a complex system that is keeping me very busy. Fred is working on a feature that will declare use a custom interface for multi-type function arguments rather than using dynamic. We also have three other projects running right after that. One of those is bringing a very large (1M LOC) complex VB6 application to build complete and another is bringing a 200K LOC VB6/ASP app to FEQ.
So, Character.IsLowerCase will be in the tool but probably not until the end of August. Sorry.
How are things going on your end?
From: Mark Juras
Sent: Friday, June 24, 2016 3:07 PM
To: Andrés Meerhoff
Subject: RE: Migration of TabCtl32.TabDlg
Length is the sizeof operator. Although Characerter.Length would be a reasonable alternative.
From: Andrés Meerhoff [ame@greycon.com]
Sent: Friday, June 24, 2016 2:55 PM
To: Mark Juras
Subject: RE: Migration of TabCtl32.TabDlg
Thanks.
In the end I didn’t use that class mapped the TabDlg to the Infragistics UltraTabControl instead (I will have to re-author a couple of methods that add a tab at runtime though)
BTW, are you considering adding a Character.IsLowercase() function so it can be used by gmSL for next release?
I prefer using gmSL as it will be integrated with the translation process and would be the fastest and cleanest solution, but if you are not planning on adding such a function I’ll have to rely on an external mechanism: I’d write some gmSL to export the symbol information I need to an external file, call an external tool that I would need to write in C#, calling that from UsrCmds… but it just seems to me that functions IsLoweCase() and Length() are missing from the Character class.
Cheers,
Andres
From: Mark Juras [mailto:mark.juras@GreatMigrations.com]
Sent: 22 June 2016 20:13
To: Andrés Meerhoff <ame@greycon.com>
Subject: RE: Migration of TabCtl32.TabDlg
I placed the code in your folder; and attached.
From: Andrés Meerhoff [mailto:ame@greycon.com]
Sent: Monday, June 20, 2016 9:59 AM
To: Mark Juras
Subject: Migration of TabCtl32.TabDlg
Hello Mark,
I started migrating the TabDlg control so I activated GM.TABCTL32.OCX.xml that maps to MigrationSupport.UI.TabControl, but found that the corresponding class is not being included in MigrationSupport.dll.
Do you have that class at hand?
Thanks,
Andres
Andres Meerhoff
Software Engineer
View the animated video about the KBP algorithm !
T: +(598) 2411 1851 ext 818/849Greycon Ltd
www.greycon.com
:end
|