Skip to content

Commit 153d5d7

Browse files
authored
Merge pull request #6063 from pflugs30/fix/build-issues
Fixing various build issues in VS2022 (64-bit)
2 parents 095fa86 + ef03e1f commit 153d5d7

File tree

15 files changed

+65
-30
lines changed

15 files changed

+65
-30
lines changed
File renamed without changes.
File renamed without changes.
File renamed without changes.
47 KB
Binary file not shown.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6"/></startup></configuration>
543 KB
Binary file not shown.

Rubberduck.Deployment.Build/Rubberduck.Deployment.Build.csproj

Lines changed: 43 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,27 @@
88
<AssemblyName>Rubberduck.Deployment.Build</AssemblyName>
99
</PropertyGroup>
1010
<Import Project="..\RubberduckBaseMetaProject.csproj" />
11+
<UsingTask TaskName="GetMSBuildBitness" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.Core.dll">
12+
<ParameterGroup>
13+
<Bitness ParameterType="System.String" Output="true" />
14+
</ParameterGroup>
15+
<Task>
16+
<Using Namespace="System" />
17+
<Using Namespace="System.Runtime.InteropServices" />
18+
<Code Type="Fragment" Language="cs">
19+
<![CDATA[
20+
IntPtr ptr = IntPtr.Zero;
21+
22+
if(Marshal.SizeOf(ptr) == 8)
23+
Bitness = "x64";
24+
else if(Marshal.SizeOf(ptr) == 4)
25+
Bitness = "x32";
26+
else
27+
Bitness = "Unknown";
28+
]]>
29+
</Code>
30+
</Task>
31+
</UsingTask>
1132
<ItemGroup>
1233
<Reference Include="Microsoft.Build.Framework" />
1334
<Reference Include="Microsoft.Build.Tasks.v4.0" />
@@ -17,11 +38,27 @@
1738
<Reference Include="Microsoft.VisualStudio.Setup.Configuration.Interop">
1839
<HintPath>VisualStudioSetup\Microsoft.VisualStudio.Setup.Configuration.Interop.dll</HintPath>
1940
</Reference>
20-
<Reference Include="olewoo">
21-
<HintPath>OleWoo\olewoo.dll</HintPath>
22-
</Reference>
23-
<Reference Include="olewoo_interop">
24-
<HintPath>OleWoo\olewoo_interop.dll</HintPath>
25-
</Reference>
41+
</ItemGroup>
42+
<Target Name="BeforeBuild">
43+
<GetMSBuildBitness>
44+
<Output PropertyName="MSBuildBitness" TaskParameter="Bitness" />
45+
</GetMSBuildBitness>
46+
<Message Text="Resolved MSBuild Bitness: $(MSBuildBitness)" Importance="high" />
47+
<ItemGroup>
48+
<Reference Remove="olewoo" />
49+
<Reference Remove="olewoo_interop" />
50+
</ItemGroup>
51+
<ItemGroup Condition="'x64'=='$(MSBuildBitness)'">
52+
<Reference Include="OleWoo\x64\olewoo.dll" />
53+
<Reference Include="OleWoo\x64\olewoo_interop.dll" />
54+
</ItemGroup>
55+
<ItemGroup Condition="'x32'=='$(MSBuildBitness)'">
56+
<Reference Include="OleWoo\x32\olewoo.dll" />
57+
<Reference Include="OleWoo\x32\olewoo_interop.dll" />
58+
</ItemGroup>
59+
</Target>
60+
<ItemGroup>
61+
<Folder Include="OleWoo\x64\" />
62+
<Folder Include="OleWoo\x32\" />
2663
</ItemGroup>
2764
</Project>

Rubberduck.Deployment/Rubberduck.Deployment.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
<CreateProperty Value="$(ProjectDir)$(OutputPath)$(TargetFileName)">
5858
<Output TaskParameter="Value" PropertyName="TargetAssembly" />
5959
</CreateProperty>
60-
<RubberduckPostBuildTask Config="$(ConfigurationName)" NetToolsDir="$(SdkPath)bin\NETFX 4.6.1 Tools\" WixToolsDir="$(ProjectDir)WixToolset\" SourceDir="$(TargetDir)" TargetDir="$(TargetDir)" ProjectDir="$(ProjectDir)" IncludeDir="$(ProjectDir)InnoSetup\Includes\" FilesToExtract="Rubberduck.dll" />
60+
<RubberduckPostBuildTask Config="$(ConfigurationName)" NetToolsDir="$(SdkPath)bin\NETFX 4.6.2 Tools\" WixToolsDir="$(ProjectDir)WixToolset\" SourceDir="$(TargetDir)" TargetDir="$(TargetDir)" ProjectDir="$(ProjectDir)" IncludeDir="$(ProjectDir)InnoSetup\Includes\" FilesToExtract="Rubberduck.dll" />
6161
<Message Text="Ran Rubberduck postbuild task" Importance="normal" />
6262
</Target>
6363
</Project>

Rubberduck.Main/Rubberduck.Main.csproj

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,6 @@
3535
<Content Include="Ducky.ico" />
3636
</ItemGroup>
3737
<ItemGroup>
38-
<Reference Include="extensibility">
39-
<HintPath>$(MSBuildProgramFiles32)\Common Files\microsoft shared\MSEnv\PublicAssemblies\extensibility.dll</HintPath>
40-
<EmbedInteropTypes>True</EmbedInteropTypes>
41-
</Reference>
4238
<Reference Include="PresentationCore" />
4339
<Reference Include="PresentationFramework" />
4440
<Reference Include="System.Windows.Forms" />
@@ -74,6 +70,7 @@
7470
<PackageReference Include="EasyHook">
7571
<Version>2.7.6684</Version>
7672
</PackageReference>
73+
<PackageReference Include="Microsoft.VisualStudio.Interop" Version="17.0.31723.112" />
7774
<PackageReference Include="NLog">
7875
<Version>4.5.10</Version>
7976
</PackageReference>

Rubberduck.VBEEditor/Rubberduck.VBEditor.csproj

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@
1515
<Import Project="..\RubberduckBaseProject.csproj" />
1616
<ItemGroup>
1717
<Reference Include="CustomMarshalers" />
18-
<Reference Include="stdole, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
19-
<EmbedInteropTypes>False</EmbedInteropTypes>
20-
<HintPath>$(MSBuildProgramFiles32)\Common Files\microsoft shared\MSEnv\PublicAssemblies\stdole.dll</HintPath>
21-
</Reference>
2218
<Reference Include="System.Windows.Forms" />
2319
</ItemGroup>
2420
<ItemGroup>
@@ -32,6 +28,7 @@
3228
<PackageReference Include="NLog.Schema">
3329
<Version>4.5.10</Version>
3430
</PackageReference>
31+
<PackageReference Include="stdole" Version="7.0.3300" />
3532
<PackageReference Include="System.ValueTuple">
3633
<Version>4.5.0</Version>
3734
</PackageReference>

0 commit comments

Comments
 (0)