Skip to content

Commit 35cd929

Browse files
committed
Fix StyleCopTester support for SDK projects
1 parent 7cf7332 commit 35cd929

2 files changed

Lines changed: 15 additions & 2 deletions

File tree

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
11
{
22
"profiles": {
33
"StyleCopAnalyzers.sln /stats": {
4+
"commandName": "Project",
45
"commandLineArgs": "..\\..\\StyleCopAnalyzers.sln /stats",
5-
"workingDirectory": "$(MSBuildProjectDirectory)"
6+
"workingDirectory": "$(MSBuildProjectDirectory)",
7+
"environmentVariables": {
8+
"MSBuildSDKsPath": "$(MSBuildSDKsPath)",
9+
"MSBuildExtensionsPath": "$(MSBuildExtensionsPath)",
10+
"VisualStudioVersion": "$(VisualStudioVersion)",
11+
"VSINSTALLDIR": "$(VSAPPIDDIR)\\..\\..\\"
12+
}
613
}
714
}
815
}

StyleCop.Analyzers/StyleCopTester/StyleCopTester.csproj

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33

44
<PropertyGroup>
55
<OutputType>Exe</OutputType>
6-
<TargetFrameworks>net452</TargetFrameworks>
6+
<TargetFrameworks>net46</TargetFrameworks>
7+
8+
<!-- Automatically generate the necessary assembly binding redirects -->
9+
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
710
</PropertyGroup>
811

912
<PropertyGroup>
@@ -20,6 +23,9 @@
2023
</ItemGroup>
2124

2225
<ItemGroup>
26+
<PackageReference Include="Microsoft.Build" Version="15.3.409" />
27+
<PackageReference Include="Microsoft.Build.Framework" Version="15.3.409" />
28+
<PackageReference Include="Microsoft.Build.Tasks.Core" Version="15.3.409" />
2329
<PackageReference Include="Microsoft.CodeAnalysis" Version="1.2.1" />
2430
</ItemGroup>
2531

0 commit comments

Comments
 (0)