Skip to content

Commit

Permalink
Merge pull request #6063 from pflugs30/fix/build-issues
Browse files Browse the repository at this point in the history
Fixing various build issues in VS2022 (64-bit)
  • Loading branch information
retailcoder committed Dec 30, 2022
2 parents 095fa86 + ef03e1f commit 153d5d7
Show file tree
Hide file tree
Showing 15 changed files with 65 additions and 30 deletions.
Binary file not shown.
3 changes: 3 additions & 0 deletions Rubberduck.Deployment.Build/OleWoo/x64/olewoo.dll.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6"/></startup></configuration>
Binary file not shown.
49 changes: 43 additions & 6 deletions Rubberduck.Deployment.Build/Rubberduck.Deployment.Build.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,27 @@
<AssemblyName>Rubberduck.Deployment.Build</AssemblyName>
</PropertyGroup>
<Import Project="..\RubberduckBaseMetaProject.csproj" />
<UsingTask TaskName="GetMSBuildBitness" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.Core.dll">
<ParameterGroup>
<Bitness ParameterType="System.String" Output="true" />
</ParameterGroup>
<Task>
<Using Namespace="System" />
<Using Namespace="System.Runtime.InteropServices" />
<Code Type="Fragment" Language="cs">
<![CDATA[
IntPtr ptr = IntPtr.Zero;
if(Marshal.SizeOf(ptr) == 8)
Bitness = "x64";
else if(Marshal.SizeOf(ptr) == 4)
Bitness = "x32";
else
Bitness = "Unknown";
]]>
</Code>
</Task>
</UsingTask>
<ItemGroup>
<Reference Include="Microsoft.Build.Framework" />
<Reference Include="Microsoft.Build.Tasks.v4.0" />
Expand All @@ -17,11 +38,27 @@
<Reference Include="Microsoft.VisualStudio.Setup.Configuration.Interop">
<HintPath>VisualStudioSetup\Microsoft.VisualStudio.Setup.Configuration.Interop.dll</HintPath>
</Reference>
<Reference Include="olewoo">
<HintPath>OleWoo\olewoo.dll</HintPath>
</Reference>
<Reference Include="olewoo_interop">
<HintPath>OleWoo\olewoo_interop.dll</HintPath>
</Reference>
</ItemGroup>
<Target Name="BeforeBuild">
<GetMSBuildBitness>
<Output PropertyName="MSBuildBitness" TaskParameter="Bitness" />
</GetMSBuildBitness>
<Message Text="Resolved MSBuild Bitness: $(MSBuildBitness)" Importance="high" />
<ItemGroup>
<Reference Remove="olewoo" />
<Reference Remove="olewoo_interop" />
</ItemGroup>
<ItemGroup Condition="'x64'=='$(MSBuildBitness)'">
<Reference Include="OleWoo\x64\olewoo.dll" />
<Reference Include="OleWoo\x64\olewoo_interop.dll" />
</ItemGroup>
<ItemGroup Condition="'x32'=='$(MSBuildBitness)'">
<Reference Include="OleWoo\x32\olewoo.dll" />
<Reference Include="OleWoo\x32\olewoo_interop.dll" />
</ItemGroup>
</Target>
<ItemGroup>
<Folder Include="OleWoo\x64\" />
<Folder Include="OleWoo\x32\" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion Rubberduck.Deployment/Rubberduck.Deployment.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
<CreateProperty Value="$(ProjectDir)$(OutputPath)$(TargetFileName)">
<Output TaskParameter="Value" PropertyName="TargetAssembly" />
</CreateProperty>
<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" />
<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" />
<Message Text="Ran Rubberduck postbuild task" Importance="normal" />
</Target>
</Project>
5 changes: 1 addition & 4 deletions Rubberduck.Main/Rubberduck.Main.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,6 @@
<Content Include="Ducky.ico" />
</ItemGroup>
<ItemGroup>
<Reference Include="extensibility">
<HintPath>$(MSBuildProgramFiles32)\Common Files\microsoft shared\MSEnv\PublicAssemblies\extensibility.dll</HintPath>
<EmbedInteropTypes>True</EmbedInteropTypes>
</Reference>
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
<Reference Include="System.Windows.Forms" />
Expand Down Expand Up @@ -74,6 +70,7 @@
<PackageReference Include="EasyHook">
<Version>2.7.6684</Version>
</PackageReference>
<PackageReference Include="Microsoft.VisualStudio.Interop" Version="17.0.31723.112" />
<PackageReference Include="NLog">
<Version>4.5.10</Version>
</PackageReference>
Expand Down
5 changes: 1 addition & 4 deletions Rubberduck.VBEEditor/Rubberduck.VBEditor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@
<Import Project="..\RubberduckBaseProject.csproj" />
<ItemGroup>
<Reference Include="CustomMarshalers" />
<Reference Include="stdole, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<EmbedInteropTypes>False</EmbedInteropTypes>
<HintPath>$(MSBuildProgramFiles32)\Common Files\microsoft shared\MSEnv\PublicAssemblies\stdole.dll</HintPath>
</Reference>
<Reference Include="System.Windows.Forms" />
</ItemGroup>
<ItemGroup>
Expand All @@ -32,6 +28,7 @@
<PackageReference Include="NLog.Schema">
<Version>4.5.10</Version>
</PackageReference>
<PackageReference Include="stdole" Version="7.0.3300" />
<PackageReference Include="System.ValueTuple">
<Version>4.5.0</Version>
</PackageReference>
Expand Down
4 changes: 1 addition & 3 deletions Rubberduck.VBEditor.VBA/Rubberduck.VBEditor.VBA.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,6 @@
<HintPath>..\libs\Office.dll</HintPath>
<EmbedInteropTypes>False</EmbedInteropTypes>
</Reference>
<Reference Include="stdole">
<HintPath>$(MSBuildProgramFiles32)\Common Files\microsoft shared\MSEnv\PublicAssemblies\stdole.dll</HintPath>
</Reference>
<Reference Include="System.Windows.Forms" />
</ItemGroup>
<ItemGroup>
Expand All @@ -109,5 +106,6 @@
<PackageReference Include="NLog.Schema">
<Version>4.5.10</Version>
</PackageReference>
<PackageReference Include="stdole" Version="7.0.3300" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion RubberduckBaseMetaProject.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<OutputType>Library</OutputType>
<Company>Rubberduck-VBA</Company>
<AppDesignerFolder>Properties</AppDesignerFolder>
<TargetFramework>net46</TargetFramework>
<TargetFramework>net462</TargetFramework>
<LangVersion>7.2</LangVersion>
<SolutionDir>$(MSBuildProjectDirectory)</SolutionDir>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
Expand Down
2 changes: 1 addition & 1 deletion RubberduckBaseProject.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<OutputType>Library</OutputType>
<Company>Rubberduck-VBA</Company>
<AppDesignerFolder>Properties</AppDesignerFolder>
<TargetFramework>net461</TargetFramework>
<TargetFramework>net462</TargetFramework>
<LangVersion>7.2</LangVersion>
<SolutionDir>$(MSBuildProjectDirectory)</SolutionDir>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
Expand Down
21 changes: 12 additions & 9 deletions RubberduckTestsCodeAnalysis/RubberduckTestsCodeAnalysis.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,18 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis">
<Version>1.0.1</Version>
<Version>4.4.0</Version>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers">
<Version>2.6.0</Version>
<Version>3.3.3</Version>
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.1" />
<PackageReference Include="NUnit">
<Version>3.10.1</Version>
<Version>3.13.3</Version>
</PackageReference>
<PackageReference Include="NUnit3TestAdapter" Version="3.15.1" />
<PackageReference Include="NUnit3TestAdapter" Version="4.3.1" />
<PackageReference Include="System.AppContext">
<Version>4.3.0</Version>
</PackageReference>
Expand All @@ -38,7 +41,7 @@
<Version>4.3.0</Version>
</PackageReference>
<PackageReference Include="System.Composition">
<Version>1.0.31</Version>
<Version>7.0.0</Version>
</PackageReference>
<PackageReference Include="System.Console">
<Version>4.3.1</Version>
Expand Down Expand Up @@ -77,16 +80,16 @@
<Version>4.3.0</Version>
</PackageReference>
<PackageReference Include="System.Reflection.Metadata">
<Version>1.5.0</Version>
<Version>7.0.0</Version>
</PackageReference>
<PackageReference Include="System.Resources.ResourceManager">
<Version>4.3.0</Version>
</PackageReference>
<PackageReference Include="System.Runtime">
<Version>4.3.0</Version>
<Version>4.3.1</Version>
</PackageReference>
<PackageReference Include="System.Runtime.Extensions">
<Version>4.3.0</Version>
<Version>4.3.1</Version>
</PackageReference>
<PackageReference Include="System.Runtime.InteropServices">
<Version>4.3.0</Version>
Expand All @@ -104,7 +107,7 @@
<Version>4.3.0</Version>
</PackageReference>
<PackageReference Include="System.Text.Encoding.CodePages">
<Version>4.4.0</Version>
<Version>7.0.0</Version>
</PackageReference>
<PackageReference Include="System.Text.Encoding.Extensions">
<Version>4.3.0</Version>
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ branches:
skip_tags: true

# build-matrix: all Release CPUs on Visual Studio
image: Visual Studio 2019
image: Visual Studio 2022
configuration: Release
platform: Any CPU

Expand Down

0 comments on commit 153d5d7

Please sign in to comment.