Ejemplo n.º 1
0
        protected override string GenerateFullPathToTool()
        {
            // try Porting Kit path first
            string spoclient   = Environment.GetEnvironmentVariable("SPOCLIENT");
            string filenameMDP = "";

            if (!string.IsNullOrEmpty(spoclient))
            {
                filenameMDP = Path.Combine(spoclient, "Tools\\Bin\\MetaDataProcessor.exe");
            }

            if (string.IsNullOrEmpty(filenameMDP) || !File.Exists(filenameMDP))
            {
                filenameMDP = Path.Combine(Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location), "MetaDataProcessor.exe");

                if (!File.Exists(filenameMDP))
                {
                    GetDeviceFrameworkPaths getDevice = new GetDeviceFrameworkPaths();

                    if (getDevice.Execute())
                    {
                        filenameMDP = Path.Combine(getDevice.ToolsPath, "MetaDataProcessor.exe");
                    }
                }
            }

            if (!File.Exists(filenameMDP))
            {
                Log.LogError(string.Format("No MetadataProcessor tool found at \"{0}\"", filenameMDP));
            }
            return(filenameMDP);
        }
Ejemplo n.º 2
0
        protected override string GenerateFullPathToTool()
        {
            // try Porting Kit path first
            string spoclient   = Environment.GetEnvironmentVariable("BUILD_TREE_SERVER");
            string filenameMDP = "";

            if (!string.IsNullOrEmpty(spoclient))
            {
                filenameMDP = Path.Combine(spoclient, "dll\\MetaDataProcessor.exe");
            }

            if (string.IsNullOrEmpty(filenameMDP) || !File.Exists(filenameMDP))
            {
                filenameMDP = Path.Combine(Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location), "MetaDataProcessor.exe");

                if (!File.Exists(filenameMDP))
                {
                    string path = Path.Combine(Environment.GetEnvironmentVariable("ProgramFiles"), @"Reference Assemblies\Microsoft\Framework\.NETMicroFramework");

                    if (Directory.Exists(path))
                    {
                        string ver = m_bag.ContainsKey("TargetFrameworkVersion") ? (string)m_bag["TargetFrameworkVersion"] : "v4.2";

                        filenameMDP = Path.Combine(Path.Combine(path, ver), "MetaDataProcessor.exe");

                        if (!File.Exists(filenameMDP))
                        {
                            GetDeviceFrameworkPaths getDevice = new GetDeviceFrameworkPaths();

                            if (getDevice.Execute())
                            {
                                filenameMDP = Path.Combine(getDevice.ToolsPath, "MetaDataProcessor.exe");
                            }
                        }
                    }
                }
            }

            if (!File.Exists(filenameMDP))
            {
                Log.LogError(string.Format("No MetadataProcessor tool found at \"{0}\"", filenameMDP));
            }
            return(filenameMDP);
        }
Ejemplo n.º 3
0
        protected override string GenerateFullPathToTool()
        {
            // try Porting Kit path first
            string spoclient = Environment.GetEnvironmentVariable("BUILD_TREE_SERVER");
            string filenameMDP = "";

            if (!string.IsNullOrEmpty(spoclient))
            {
                filenameMDP = Path.Combine(spoclient, "dll\\MetaDataProcessor.exe");
            }

            if (string.IsNullOrEmpty(filenameMDP) || !File.Exists(filenameMDP))
            {

                filenameMDP = Path.Combine(Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location), "MetaDataProcessor.exe");

                if (!File.Exists(filenameMDP))
                {
                    string path = Path.Combine(Environment.GetEnvironmentVariable("ProgramFiles"), @"Reference Assemblies\Microsoft\Framework\.NETMicroFramework");

                    if(Directory.Exists(path))
                    {
                        string ver = m_bag.ContainsKey("TargetFrameworkVersion") ? (string)m_bag["TargetFrameworkVersion"] : "v4.2";

                        filenameMDP = Path.Combine(Path.Combine( path, ver ), "MetaDataProcessor.exe");

                        if(!File.Exists(filenameMDP))
                        {
                            GetDeviceFrameworkPaths getDevice = new GetDeviceFrameworkPaths();

                            if (getDevice.Execute())
                            {
                                filenameMDP = Path.Combine(getDevice.ToolsPath, "MetaDataProcessor.exe");
                            }
                        }
                    }
                }
            }
            
            if (!File.Exists(filenameMDP))
            {
                Log.LogError( string.Format("No MetadataProcessor tool found at \"{0}\"", filenameMDP) );
            }
            return filenameMDP;
        }
Ejemplo n.º 4
0
        private void EnsureInitialization(string version)
        {
            GetDeviceFrameworkPaths deviceFrameworkPaths = new GetDeviceFrameworkPaths();

            while (true)
            {
                deviceFrameworkPaths.RuntimeVersion = version;

                if (deviceFrameworkPaths.Execute())
                {
                    m_frameworkAssembliesPath = deviceFrameworkPaths.FrameworkAssembliesPath;
                    m_frameworkToolsPath = deviceFrameworkPaths.ToolsPath;

                    m_runtimeVersionInstalled = version;
                    break;
                }

                Debug.Assert(version[0] == 'v');
                //remove the build number from the version, and try again
                int iDot = version.LastIndexOf('.');

                if (iDot < 0)
                    break;

                version = version.Substring(0, iDot);
            }        
        }
Ejemplo n.º 5
0
        protected override string GenerateFullPathToTool()
        {
            // try Porting Kit path first
            string spoclient = Environment.GetEnvironmentVariable("SPOCLIENT");
            string filenameMDP = "";

            if (!string.IsNullOrEmpty(spoclient))
            {
                filenameMDP = Path.Combine(spoclient, "Tools\\Bin\\MetaDataProcessor.exe");
            }

            if (string.IsNullOrEmpty(filenameMDP) || !File.Exists(filenameMDP))
            {

                filenameMDP = Path.Combine(Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location), "MetaDataProcessor.exe");

                if (!File.Exists(filenameMDP))
                {
                    GetDeviceFrameworkPaths getDevice = new GetDeviceFrameworkPaths();

                    if (getDevice.Execute())
                    {
                        filenameMDP = Path.Combine(getDevice.ToolsPath, "MetaDataProcessor.exe");
                    }
                }
            }
            
            if (!File.Exists(filenameMDP))
            {
                Log.LogError( string.Format("No MetadataProcessor tool found at \"{0}\"", filenameMDP) );
            }
            return filenameMDP;
        }