logic: update Visual Studio plugin to support Visual Studio 2017

* changed description text of Visual Studio plugin
* changed plugin install targets to include VS 2017
* add license file with MIT license
* updated vsix for deployment

* implement wrapper for all used classes of VCProjectEngine.dll since you cannot just use the oldest version of this
  assembly (see https://stackoverflow.com/questions/44288050/typecast-fails-when-visual-studio-extension-uses-reference-to-older-assembly).
* improved serialization and deserialization of compile commands and compilation databases.
* updated used JSON package
* rename CommandObject to CompileCommand
* changed implementation to keep non-existent file paths in cdb
* made methods of SolutionParser non-static
* replace spaces with tabs

* added IntegrationTests project
* configured tests to simulate a new instance of VisualStudio
* added cinder as test project for integration tests
* remove all absolute paths from expected output of integration tests

fortune cookie message = A stranger will bring great meaning to your life.
This commit is contained in:
malte_langkabel
2017-06-02 14:48:29 +02:00
parent aaca8618e2
commit 7010b9a6fb
289 changed files with 293635 additions and 22692 deletions
@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("VCProjectEngineWrapperVs2012")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Coati Software")]
[assembly: AssemblyProduct("VCProjectEngineWrapperVs2012")]
[assembly: AssemblyCopyright("Copyright © Coati Software 2017")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("C5439B90-42E7-414D-8C3F-BDCABB0592E2")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("VCProjectEngineWrapperVs2013")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Coati Software")]
[assembly: AssemblyProduct("VCProjectEngineWrapperVs2013")]
[assembly: AssemblyCopyright("Copyright © Coati Software 2017")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("8718929b-5270-4e5a-8998-48ac7ce19dc2")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("VCProjectEngineWrapperVs2015")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Coati Software")]
[assembly: AssemblyProduct("VCProjectEngineWrapperVs2015")]
[assembly: AssemblyCopyright("Copyright © Coati Software 2017")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("1c139999-9592-4891-aa62-2c8a16430d0a")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("VCProjectEngineWrapperVs2017")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Coati Software")]
[assembly: AssemblyProduct("VCProjectEngineWrapperVs2017")]
[assembly: AssemblyCopyright("Copyright © Coati Software 2017")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("b49207f9-89a3-42d8-bc04-8bf77ed2e295")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
@@ -0,0 +1,21 @@
using Microsoft.VisualStudio.VCProjectEngine;
namespace VCProjectEngineWrapper
{
public static class Utility
{
public static string GetWrappedVersion()
{
return
#if (VS2012)
"11.0";
#elif (VS2013)
"12.0";
#elif (VS2015)
"14.0";
#elif (VS2017)
"15.0";
#endif
}
}
}
@@ -0,0 +1,70 @@
using Microsoft.VisualStudio.VCProjectEngine;
namespace VCProjectEngineWrapper
{
public class
#if (VS2012)
VCCLCompilerToolWrapperVs2012
#elif (VS2013)
VCCLCompilerToolWrapperVs2013
#elif (VS2015)
VCCLCompilerToolWrapperVs2015
#elif (VS2017)
VCCLCompilerToolWrapperVs2017
#endif
: IVCCLCompilerToolWrapper
{
private VCCLCompilerTool _wrapped = null;
public
#if (VS2012)
VCCLCompilerToolWrapperVs2012
#elif (VS2013)
VCCLCompilerToolWrapperVs2013
#elif (VS2015)
VCCLCompilerToolWrapperVs2015
#elif (VS2017)
VCCLCompilerToolWrapperVs2017
#endif
(object wrapped)
{
_wrapped = wrapped as VCCLCompilerTool;
}
public bool isValid()
{
return (_wrapped != null);
}
public string GetWrappedVersion()
{
return Utility.GetWrappedVersion();
}
public string GetAdditionalOptions()
{
return _wrapped.AdditionalOptions;
}
public bool GetCompilesAsC()
{
return _wrapped.CompileAs == CompileAsOptions.compileAsC;
}
public string GetToolPath()
{
return _wrapped.ToolPath;
}
public string[] GetAdditionalIncludeDirectories()
{
return _wrapped.AdditionalIncludeDirectories.Split(';');
}
public string[] GetPreprocessorDefinitions()
{
return _wrapped.PreprocessorDefinitions.Split(';');
}
}
}
@@ -0,0 +1,108 @@
using Microsoft.VisualStudio.VCProjectEngine;
using System;
using System.Collections;
namespace VCProjectEngineWrapper
{
public class
#if (VS2012)
VCConfigurationWrapperVs2012
#elif (VS2013)
VCConfigurationWrapperVs2013
#elif (VS2015)
VCConfigurationWrapperVs2015
#elif (VS2017)
VCConfigurationWrapperVs2017
#endif
: IVCConfigurationWrapper
{
private VCConfiguration _wrapped = null;
public
#if (VS2012)
VCConfigurationWrapperVs2012
#elif (VS2013)
VCConfigurationWrapperVs2013
#elif (VS2015)
VCConfigurationWrapperVs2015
#elif (VS2017)
VCConfigurationWrapperVs2017
#endif
(object wrapped)
{
_wrapped = wrapped as VCConfiguration;
}
public bool isValid()
{
return (_wrapped != null);
}
public string GetWrappedVersion()
{
return Utility.GetWrappedVersion();
}
public string EvaluateMacro(string macro)
{
return _wrapped.Evaluate(macro);
}
public IVCCLCompilerToolWrapper GetCompilerTool()
{
try
{
IEnumerable tools = _wrapped.Tools as IEnumerable;
foreach (Object tool in tools)
{
VCCLCompilerTool compilerTool = tool as VCCLCompilerTool;
if (compilerTool != null)
{
return new
#if (VS2012)
VCCLCompilerToolWrapperVs2012
#elif (VS2013)
VCCLCompilerToolWrapperVs2013
#elif (VS2015)
VCCLCompilerToolWrapperVs2015
#elif (VS2017)
VCCLCompilerToolWrapperVs2017
#endif
(compilerTool);
}
}
}
catch (Exception e)
{
// Logging.Logging.LogError("Failed to retreive compiler tool: " + e.Message);
}
return new
#if (VS2012)
VCCLCompilerToolWrapperVs2012
#elif (VS2013)
VCCLCompilerToolWrapperVs2013
#elif (VS2015)
VCCLCompilerToolWrapperVs2015
#elif (VS2017)
VCCLCompilerToolWrapperVs2017
#endif
(null);
}
public IVCPlatformWrapper GetPlatform()
{
return new
#if (VS2012)
VCPlatformWrapperVs2012
#elif (VS2013)
VCPlatformWrapperVs2013
#elif (VS2015)
VCPlatformWrapperVs2015
#elif (VS2017)
VCPlatformWrapperVs2017
#endif
(_wrapped.Platform);
}
}
}
@@ -0,0 +1,59 @@
using Microsoft.VisualStudio.VCProjectEngine;
namespace VCProjectEngineWrapper
{
public class
#if (VS2012)
VCFileConfigurationWrapperVs2012
#elif (VS2013)
VCFileConfigurationWrapperVs2013
#elif (VS2015)
VCFileConfigurationWrapperVs2015
#elif (VS2017)
VCFileConfigurationWrapperVs2017
#endif
: IVCFileConfigurationWrapper
{
private VCFileConfiguration _wrapped = null;
public
#if (VS2012)
VCFileConfigurationWrapperVs2012
#elif (VS2013)
VCFileConfigurationWrapperVs2013
#elif (VS2015)
VCFileConfigurationWrapperVs2015
#elif (VS2017)
VCFileConfigurationWrapperVs2017
#endif
(object wrapped)
{
_wrapped = wrapped as VCFileConfiguration;
}
public bool isValid()
{
return (_wrapped != null);
}
public string GetWrappedVersion()
{
return Utility.GetWrappedVersion();
}
public IVCCLCompilerToolWrapper GetTool()
{
return new
#if (VS2012)
VCCLCompilerToolWrapperVs2012
#elif (VS2013)
VCCLCompilerToolWrapperVs2013
#elif (VS2015)
VCCLCompilerToolWrapperVs2015
#elif (VS2017)
VCCLCompilerToolWrapperVs2017
#endif
(_wrapped.Tool);
}
}
}
@@ -0,0 +1,90 @@
using Microsoft.VisualStudio.VCProjectEngine;
using System;
using System.Collections.Generic;
namespace VCProjectEngineWrapper
{
public class
#if (VS2012)
VCFileWrapperVs2012
#elif (VS2013)
VCFileWrapperVs2013
#elif (VS2015)
VCFileWrapperVs2015
#elif (VS2017)
VCFileWrapperVs2017
#endif
: IVCFileWrapper
{
private VCFile _wrapped = null;
public
#if (VS2012)
VCFileWrapperVs2012
#elif (VS2013)
VCFileWrapperVs2013
#elif (VS2015)
VCFileWrapperVs2015
#elif (VS2017)
VCFileWrapperVs2017
#endif
(object wrapped)
{
_wrapped = wrapped as VCFile;
}
public bool isValid()
{
return (_wrapped != null);
}
public string GetWrappedVersion()
{
return Utility.GetWrappedVersion();
}
public string GetSubType()
{
return _wrapped.SubType;
}
public IVCProjectWrapper GetProject()
{
return new
#if (VS2012)
VCProjectWrapperVs2012
#elif (VS2013)
VCProjectWrapperVs2013
#elif (VS2015)
VCProjectWrapperVs2015
#elif (VS2017)
VCProjectWrapperVs2017
#endif
(_wrapped.project);
}
public List<IVCFileConfigurationWrapper> GetFileConfigurations()
{
List<IVCFileConfigurationWrapper> fileConfigurations = new List<IVCFileConfigurationWrapper>();
foreach (Object configuration in _wrapped.FileConfigurations)
{
IVCFileConfigurationWrapper vcFileConfig = new
#if (VS2012)
VCFileConfigurationWrapperVs2012
#elif (VS2013)
VCFileConfigurationWrapperVs2013
#elif (VS2015)
VCFileConfigurationWrapperVs2015
#elif (VS2017)
VCFileConfigurationWrapperVs2017
#endif
(configuration);
if (vcFileConfig.isValid())
{
fileConfigurations.Add(vcFileConfig);
}
}
return fileConfigurations;
}
}
}
@@ -0,0 +1,55 @@
using Microsoft.VisualStudio.VCProjectEngine;
namespace VCProjectEngineWrapper
{
public class
#if (VS2012)
VCPlatformWrapperVs2012
#elif (VS2013)
VCPlatformWrapperVs2013
#elif (VS2015)
VCPlatformWrapperVs2015
#elif (VS2017)
VCPlatformWrapperVs2017
#endif
: IVCPlatformWrapper
{
private VCPlatform _wrapped = null;
public
#if (VS2012)
VCPlatformWrapperVs2012
#elif (VS2013)
VCPlatformWrapperVs2013
#elif (VS2015)
VCPlatformWrapperVs2015
#elif (VS2017)
VCPlatformWrapperVs2017
#endif
(object wrapped)
{
_wrapped = wrapped as VCPlatform;
}
public bool isValid()
{
return (_wrapped != null);
}
public string GetWrappedVersion()
{
return Utility.GetWrappedVersion();
}
public string GetExecutableDirectories()
{
return _wrapped.ExecutableDirectories;
}
public string[] GetIncludeDirectories()
{
return _wrapped.IncludeDirectories.Split(';');
}
}
}
@@ -0,0 +1,74 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{C5439B90-42E7-414D-8C3F-BDCABB0592E2}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>VCProjectEngineWrapper</RootNamespace>
<AssemblyName>VCProjectEngineWrapperVs2012</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG;VS2012</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE;VS2012</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
</PropertyGroup>
<PropertyGroup>
<AssemblyOriginatorKeyFile>KeyVs2012.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>
<Reference Include="EnvDTE, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<EmbedInteropTypes>True</EmbedInteropTypes>
</Reference>
<Reference Include="Microsoft.VisualStudio.VCProjectEngine, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<EmbedInteropTypes>True</EmbedInteropTypes>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfoVs2012.cs" />
<Compile Include="Utility.cs" />
<Compile Include="VCCLCompilerToolWrapper.cs" />
<Compile Include="VCConfigurationWrapper.cs" />
<Compile Include="VCFileConfigurationWrapper.cs" />
<Compile Include="VCFileWrapper.cs" />
<Compile Include="VCPlatformWrapper.cs" />
<Compile Include="VCProjectWrapper.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\VCProjectEngineWrapperInterfaces\VCProjectEngineWrapperInterfaces.csproj">
<Project>{F592DB46-0C77-470B-AAF8-80C51F44380E}</Project>
<Name>VCProjectEngineWrapperInterfaces</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="KeyVs2012.snk" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
@@ -0,0 +1,74 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{8718929C-5270-4E5A-8998-48AC7CE19DC2}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>VCProjectEngineWrapper</RootNamespace>
<AssemblyName>VCProjectEngineWrapperVs2013</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG;VS2013</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE;VS2013</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
</PropertyGroup>
<PropertyGroup>
<AssemblyOriginatorKeyFile>KeyVs2013.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>
<Reference Include="EnvDTE, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<EmbedInteropTypes>True</EmbedInteropTypes>
</Reference>
<Reference Include="Microsoft.VisualStudio.VCProjectEngine, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<EmbedInteropTypes>True</EmbedInteropTypes>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfoVs2013.cs" />
<Compile Include="Utility.cs" />
<Compile Include="VCCLCompilerToolWrapper.cs" />
<Compile Include="VCConfigurationWrapper.cs" />
<Compile Include="VCFileConfigurationWrapper.cs" />
<Compile Include="VCFileWrapper.cs" />
<Compile Include="VCPlatformWrapper.cs" />
<Compile Include="VCProjectWrapper.cs" />
</ItemGroup>
<ItemGroup>
<None Include="KeyVs2013.snk" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\VCProjectEngineWrapperInterfaces\VCProjectEngineWrapperInterfaces.csproj">
<Project>{F592DB46-0C77-470B-AAF8-80C51F44380E}</Project>
<Name>VCProjectEngineWrapperInterfaces</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
@@ -0,0 +1,74 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{1C139999-9592-4891-AA62-2C8A16430D0A}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>VCProjectEngineWrapper</RootNamespace>
<AssemblyName>VCProjectEngineWrapperVs2015</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG;VS2015</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE;VS2015</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
</PropertyGroup>
<PropertyGroup>
<AssemblyOriginatorKeyFile>KeyVs2015.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>
<Reference Include="EnvDTE, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<EmbedInteropTypes>True</EmbedInteropTypes>
</Reference>
<Reference Include="Microsoft.VisualStudio.VCProjectEngine, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<EmbedInteropTypes>True</EmbedInteropTypes>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfoVs2015.cs" />
<Compile Include="Utility.cs" />
<Compile Include="VCCLCompilerToolWrapper.cs" />
<Compile Include="VCConfigurationWrapper.cs" />
<Compile Include="VCFileConfigurationWrapper.cs" />
<Compile Include="VCFileWrapper.cs" />
<Compile Include="VCPlatformWrapper.cs" />
<Compile Include="VCProjectWrapper.cs" />
</ItemGroup>
<ItemGroup>
<None Include="KeyVs2015.snk" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\VCProjectEngineWrapperInterfaces\VCProjectEngineWrapperInterfaces.csproj">
<Project>{F592DB46-0C77-470B-AAF8-80C51F44380E}</Project>
<Name>VCProjectEngineWrapperInterfaces</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
@@ -0,0 +1,74 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{B49207F9-89A3-42D8-BC04-8BF77ED2E295}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>VCProjectEngineWrapper</RootNamespace>
<AssemblyName>VCProjectEngineWrapperVs2017</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG;VS2017</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE;VS2017</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
</PropertyGroup>
<PropertyGroup>
<AssemblyOriginatorKeyFile>KeyVs2017.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>
<Reference Include="EnvDTE, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<EmbedInteropTypes>True</EmbedInteropTypes>
</Reference>
<Reference Include="Microsoft.VisualStudio.VCProjectEngine, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<EmbedInteropTypes>True</EmbedInteropTypes>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfoVs2017.cs" />
<Compile Include="Utility.cs" />
<Compile Include="VCCLCompilerToolWrapper.cs" />
<Compile Include="VCConfigurationWrapper.cs" />
<Compile Include="VCFileConfigurationWrapper.cs" />
<Compile Include="VCFileWrapper.cs" />
<Compile Include="VCPlatformWrapper.cs" />
<Compile Include="VCProjectWrapper.cs" />
</ItemGroup>
<ItemGroup>
<None Include="KeyVs2017.snk" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\VCProjectEngineWrapperInterfaces\VCProjectEngineWrapperInterfaces.csproj">
<Project>{f592db46-0c77-470b-aaf8-80c51f44380e}</Project>
<Name>VCProjectEngineWrapperInterfaces</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
@@ -0,0 +1,102 @@
using Microsoft.VisualStudio.VCProjectEngine;
using System;
using System.Collections;
namespace VCProjectEngineWrapper
{
public class
#if (VS2012)
VCProjectWrapperVs2012
#elif (VS2013)
VCProjectWrapperVs2013
#elif (VS2015)
VCProjectWrapperVs2015
#elif (VS2017)
VCProjectWrapperVs2017
#endif
: IVCProjectWrapper
{
private VCProject _wrapped = null;
public
#if (VS2012)
VCProjectWrapperVs2012
#elif (VS2013)
VCProjectWrapperVs2013
#elif (VS2015)
VCProjectWrapperVs2015
#elif (VS2017)
VCProjectWrapperVs2017
#endif
(object wrapped)
{
_wrapped = wrapped as VCProject;
}
public bool isValid()
{
return (_wrapped != null);
}
public string GetWrappedVersion()
{
return Utility.GetWrappedVersion();
}
public IVCConfigurationWrapper getConfiguration(string configurationName, string platformName)
{
try
{
IEnumerable configurations = _wrapped.Configurations as IEnumerable;
foreach (Object configuration in configurations)
{
VCConfiguration vcProjectConfig = configuration as VCConfiguration;
if (vcProjectConfig != null &&
vcProjectConfig.ConfigurationName == configurationName &&
vcProjectConfig.Platform.Name == platformName)
{
return new
#if (VS2012)
VCConfigurationWrapperVs2012
#elif (VS2013)
VCConfigurationWrapperVs2013
#elif (VS2015)
VCConfigurationWrapperVs2015
#elif (VS2017)
VCConfigurationWrapperVs2017
#endif
(vcProjectConfig);
}
}
}
catch (Exception e)
{
// Logging.Logging.LogError("Failed to retreive project configuration: " + e.Message);
}
// Logging.Logging.LogError("Failed to find project config matching with \"" + configurationName + "\"");
return new
#if (VS2012)
VCConfigurationWrapperVs2012
#elif (VS2013)
VCConfigurationWrapperVs2013
#elif (VS2015)
VCConfigurationWrapperVs2015
#elif (VS2017)
VCConfigurationWrapperVs2017
#endif
(null);
}
public string GetProjectDirectory()
{
return _wrapped.ProjectDirectory;
}
public string GetName()
{
return _wrapped.Name;
}
}
}