private TargetPlatform DetermineTargetPlatform(IProjectPropertyProvider propertyProvider) { try { if (!Environment.Is64BitOperatingSystem) { return(TargetPlatform.X86); } string target = propertyProvider.PlatformTarget; if (target == "x64") { return(TargetPlatform.X64); } if (target == "x86") { return(TargetPlatform.X86); } if (propertyProvider.Prefer32Bit) { return(TargetPlatform.X86); } } catch (Exception) { } return(TargetPlatform.X64); }
public ProjectPublisher(JitTarget jitTarget, string configurationName, IProjectPropertyProvider propertyProvider, ILogger logger) { _jitTarget = jitTarget; _configurationName = configurationName; _propertyProvider = propertyProvider; _logger = logger; }
private static string GetAssemblyPath(IProjectPropertyProvider propertyProvider) { try { string outputFilename = propertyProvider.OutputFilename; if (File.Exists(outputFilename)) { return(outputFilename); } return(GetUserSelectedAssemblyPath(propertyProvider)); } catch (Exception) { return(GetUserSelectedAssemblyPath(propertyProvider)); } }
private static string GetAssemblyPath(IProjectPropertyProvider propertyProvider, string publishPath, TargetScope targetScope) { try { if (targetScope.ScopeType != ScopeType.AssemblyFile) { string outputFilename = propertyProvider.GetOutputFilename(publishPath); if (File.Exists(outputFilename)) { return(outputFilename); } } return(GetUserSelectedAssemblyPath(propertyProvider)); } catch (Exception) { return(GetUserSelectedAssemblyPath(propertyProvider)); } }
private static string GetUserSelectedAssemblyPath(IProjectPropertyProvider propertyProvider) { string initialDirectory = null; try { initialDirectory = propertyProvider.OutputPath; } catch (Exception) { } OpenFileDialog dialog = new OpenFileDialog { Title = "Select Assembly to analyze", DefaultExt = "Assembly Files(*.DLL;*.EXE)|*.DLL;*.EXE|All files (*.*)|*.*", InitialDirectory = initialDirectory }; if (dialog.ShowDialog() != DialogResult.OK) { return(null); } return(dialog.FileName); }
public static bool IsPublishingNecessary(IProjectPropertyProvider propertyProvider) { return(propertyProvider.TargetFramework.StartsWith("netstandard") || propertyProvider.TargetFramework.StartsWith("netcore")); }