Skip to content

Commit b21fae7

Browse files
authored
Add support for Visual Studio 2022. (#14)
* [2d] Get MixedCallstack working for VS2022 * [2d] Both VS2019 and VS2022 builds. Tested 2019 and 2022. Note: VSIXManifest needs manual change depending on Version. * Use default VisualStudio installation paths.
1 parent 5ee770d commit b21fae7

File tree

2 files changed

+48
-20
lines changed

2 files changed

+48
-20
lines changed

UnityMixedCallstack.csproj

Lines changed: 41 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<PropertyGroup>
44
<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
55
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">11.0</VisualStudioVersion>
6-
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
6+
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
77
<!-- <VSSDK140Install Condition="'$(VSSDK140Install)' == ''">$(MSBuildProgramFiles32)\Microsoft Visual Studio 14.0\VSSDK\</VSSDK140Install> -->
8-
<VSSDK170Install Condition="'$(VSSDK170Install)' == ''">$(MSBuildProgramFiles32)\Microsoft Visual Studio\2019\Professional\VSSDK\</VSSDK170Install>
8+
<VSSdkPath Condition="'$(VisualStudioVersion.Contains(`17`))'">$(ProgramFiles)\Microsoft Visual Studio\2022\Professional\VSSDK\</VSSdkPath>
9+
<VSSdkPath Condition="'$(VisualStudioVersion.Contains(`16`))'">$(MSBuildProgramFiles32)\Microsoft Visual Studio\2019\Professional\VSSDK\</VSSdkPath>
910
<VsixType>v3</VsixType>
1011
<NuGetPackageImportStamp>
1112
</NuGetPackageImportStamp>
13+
<TargetFrameworkProfile />
1214
</PropertyGroup>
1315
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
1416
<PropertyGroup>
@@ -20,11 +22,11 @@
2022
<AppDesignerFolder>Properties</AppDesignerFolder>
2123
<RootNamespace>UnityMixedCallStack</RootNamespace>
2224
<AssemblyName>UnityMixedCallStack</AssemblyName>
23-
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
25+
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
2426
<FileAlignment>512</FileAlignment>
2527
<GeneratePkgDefFile>false</GeneratePkgDefFile>
2628
<!--Root directory to Concord SDK install; includes the trailing backslash '\'.-->
27-
<ConcordSDKDir>$(VSSDK170Install)VisualStudioIntegration\</ConcordSDKDir>
29+
<ConcordSDKDir>$(VSSdkPath)VisualStudioIntegration\</ConcordSDKDir>
2830
</PropertyGroup>
2931
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
3032
<DebugSymbols>true</DebugSymbols>
@@ -53,14 +55,41 @@
5355
<StartWorkingDirectory>$(DevEnvDir)</StartWorkingDirectory>
5456
<StartArguments>/rootsuffix Exp</StartArguments>
5557
</PropertyGroup>
58+
59+
<PropertyGroup>
60+
<VsVersion Condition="'$(VisualStudioVersion.Contains(`17`))'">VS2022</VsVersion>
61+
<VsVersion Condition="'$(VisualStudioVersion.Contains(`16`))'">VS2019</VsVersion>
62+
<OutputPath>bin\$(VsVersion)\$(Configuration)\</OutputPath>
63+
<IntermediateOutputPath>obj\$(VsVersion)\$(Configuration)\</IntermediateOutputPath>
64+
</PropertyGroup>
65+
<Choose>
66+
<When Condition="'$(VsVersion)' == 'VS2022'">
67+
<PropertyGroup>
68+
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
69+
</PropertyGroup>
70+
<ItemGroup>
71+
<PackageReference Include="Microsoft.VisualStudio.SDK" Version="17.0.31902.203" />
72+
<PackageReference Include="Microsoft.VSSDK.BuildTools" Version="17.0.5232" />
73+
<PackageReference Include="Microsoft.VisualStudio.Debugger.Engine" Version="17.0.1110801" />
74+
</ItemGroup>
75+
</When>
76+
<Otherwise>
77+
<PropertyGroup>
78+
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
79+
</PropertyGroup>
80+
<ItemGroup>
81+
<PackageReference Include="Microsoft.VisualStudio.SDK" Version="15.0.1" />
82+
<PackageReference Include="Microsoft.VSSDK.BuildTools" Version="15.9.3039" />
83+
<PackageReference Include="Microsoft.VisualStudio.Debugger.Engine" Version="15.9.28307" />
84+
</ItemGroup>
85+
</Otherwise>
86+
</Choose>
5687
<ItemGroup>
57-
<Reference Include="Microsoft.VisualStudio.Shell.14.0, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
58-
<Reference Include="Microsoft.VisualStudio.Shell.Interop, Version=7.1.40304.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
5988
<Reference Include="System" />
6089
<Reference Include="System.Core" />
6190
<Reference Include="Microsoft.VisualStudio.Debugger.Engine">
62-
<HintPath>$(ConcordSDKDir)Reference Assemblies\Microsoft.VisualStudio.Debugger.Engine.dll</HintPath>
63-
<Private>False</Private>
91+
<HintPath>$(ConcordSDKDir)Reference Assemblies\Microsoft.VisualStudio.Debugger.Engine.dll</HintPath>
92+
<Private>False</Private>
6493
</Reference>
6594
</ItemGroup>
6695
<ItemGroup>
@@ -75,16 +104,9 @@
75104
</ItemGroup>
76105
<ItemGroup>
77106
<None Include="source.extension.vsixmanifest">
78-
<SubType>Designer</SubType>
107+
<SubType>Designer</SubType>
79108
</None>
80-
</ItemGroup>
81-
<ItemGroup>
82-
<PackageReference Include="Microsoft.VisualStudio.Sdk.BuildTasks.14.0">
83-
<Version>14.9.23</Version>
84-
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
85-
<PrivateAssets>all</PrivateAssets>
86-
</PackageReference>
87-
</ItemGroup>
109+
</ItemGroup>
88110
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
89111
<Import Project="$(ConcordSDKDir)Tools\bin\Microsoft.VSSDK.Debugger.VSDConfigTool.targets" />
90112
<Import Project="$(VSToolsPath)\VSSDK\Microsoft.VsSDK.targets" Condition="'$(VSToolsPath)' != ''" />

source.extension.vsixmanifest

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,13 @@
66
<Description xml:space="preserve">Visual Studio native debugger extension to help debug native applications using Mono. Originally developed by Jb Evain, Updated for Unity by Michael DeRoy and Jonathan Chambers</Description>
77
</Metadata>
88
<Installation>
9-
<InstallationTarget Id="Microsoft.VisualStudio.Community" Version="[15.0, 17.0]" />
9+
<!-- Enable/Disable as needed. For now enabled for VS2022-->
10+
<InstallationTarget Id="Microsoft.VisualStudio.Community" Version="[17.0]">
11+
<ProductArchitecture>amd64</ProductArchitecture>
12+
</InstallationTarget>
13+
<!--
14+
<InstallationTarget Id="Microsoft.VisualStudio.Community" Version="[15.0,)" />
15+
-->
1016
</Installation>
1117
<Dependencies>
1218
<Dependency Id="Microsoft.Framework.NDP" DisplayName="Microsoft .NET Framework" d:Source="Manual" Version="4.5" />

0 commit comments

Comments
 (0)