Beispiel #1
0
        private void SearchForPropertiesAndAddMSIL()
        {
            string path = "";

            try
            {
                bool hasBuild = false;
                FilePattern = (FilePattern ?? "*.dll");
                if (!FilePattern.EndsWith(".dll", StringComparison.CurrentCultureIgnoreCase))
                {
                    FilePattern = FilePattern + ".dll";
                }
                var pathList = Directory.GetFiles(SolutionDir, FilePattern, SearchOption.AllDirectories);
                foreach (string assemblyPath in pathList)
                {
                    path = Path.GetFullPath(assemblyPath);
                    if (AssemblyBuilder.BuildToFile(path, SolutionDir))
                    {
                        hasBuild = true;
                    }
                }
                if (!hasBuild)
                {
                    Log.LogWarning("The model:\"" + FilePattern + "\" has not be builded.");
                }
            }
            catch (Exception ex)
            {
                Log.LogError("The model:\"" + FilePattern + "\" build error:" + ex.Message + "\r\n" + ex.StackTrace);
            }
        }