本文整理汇总了C#中VisualStudioVersion类的典型用法代码示例。如果您正苦于以下问题:C# VisualStudioVersion类的具体用法?C# VisualStudioVersion怎么用?C# VisualStudioVersion使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
VisualStudioVersion类属于命名空间,在下文中一共展示了VisualStudioVersion类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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;
}
开发者ID:Feng2012,项目名称:JustDecompileEngine,代码行数:25,代码来源:SolutionWriter.cs
示例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;
}
开发者ID:juancarlosbaezpozos,项目名称:JustDecompileEngine,代码行数:7,代码来源:WinRTSolutionWriter.cs
示例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)
{
}
开发者ID:Feng2012,项目名称:JustDecompileEngine,代码行数:7,代码来源:TestWinRTProjectBuilder.cs
示例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;
}
开发者ID:dun3,项目名称:dun3,代码行数:10,代码来源:MockSolution.cs
示例5: GetVersionKey
private static string GetVersionKey(VisualStudioVersion visualStudioVersion)
{
if (visualStudioVersion == VisualStudioVersion.VS2012) {
return "11.0";
}
return "10.0";
}
开发者ID:darkiri,项目名称:Solutionizer,代码行数:7,代码来源:VisualStudioHelper.cs
示例6: SaveSolutionCommand
public SaveSolutionCommand(ISettings settings, string solutionFileName, VisualStudioVersion visualStudioVersion, SolutionViewModel solution)
{
_settings = settings;
_solutionFileName = solutionFileName;
_visualStudioVersion = visualStudioVersion;
_solution = solution;
}
开发者ID:thoemmi,项目名称:Solutionizer,代码行数:7,代码来源:SaveSolutionCommand.cs
示例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;
}
}
开发者ID:BlakeTriana,项目名称:unity-decompiled,代码行数:27,代码来源:UnityVSSupport.cs
示例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);
}
开发者ID:enriquein,项目名称:VS_SQL_TextSchemeMigrator,代码行数:12,代码来源:ThemeImporter.cs
示例9: MainViewModel
public MainViewModel(ILogger logger)
{
VisualStudioVersions = Enum.GetValues(typeof(VisualStudioVersion)).Cast<VisualStudioVersion>().ToArray();
_selectedVisualStudioVersion = VisualStudioVersion.VisualStudio2015;
_logger = logger;
_missingProjects = new ObservableCollection<FileInfo>();
}
开发者ID:jason-co,项目名称:ProjectAggregator,代码行数:7,代码来源:MainViewModel.cs
示例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;
}
开发者ID:jason-co,项目名称:ProjectAggregator,代码行数:8,代码来源:EnvDTEFactory.cs
示例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);
}
开发者ID:tritao,项目名称:CppSharp,代码行数:9,代码来源:MSVCToolchain.cs
示例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();
}
开发者ID:saravanaram,项目名称:JustDecompileEngine,代码行数:8,代码来源:WinRTProjectBuilder.cs
示例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");
}
}
开发者ID:thoemmi,项目名称:Solutionizer,代码行数:9,代码来源:VisualStudioHelper.cs
示例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");
}
}
开发者ID:csharper2010,项目名称:Solutionizer,代码行数:10,代码来源:VisualStudioHelper.cs
示例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";
}
开发者ID:csharper2010,项目名称:Solutionizer,代码行数:10,代码来源:VisualStudioHelper.cs
示例16: MainViewModel
public MainViewModel(ILogger logger)
{
VisualStudioVersions = Enum.GetValues(typeof(VisualStudioVersion)).Cast<VisualStudioVersion>().ToArray();
TargetFrameworkVersions = Enum.GetValues(typeof(TargetFramework)).Cast<TargetFramework>().ToArray();
_selectedVisualStudioVersion = VisualStudioVersion.VisualStudio2015;
_selectedTargetFramework = TargetFramework.v4_5;
_logger = logger;
_nonUpdatedProjects = new ObservableCollection<ProjectWrapper>();
}
开发者ID:jason-co,项目名称:ProjectUpdater,代码行数:11,代码来源:MainViewModel.cs
示例17: GetVisualStudioInstallationDir
internal static string GetVisualStudioInstallationDir(VisualStudioVersion version)
{
string registryKeyString = String.Format(@"SOFTWARE{0}Microsoft\VisualStudio\{1}",
Environment.Is64BitProcess ? @"\Wow6432Node\" : "\\",
GetVersionNumber(version));
using (var localMachineKey = Registry.LocalMachine.OpenSubKey(registryKeyString))
{
return localMachineKey.GetValue("InstallDir") as string;
}
}
开发者ID:bradgearon,项目名称:Edit-With-Visual-Studio-Explorer-Extension,代码行数:11,代码来源:VSPath.cs
示例18: SolutionWrapper
public SolutionWrapper(string solutionName, VisualStudioVersion visualStudioVersion, ILogger logger)
{
_solutionName = solutionName;
_visualStudioVersion = visualStudioVersion;
_logger = logger;
_projectWrappers = new List<ProjectWrapper>();
_dte = EnvDTEFactory.Create(visualStudioVersion);
_nonUpdatedProjects = new ObservableCollection<ProjectWrapper>();
NonUpdatedProjects = new ReadOnlyCollection<ProjectWrapper>(_nonUpdatedProjects);
}
开发者ID:jason-co,项目名称:ProjectUpdater,代码行数:11,代码来源:SolutionWrapper.cs
示例19: GetVisualStudio
/// <inheritdoc />
public IVisualStudio GetVisualStudio(VisualStudioVersion version, bool launchIfNoActiveInstance, ILogger logger)
{
if (logger == null)
throw new ArgumentNullException("logger");
IVisualStudio visualStudio = GetActiveVisualStudio(version, logger);
if (visualStudio == null && launchIfNoActiveInstance)
visualStudio = LaunchVisualStudio(version, logger);
return visualStudio;
}
开发者ID:rprouse,项目名称:mbunit-v3,代码行数:12,代码来源:VisualStudioManager.cs
示例20: VisualStudio
/// <summary>
/// Creates a wrapper for a particular DTE object.
/// </summary>
/// <param name="dte">The DTE object to wrap.</param>
/// <param name="version">The version of Visual Studio represented by this object.</param>
/// <param name="wasLaunched">True if Visual Studio was launched by our code, false if an existing instance was obtained.</param>
/// <param name="logger">The logger.</param>
/// <exception cref="ArgumentNullException">Thrown if <paramref name="dte"/> or <paramref name="logger"/> is null.</exception>
public VisualStudio(DTE dte, VisualStudioVersion version, bool wasLaunched, ILogger logger)
{
if (logger == null)
throw new ArgumentNullException("logger");
if (dte == null)
throw new ArgumentNullException("dte");
this.logger = logger;
this.dte = dte;
this.version = version;
this.wasLaunched = wasLaunched;
}
开发者ID:dougrathbone,项目名称:mbunit-v3,代码行数:20,代码来源:VisualStudio.cs
注:本文中的VisualStudioVersion类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论