Support Statement: VS Version Selection
Question
Section titled “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
Section titled “Answer”gmStudio has a batch file call SetEnv.cmd that sets the VS environment by finding and running a batch file called vsvars32.bat. vsvars32.bat is part of the VS distributions and is version specific.
I think the error is coming from vsvars32.bat. You may edit SetEnv.cmd, if you want. We pass in the DevEnv string, e.g., VS2013.
See listing below
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=VS2015if exist %vssetup% goto callOtherVS
set vssetup="%VS120COMNTOOLS%vsvars32.bat"set foundVS=VS2013if exist %vssetup% goto callOtherVS
set vssetup="%VS110COMNTOOLS%vsvars32.bat"set foundVS=VS2012if exist %vssetup% goto callOtherVS
set vssetup="%VS100COMNTOOLS%vsvars32.bat"set foundVS=VS2010if exist %vssetup% goto callOtherVS
set vssetup="%VS90COMNTOOLS%vsvars32.bat"set foundVS=VS2008if exist %vssetup% goto callOtherVS
set vssetup="%VS80COMNTOOLS%vsvars32.bat"set foundVS=VS2005if exist %vssetup% goto callOtherVS
set vssetup="%VS71COMNTOOLS%vsvars32.bat"set foundVS=VS2003
if not exist %vssetup% goto err:callOtherVS
echo Found Version %foundVS%:callvsecho ------------------------------------------------------------------
CALL %vssetup%goto end
:errecho %vssetup% NOT FOUNDecho Unable to setup .NET Framework SDK command line tools.echo See %0.exit /b 1
:end