Skip to content

Commit 1308d42

Browse files
Hack to include dataflow dll for 2017
1 parent 2c86305 commit 1308d42

File tree

7 files changed

+21
-3
lines changed

7 files changed

+21
-3
lines changed

CodeConverter.sln

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ EndProject
88
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tests", "Tests\Tests.csproj", "{21DBA1CE-AF55-4159-B04B-B8C621BE8921}"
99
EndProject
1010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Vsix", "Vsix\Vsix.csproj", "{99498EF8-C9E0-433B-8D7B-EA8E9E66F0C7}"
11+
ProjectSection(ProjectDependencies) = postProject
12+
{CF18CBCF-67FF-46CA-8D1D-3221B7706D7D} = {CF18CBCF-67FF-46CA-8D1D-3221B7706D7D}
13+
EndProjectSection
1114
EndProject
1215
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{40A4828C-D6D2-43C5-A452-36CB06649680}"
1316
ProjectSection(SolutionItems) = preProject

CodeConverter/CodeConverter.csproj

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
2424
<LangVersion>8.0</LangVersion>
2525
<NoWarn>$(NoWarn);1998</NoWarn>
26+
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
2627
</PropertyGroup>
2728
<ItemGroup>
2829
<Compile Remove="Shared\DefaultReferences.cs" />
@@ -41,7 +42,9 @@
4142
<PackageReference Include="Microsoft.VisualBasic" Version="10.3.0" />
4243
<PackageReference Include="System.Globalization.Extensions" Version="4.3.0" />
4344
<PackageReference Include="System.Linq.Async" Version="4.0.0" />
44-
<PackageReference Include="System.Threading.Tasks.Dataflow" Version="4.6.0" />
45+
<PackageReference Include="System.Threading.Tasks.Dataflow" Version="4.6.0">
46+
<IncludeAssets>all</IncludeAssets>
47+
</PackageReference>
4548
</ItemGroup>
4649
<!-- The InternalVisibleTo fails when building with signing -->
4750
<ItemGroup Condition="'$(SignAssembly)'=='True'">

CommandLine/CodeConv.NetFramework/CodeConv.NetFramework.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
1212
<LangVersion>8.0</LangVersion>
1313
<Nullable>enable</Nullable>
14+
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
1415
</PropertyGroup>
1516

1617
<ItemGroup>

CommandLine/CodeConv/CodeConv.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,12 @@
2525
<LangVersion>8.0</LangVersion>
2626
<Nullable>enable</Nullable>
2727
<NoWarn>NU5100</NoWarn>
28+
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
2829
</PropertyGroup>
2930

3031
<ItemGroup>
3132
<None Include="CodeConvNuGetPackageIcon.png" Pack="true" PackagePath="" />
32-
<None Include="$(SolutionDir)CommandLine\CodeConv.NetFramework\bin\$(Configuration)\net472\**" LinkBase="NetFramework" PackagePath="tools\$(TargetFramework)\any\NetFramework" Pack="true" />
33+
<None Include="$(SolutionDir)CommandLine\CodeConv.NetFramework\bin\$(Configuration)\**" LinkBase="NetFramework" PackagePath="tools\$(TargetFramework)\any\NetFramework" Pack="true" />
3334
</ItemGroup>
3435

3536
<ItemGroup>

Vsix/AssemblyInfo.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
using Microsoft.VisualStudio.Shell;
2+
3+
[assembly: ProvideCodeBase(AssemblyName = "System.Threading.Tasks.Dataflow", Version = "4.6.0.0", PublicKeyToken = "b03f5f7f11d50a3a", CodeBase = "$PackageFolder$\\System.Threading.Tasks.Dataflow.dll")]

Vsix/CodeConverterPackage.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ namespace ICSharpCode.CodeConverter.VsExtension
2929
/// <remarks>
3030
/// Until the package is loaded, converting a multiple selection of projects won't work because there's no way to set a ProvideUIContextRule that covers that case
3131
/// </remarks>
32+
[ProvideBindingPath] // Resolve assemblies in our folder i.e. System.Threading.Tasks.Dataflow
3233
[PackageRegistration(UseManagedResourcesOnly = true, AllowsBackgroundLoading = true)]
3334
[InstalledProductRegistration("#110", "#112", "1.0")] // Info on this package for Help/About
3435
[ProvideMenuResource("Menus.ctmenu", 1)]
@@ -93,7 +94,6 @@ public CodeConverterPackage()
9394
var thisAssembly = GetType().Assembly;
9495
_thisAssemblyName = thisAssembly.GetName();
9596
_ourAssemblyNames = new HashSet<string>(new[] { _thisAssemblyName }.Concat(thisAssembly.GetReferencedAssemblies().Where(a => a.Name.StartsWith("ICSharpCode"))).Select(a => a.FullName));
96-
AppDomain.CurrentDomain.AssemblyResolve += LoadWithoutVersionForOurDependencies;
9797
// Inside this method you can place any initialization code that does not require
9898
// any Visual Studio service because at this point the package object is created but
9999
// not sited yet inside Visual Studio environment. The place to do all the other

Vsix/Vsix.csproj

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@
3838
<DefineConstants>DEBUG;TRACE</DefineConstants>
3939
<ErrorReport>prompt</ErrorReport>
4040
<WarningLevel>4</WarningLevel>
41+
<CopyVsixExtensionLocation>$(LocalAppData)\Microsoft\VisualStudio\15.0_8bd9890a\Extensions\frc3cnfo.23z</CopyVsixExtensionLocation>
42+
<CopyVsixExtensionFiles Condition="Exists($(CopyVsixExtensionLocation))">True</CopyVsixExtensionFiles>
4143
</PropertyGroup>
4244
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
4345
<DebugType>pdbonly</DebugType>
@@ -67,6 +69,10 @@
6769
<ResourceName>Menus.ctmenu</ResourceName>
6870
<SubType>Designer</SubType>
6971
</VSCTCompile>
72+
<Content Include="..\CommandLine\CodeConv.NetFramework\$(OutputPath)\System.Threading.Tasks.Dataflow.dll">
73+
<Link>System.Threading.Tasks.Dataflow.dll</Link>
74+
<IncludeInVSIX>true</IncludeInVSIX>
75+
</Content>
7076
<Content Include="Images\refactoringessentials-logo90.png">
7177
<IncludeInVSIX>true</IncludeInVSIX>
7278
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
@@ -100,6 +106,7 @@
100106
<Compile Include="..\CodeConverter\Shared\DefaultReferences.cs">
101107
<Link>DefaultReferences.cs</Link>
102108
</Compile>
109+
<Compile Include="AssemblyInfo.cs" />
103110
<Compile Include="OleMenuCommandWithBlockingStatus.cs" />
104111
<Compile Include="CodeConversion.cs" />
105112
<Compile Include="ConvertCSToVBCommand.cs" />

0 commit comments

Comments
 (0)