Beispiel #1
0
        public void TryFixingFramework(FileFormat format, DotNetProject item)
        {
            // If the solution format can't write this project it may be due to an unsupported
            // framework. Try finding a compatible framework.

            TargetFramework curFx = item.TargetFramework;

            foreach (TargetFramework fx in Runtime.SystemAssemblyService.GetTargetFrameworks())
            {
                item.TargetFramework = fx;
                if (format.CanWrite(item))
                {
                    return;
                }
            }
            item.TargetFramework = curFx;
        }