Skip to content

Commit

Permalink
- Merging some functionality fixes from the open folder extension
Browse files Browse the repository at this point in the history
- Updated the dependencies
  • Loading branch information
Therena committed Nov 26, 2018
1 parent 976f4c5 commit d588b02
Show file tree
Hide file tree
Showing 6 changed files with 80 additions and 33 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,3 +180,10 @@ on the official Visual Studio extension gallery.

- [x] Updated the dependencies

## 2.0.0.22

**2018-11-26**

- [x] Merging some functionality fixes from the open folder extension
- [x] Updated the dependencies

29 changes: 14 additions & 15 deletions ConEmuIntegration/ConEmuIntegration.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,10 @@
<HintPath>..\packages\Microsoft.VisualStudio.CoreUtility.15.8.525\lib\net46\Microsoft.VisualStudio.CoreUtility.dll</HintPath>
</Reference>
<Reference Include="Microsoft.VisualStudio.ImageCatalog, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.VisualStudio.ImageCatalog.15.7.27703\lib\net45\Microsoft.VisualStudio.ImageCatalog.dll</HintPath>
<HintPath>..\packages\Microsoft.VisualStudio.ImageCatalog.15.8.28010\lib\net45\Microsoft.VisualStudio.ImageCatalog.dll</HintPath>
</Reference>
<Reference Include="Microsoft.VisualStudio.Imaging, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.VisualStudio.Imaging.15.7.27703\lib\net45\Microsoft.VisualStudio.Imaging.dll</HintPath>
<HintPath>..\packages\Microsoft.VisualStudio.Imaging.15.8.28010\lib\net45\Microsoft.VisualStudio.Imaging.dll</HintPath>
</Reference>
<Reference Include="Microsoft.VisualStudio.Imaging.Interop.14.0.DesignTime, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.VisualStudio.Imaging.Interop.14.0.DesignTime.14.3.26930\lib\net20\Microsoft.VisualStudio.Imaging.Interop.14.0.DesignTime.dll</HintPath>
Expand All @@ -156,11 +156,10 @@
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.VisualStudio.Shell.15.0, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.VisualStudio.Shell.15.0.15.7.27703\lib\net45\Microsoft.VisualStudio.Shell.15.0.dll</HintPath>
<EmbedInteropTypes>False</EmbedInteropTypes>
<HintPath>..\packages\Microsoft.VisualStudio.Shell.15.0.15.8.28010\lib\net45\Microsoft.VisualStudio.Shell.15.0.dll</HintPath>
</Reference>
<Reference Include="Microsoft.VisualStudio.Shell.Framework, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.VisualStudio.Shell.Framework.15.7.27703\lib\net45\Microsoft.VisualStudio.Shell.Framework.dll</HintPath>
<HintPath>..\packages\Microsoft.VisualStudio.Shell.Framework.15.8.28010\lib\net45\Microsoft.VisualStudio.Shell.Framework.dll</HintPath>
</Reference>
<Reference Include="Microsoft.VisualStudio.Shell.Immutable.12.0, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.VisualStudio.Shell.Immutable.12.0.15.0.25415\lib\net45\Microsoft.VisualStudio.Shell.Immutable.12.0.dll</HintPath>
Expand Down Expand Up @@ -218,10 +217,10 @@
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.VisualStudio.Threading, Version=15.8.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.VisualStudio.Threading.15.8.145\lib\net46\Microsoft.VisualStudio.Threading.dll</HintPath>
<HintPath>..\packages\Microsoft.VisualStudio.Threading.15.8.168\lib\net46\Microsoft.VisualStudio.Threading.dll</HintPath>
</Reference>
<Reference Include="Microsoft.VisualStudio.Utilities, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.VisualStudio.Utilities.15.7.27703\lib\net46\Microsoft.VisualStudio.Utilities.dll</HintPath>
<HintPath>..\packages\Microsoft.VisualStudio.Utilities.15.8.28010\lib\net46\Microsoft.VisualStudio.Utilities.dll</HintPath>
</Reference>
<Reference Include="Microsoft.VisualStudio.Validation, Version=15.3.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.VisualStudio.Validation.15.3.58\lib\net45\Microsoft.VisualStudio.Validation.dll</HintPath>
Expand All @@ -248,15 +247,15 @@
<EmbedInteropTypes>True</EmbedInteropTypes>
</Reference>
<Reference Include="StreamJsonRpc, Version=1.4.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\StreamJsonRpc.1.4.121\lib\net46\StreamJsonRpc.dll</HintPath>
<HintPath>..\packages\StreamJsonRpc.1.4.134\lib\net46\StreamJsonRpc.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.ComponentModel.Composition" />
<Reference Include="System.Data" />
<Reference Include="System.Design" />
<Reference Include="System.Drawing" />
<Reference Include="System.Net.Http, Version=4.1.1.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Net.Http.4.3.3\lib\net46\System.Net.Http.dll</HintPath>
<Reference Include="System.Net.Http, Version=4.1.1.3, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Net.Http.4.3.4\lib\net46\System.Net.Http.dll</HintPath>
</Reference>
<Reference Include="System.Security.Cryptography.Algorithms, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Security.Cryptography.Algorithms.4.3.1\lib\net461\System.Security.Cryptography.Algorithms.dll</HintPath>
Expand Down Expand Up @@ -324,7 +323,7 @@
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<Analyzer Include="..\packages\Microsoft.VisualStudio.Threading.Analyzers.15.8.145\analyzers\cs\Microsoft.VisualStudio.Threading.Analyzers.dll" />
<Analyzer Include="..\packages\Microsoft.VisualStudio.Threading.Analyzers.15.8.168\analyzers\cs\Microsoft.VisualStudio.Threading.Analyzers.dll" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(VSToolsPath)\VSSDK\Microsoft.VsSDK.targets" Condition="'$(VSToolsPath)' != ''" />
Expand All @@ -335,11 +334,11 @@
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\ConEmu.Core.18.6.26\build\ConEmu.Core.Targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\ConEmu.Core.18.6.26\build\ConEmu.Core.Targets'))" />
<Error Condition="!Exists('..\packages\Microsoft.VisualStudio.SDK.EmbedInteropTypes.15.0.21\build\Microsoft.VisualStudio.SDK.EmbedInteropTypes.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.VisualStudio.SDK.EmbedInteropTypes.15.0.21\build\Microsoft.VisualStudio.SDK.EmbedInteropTypes.targets'))" />
<Error Condition="!Exists('..\packages\Microsoft.VisualStudio.Threading.Analyzers.15.8.145\build\Microsoft.VisualStudio.Threading.Analyzers.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.VisualStudio.Threading.Analyzers.15.8.145\build\Microsoft.VisualStudio.Threading.Analyzers.targets'))" />
<Error Condition="!Exists('..\packages\Microsoft.VisualStudio.SDK.EmbedInteropTypes.15.0.27\build\Microsoft.VisualStudio.SDK.EmbedInteropTypes.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.VisualStudio.SDK.EmbedInteropTypes.15.0.27\build\Microsoft.VisualStudio.SDK.EmbedInteropTypes.targets'))" />
<Error Condition="!Exists('..\packages\Microsoft.VisualStudio.Threading.Analyzers.15.8.168\build\Microsoft.VisualStudio.Threading.Analyzers.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.VisualStudio.Threading.Analyzers.15.8.168\build\Microsoft.VisualStudio.Threading.Analyzers.targets'))" />
</Target>
<Import Project="..\packages\Microsoft.VisualStudio.SDK.EmbedInteropTypes.15.0.21\build\Microsoft.VisualStudio.SDK.EmbedInteropTypes.targets" Condition="Exists('..\packages\Microsoft.VisualStudio.SDK.EmbedInteropTypes.15.0.21\build\Microsoft.VisualStudio.SDK.EmbedInteropTypes.targets')" />
<Import Project="..\packages\Microsoft.VisualStudio.Threading.Analyzers.15.8.145\build\Microsoft.VisualStudio.Threading.Analyzers.targets" Condition="Exists('..\packages\Microsoft.VisualStudio.Threading.Analyzers.15.8.145\build\Microsoft.VisualStudio.Threading.Analyzers.targets')" />
<Import Project="..\packages\Microsoft.VisualStudio.SDK.EmbedInteropTypes.15.0.27\build\Microsoft.VisualStudio.SDK.EmbedInteropTypes.targets" Condition="Exists('..\packages\Microsoft.VisualStudio.SDK.EmbedInteropTypes.15.0.27\build\Microsoft.VisualStudio.SDK.EmbedInteropTypes.targets')" />
<Import Project="..\packages\Microsoft.VisualStudio.Threading.Analyzers.15.8.168\build\Microsoft.VisualStudio.Threading.Analyzers.targets" Condition="Exists('..\packages\Microsoft.VisualStudio.Threading.Analyzers.15.8.168\build\Microsoft.VisualStudio.Threading.Analyzers.targets')" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
Expand Down
51 changes: 44 additions & 7 deletions ConEmuIntegration/Helper/Folders.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,18 @@
// limitations under the License.
//
using EnvDTE;
using Microsoft.VisualStudio.Shell;
using System.IO;
using System.Linq;

