本文整理汇总了C#中VisualStudioVersion类的典型用法代码示例。如果您正苦于以下问题:C# VisualStudioVersion类的具体用法?C# VisualStudioVersion怎么用?C# VisualStudioVersion使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
VisualStudioVersion类属于命名空间,在下文中一共展示了VisualStudioVersion类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SolutionWriter
internal SolutionWriter(AssemblyDefinition assembly, TargetPlatform targetPlatform, string targetDir, string solutionFileName,
Dictionary<ModuleDefinition, string> modulesProjectsRelativePaths, Dictionary<ModuleDefinition, Guid> modulesProjectsGuids,
VisualStudioVersion visualStudioVersion, ILanguage language)
{
this.assembly = assembly;
this.targetPlatform = targetPlatform;
this.targetDir = targetDir;
this.solutionFileName = solutionFileName;
this.modulesProjectsRelativePaths = modulesProjectsRelativePaths;
this.modulesProjectsGuids = modulesProjectsGuids;
if (language is ICSharp)
{
this.languageGuid = new Guid(WinRTProjectBuilder.CSharpGUID);
}
else if (language is IVisualBasic)
{
this.languageGuid = new Guid(WinRTProjectBuilder.VisualBasicGUID);
}
else
{
throw new NotSupportedException();
}
this.visualStudioVersion = visualStudioVersion;
}
示例2: WinRTSolutionWriter
internal WinRTSolutionWriter(AssemblyDefinition assembly, TargetPlatform targetPlatform, string targetDir, string solutionFileName,
Dictionary<ModuleDefinition, string> modulesProjectsRelativePaths, Dictionary<ModuleDefinition, Guid> modulesProjectsGuids,
VisualStudioVersion visualStudioVersion, ILanguage language, IEnumerable<string> platforms)
: base(assembly, targetPlatform, targetDir, solutionFileName, modulesProjectsRelativePaths, modulesProjectsGuids, visualStudioVersion, language)
{
this.platforms = platforms;
}
示例3: TestWinRTProjectBuilder
public TestWinRTProjectBuilder(string assemblyPath, AssemblyDefinition assembly,
Dictionary<ModuleDefinition, Mono.Collections.Generic.Collection<TypeDefinition>> userDefinedTypes,
Dictionary<ModuleDefinition, Mono.Collections.Generic.Collection<Resource>> resources,
string targetPath, ILanguage language, IDecompilationPreferences preferences, VisualStudioVersion visualStudioVersion, ProjectGenerationSettings projectGenerationSettings = null)
: base(assemblyPath, assembly, userDefinedTypes, resources, targetPath, language, preferences, NoCacheAssemblyInfoService.Instance, visualStudioVersion, projectGenerationSettings)
{
}
示例4: MockSolution
/// <summary>
/// Initializes a new instance of the MockSolution class.
/// </summary>
public MockSolution(FileInfo solutionFile, IList<ISolutionProjectInfo> projectListe, string rawContent, VisualStudioVersion version)
{
SolutionFile = solutionFile;
ProjectListe = projectListe;
RawContent = rawContent;
Version = version;
}
示例5: GetVersionKey
private static string GetVersionKey(VisualStudioVersion visualStudioVersion)
{
if (visualStudioVersion == VisualStudioVersion.VS2012) {
return "11.0";
}
return "10.0";
}
示例6: SaveSolutionCommand
public SaveSolutionCommand(ISettings settings, string solutionFileName, VisualStudioVersion visualStudioVersion, SolutionViewModel solution)
{
_settings = settings;
_solutionFileName = solutionFileName;
_visualStudioVersion = visualStudioVersion;
_solution = solution;
}
示例7: GetVstuBridgeAssembly
private static string GetVstuBridgeAssembly(VisualStudioVersion version)
{
try
{
string vsTargetYear = string.Empty;
switch (version)
{
case VisualStudioVersion.VisualStudio2010:
vsTargetYear = "2010";
break;
case VisualStudioVersion.VisualStudio2012:
vsTargetYear = "2012";
break;
case VisualStudioVersion.VisualStudio2013:
vsTargetYear = "2013";
break;
case VisualStudioVersion.VisualStudio2015:
vsTargetYear = "2015";
break;
}
return UnityVSSupport.GetVstuBridgePathFromRegistry(vsTargetYear, true) ?? UnityVSSupport.GetVstuBridgePathFromRegistry(vsTargetYear, false);
}
catch (Exception ex)
{
return (string) null;
}
}
示例8: CopyVSToSql
/// <summary>
/// Copies settings from a Visual Studio installation to Sql Server Management Studio.
/// </summary>
/// <param name="vsVersion">Represents the version of Visual Studio from which we will read the settings.</param>
/// <param name="sqlVersion">Represents the version of SSMS which will receive the settings.</param>
public void CopyVSToSql(VisualStudioVersion vsVersion, SqlStudioVersion sqlVersion)
{
string vsRegKeyPath = string.Format(_vsRegKeyFormat, _versionStrings[Enum.GetName(typeof(VisualStudioVersion), vsVersion)]);
string sqlRegKeyPath = string.Format(_sqlRegKeyFormat, _versionStrings[Enum.GetName(typeof(SqlStudioVersion), sqlVersion)]);
CreateMappingsFromVisualStudioToSql();
Copy(vsRegKeyPath, sqlRegKeyPath);
}
示例9: MainViewModel
public MainViewModel(ILogger logger)
{
VisualStudioVersions = Enum.GetValues(typeof(VisualStudioVersion)).Cast<VisualStudioVersion>().ToArray();
_selectedVisualStudioVersion = VisualStudioVersion.VisualStudio2015;
_logger = logger;
_missingProjects = new ObservableCollection<FileInfo>();
}
示例10: Create
internal static DTE Create(VisualStudioVersion visualStudioVersion)
{
var vsProgID = visualStudioVersion.ToDescription();
var type = Type.GetTypeFromProgID(vsProgID, true);
var obj = Activator.CreateInstance(type, true);
return obj as DTE;
}
示例11: DumpSdkIncludes
/// Dumps include directories for selected toolchain.
public static void DumpSdkIncludes(VisualStudioVersion vsVersion =
VisualStudioVersion.Latest)
{
Console.WriteLine("\nInclude search path (VS: {0}):", vsVersion);
var includes = GetSystemIncludes(vsVersion);
foreach (var include in includes)
Console.WriteLine("\t{0}", include);
}
示例12: WinRTProjectBuilder
public WinRTProjectBuilder(string assemblyPath, string targetPath, ILanguage language,
IDecompilationPreferences preferences, IFileGenerationNotifier notifier,
IAssemblyInfoService assemblyInfoService, VisualStudioVersion visualStudioVersion = VisualStudioVersion.VS2010,
ProjectGenerationSettings projectGenerationSettings = null)
: base(assemblyPath, targetPath, language, null, preferences, notifier, assemblyInfoService, visualStudioVersion, projectGenerationSettings)
{
Initialize();
}
示例13: GetVisualStudioExecutable
public static string GetVisualStudioExecutable(VisualStudioVersion visualStudioVersion)
{
var regPath = String.Format(@"Software\Microsoft\VisualStudio\{0}", GetVersionKey(visualStudioVersion));
using (var hiveKey = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry32))
using (var key = hiveKey.OpenSubKey(regPath)) {
var installPath = key.GetValue("InstallDir") as string;
return Path.Combine(installPath, "devenv.exe");
}
}
示例14: GetVisualStudioExecutable
public static string GetVisualStudioExecutable(VisualStudioVersion visualStudioVersion)
{
var regPath = String.Format(@"Software\{0}Microsoft\VisualStudio\{1}",
Environment.Is64BitOperatingSystem ? @"Wow6432Node\" : String.Empty,
GetVersionKey(visualStudioVersion));
using (var key = Registry.LocalMachine.OpenSubKey(regPath)) {
var installPath = key.GetValue("InstallDir") as string;
return Path.Combine(installPath, "devenv.exe");
}
}
示例15: GetVersionKey
private static string GetVersionKey(VisualStudioVersion visualStudioVersion)
{
switch (visualStudioVersion) {
case VisualStudioVersion.VS2012:
return "11.0";
case VisualStudioVersion.VS2013:
return "12.0";
}
return "10.0";
}