namespace ConEmuIntegration.Helper
{
internal sealed class Folders
{
public string GetSolutionPath(Solution sln)
{
ThreadHelper.ThrowIfNotOnUIThread();

var slnFile = new FileInfo(sln.FullName);
if (slnFile.Directory.Exists)
{
Expand All @@ -32,6 +36,8 @@ public string GetSolutionPath(Solution sln)

public string GetProjectPath(Project proj)
{
ThreadHelper.ThrowIfNotOnUIThread();

// C# Project has the FullPath property
if (HasProperty(proj.Properties, "FullPath"))
{
Expand All @@ -52,6 +58,8 @@ public string GetProjectPath(Project proj)

public string GetProjectItemPath(ProjectItem item)
{
ThreadHelper.ThrowIfNotOnUIThread();

if (HasProperty(item.Properties, "FullPath") == false)
{
return string.Empty;
Expand All @@ -69,6 +77,8 @@ public string GetProjectItemPath(ProjectItem item)

public string GetOutputPath(Project proj)
{
ThreadHelper.ThrowIfNotOnUIThread();

var prjPath = GetProjectPath(proj);
if (string.IsNullOrWhiteSpace(prjPath))
{
Expand Down Expand Up @@ -105,24 +115,51 @@ public string GetOutputPath(Project proj)
}

var filePath = prop.Item(probKey).Value.ToString();
if (Path.IsPathRooted(filePath) == false)
try
{
filePath = Path.Combine(prjPath, filePath);
}
if (Path.IsPathRooted(filePath) == false)
{
filePath = Path.Combine(prjPath, filePath);
}

var attr = File.GetAttributes(filePath);
if (attr.HasFlag(FileAttributes.Directory))
if (IsDirectory(filePath))
{
return filePath;
}
else
{
return new FileInfo(filePath).Directory.FullName;
}
}
catch (IOException)
{
return filePath;
}
else
}

private bool IsDirectory(string path)
{
try
{
return new FileInfo(filePath).Directory.FullName;
var attr = File.GetAttributes(path);
return attr.HasFlag(FileAttributes.Directory);
}
catch (IOException)
{
bool found = new[]
{
Path.DirectorySeparatorChar,
Path.AltDirectorySeparatorChar
}.Any(x => path.EndsWith(x.ToString()));

return found;
}
}

private bool HasProperty(Properties properties, string propertyName)
{
ThreadHelper.ThrowIfNotOnUIThread();

if (properties != null)
{
foreach (Property item in properties)
Expand Down
4 changes: 4 additions & 0 deletions ConEmuIntegration/app.config
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@
<assemblyIdentity name="Microsoft.VisualStudio.Validation" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-15.3.0.0" newVersion="15.3.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Net.Http" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.1.3" newVersion="4.1.1.3" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" /></startup></configuration>
20 changes: 10 additions & 10 deletions ConEmuIntegration/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
<package id="ConEmu.Core" version="18.6.26" targetFramework="net461" />
<package id="EnvDTE" version="8.0.2" targetFramework="net461" />
<package id="Microsoft.VisualStudio.CoreUtility" version="15.8.525" targetFramework="net461" />
<package id="Microsoft.VisualStudio.ImageCatalog" version="15.7.27703" targetFramework="net461" />
<package id="Microsoft.VisualStudio.Imaging" version="15.7.27703" targetFramework="net461" />
<package id="Microsoft.VisualStudio.ImageCatalog" version="15.8.28010" targetFramework="net461" />
<package id="Microsoft.VisualStudio.Imaging" version="15.8.28010" targetFramework="net461" />
<package id="Microsoft.VisualStudio.Imaging.Interop.14.0.DesignTime" version="14.3.26930" targetFramework="net461" />
<package id="Microsoft.VisualStudio.OLE.Interop" version="7.10.6071" targetFramework="net461" />
<package id="Microsoft.VisualStudio.SDK.EmbedInteropTypes" version="15.0.21" targetFramework="net461" />
<package id="Microsoft.VisualStudio.Shell.15.0" version="15.7.27703" targetFramework="net461" />
<package id="Microsoft.VisualStudio.Shell.Framework" version="15.7.27703" targetFramework="net461" />
<package id="Microsoft.VisualStudio.SDK.EmbedInteropTypes" version="15.0.27" targetFramework="net461" />
<package id="Microsoft.VisualStudio.Shell.15.0" version="15.8.28010" targetFramework="net461" />
<package id="Microsoft.VisualStudio.Shell.Framework" version="15.8.28010" targetFramework="net461" />
<package id="Microsoft.VisualStudio.Shell.Immutable.11.0" version="15.0.25415" targetFramework="net461" />
<package id="Microsoft.VisualStudio.Shell.Immutable.12.0" version="15.0.25415" targetFramework="net461" />
<package id="Microsoft.VisualStudio.Shell.Immutable.14.0" version="15.0.25405" targetFramework="net461" />
Expand All @@ -26,16 +26,16 @@
<package id="Microsoft.VisualStudio.Text.Data" version="15.8.525" targetFramework="net461" />
<package id="Microsoft.VisualStudio.TextManager.Interop" version="7.10.6071" targetFramework="net461" />
<package id="Microsoft.VisualStudio.TextManager.Interop.8.0" version="8.0.50728" targetFramework="net461" />
<package id="Microsoft.VisualStudio.Threading" version="15.8.145" targetFramework="net461" />
<package id="Microsoft.VisualStudio.Threading.Analyzers" version="15.8.145" targetFramework="net461" />
<package id="Microsoft.VisualStudio.Utilities" version="15.7.27703" targetFramework="net461" />
<package id="Microsoft.VisualStudio.Threading" version="15.8.168" targetFramework="net461" />
<package id="Microsoft.VisualStudio.Threading.Analyzers" version="15.8.168" targetFramework="net461" />
<package id="Microsoft.VisualStudio.Utilities" version="15.8.28010" targetFramework="net461" />
<package id="Microsoft.VisualStudio.Validation" version="15.3.58" targetFramework="net461" />
<package id="Microsoft.VisualStudio.Workspace" version="15.0.485" targetFramework="net461" />
<package id="Microsoft.VisualStudio.Workspace.VSIntegration" version="15.0.485" targetFramework="net461" />
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net461" />
<package id="stdole" version="7.0.3303" targetFramework="net461" />
<package id="StreamJsonRpc" version="1.4.121" targetFramework="net461" />
<package id="System.Net.Http" version="4.3.3" targetFramework="net461" />
<package id="StreamJsonRpc" version="1.4.134" targetFramework="net461" />
<package id="System.Net.Http" version="4.3.4" targetFramework="net461" />
<package id="System.Reflection.Emit" version="4.3.0" targetFramework="net461" />
<package id="System.Security.Cryptography.Algorithms" version="4.3.1" targetFramework="net461" />
<package id="System.Security.Cryptography.Encoding" version="4.3.0" targetFramework="net461" />
Expand Down
2 changes: 1 addition & 1 deletion ConEmuIntegration/source.extension.vsixmanifest
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
<Metadata>
<Identity Id="da4195aa-018f-4bb3-9443-37f4f5e16d94" Version="2.0.0.21" Language="en-US" Publisher="David Roller" />
<Identity Id="da4195aa-018f-4bb3-9443-37f4f5e16d94" Version="2.0.0.22" Language="en-US" Publisher="David Roller" />
<DisplayName>ConEmuIntegration</DisplayName>
<Description xml:space="preserve">Integrate the console emulator ConEmu in Visual Studio</Description>
<License>Resources\LICENSE</License>
Expand Down

0 comments on commit d588b02

Please sign in to comment.