Skip to content

Commit 8efd756

Browse files
committed
Build now respects 2010 as well
1 parent 5b6a1ff commit 8efd756

File tree

6 files changed

+64
-44
lines changed

6 files changed

+64
-44
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,5 @@ Samples/HighlightCommentKinds/obj
5252

5353
# Hacky build items
5454
EditorUtilsVsix.vsix
55+
Test\EditorUtilsTest\App.config
56+

EditorUtils.settings

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,15 @@
1515
<Vs2012InstallDir>$(registry:HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\VisualStudio\11.0@InstallDir)</Vs2012InstallDir>
1616
</PropertyGroup>
1717

18+
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '10.0' ">
19+
<EditorUtilsAppConfig>$(MSBuildThisFileDirectory)References\Vs2010\App.config</EditorUtilsAppConfig>
20+
</PropertyGroup>
21+
22+
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '11.0' ">
23+
<EditorUtilsAppConfig>$(MSBuildThisFileDirectory)References\Vs2012\App.config</EditorUtilsAppConfig>
24+
</PropertyGroup>
25+
26+
<!-- Most projects build against the 2010 reference assemblies so make sure to include that in the path -->
1827
<PropertyGroup>
1928
<ReferencePath>$(ReferencePath);$(MSBuildThisFileDirectory)References\Vs2010</ReferencePath>
2029
</PropertyGroup>

References/Vs2010/App.config

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<configuration>
3+
<!-- This file is intentionally kept blank. No need to support redirection on
4+
2010 runs because this is the version we build against -->
5+
</configuration>

References/Vs2012/App.config

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<configuration>
3+
<runtime>
4+
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
5+
<dependentAssembly>
6+
<assemblyIdentity name="Microsoft.VisualStudio.CoreUtility" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
7+
<bindingRedirect oldVersion="10.0.0.0" newVersion="11.0.0.0"/>
8+
</dependentAssembly>
9+
<dependentAssembly>
10+
<assemblyIdentity name="Microsoft.VisualStudio.Editor" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
11+
<bindingRedirect oldVersion="10.0.0.0" newVersion="11.0.0.0"/>
12+
</dependentAssembly>
13+
<dependentAssembly>
14+
<assemblyIdentity name="Microsoft.VisualStudio.Language.Intellisense" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
15+
<bindingRedirect oldVersion="10.0.0.0" newVersion="11.0.0.0"/>
16+
</dependentAssembly>
17+
<dependentAssembly>
18+
<assemblyIdentity name="Microsoft.VisualStudio.Language.StandardClassification" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
19+
<bindingRedirect oldVersion="10.0.0.0" newVersion="11.0.0.0"/>
20+
</dependentAssembly>
21+
<dependentAssembly>
22+
<assemblyIdentity name="Microsoft.VisualStudio.Text.Data" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
23+
<bindingRedirect oldVersion="10.0.0.0" newVersion="11.0.0.0"/>
24+
</dependentAssembly>
25+
<dependentAssembly>
26+
<assemblyIdentity name="Microsoft.VisualStudio.Text.Logic" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
27+
<bindingRedirect oldVersion="10.0.0.0" newVersion="11.0.0.0"/>
28+
</dependentAssembly>
29+
<dependentAssembly>
30+
<assemblyIdentity name="Microsoft.VisualStudio.Text.UI" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
31+
<bindingRedirect oldVersion="10.0.0.0" newVersion="11.0.0.0"/>
32+
</dependentAssembly>
33+
<dependentAssembly>
34+
<assemblyIdentity name="Microsoft.VisualStudio.Text.UI.Wpf" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
35+
<bindingRedirect oldVersion="10.0.0.0" newVersion="11.0.0.0"/>
36+
</dependentAssembly>
37+
</assemblyBinding>
38+
</runtime>
39+
</configuration>

Test/EditorUtilsTest/App.config

Lines changed: 2 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,4 @@
11
<?xml version="1.0" encoding="utf-8" ?>
22
<configuration>
3-
<runtime>
4-
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
5-
<dependentAssembly>
6-
<assemblyIdentity name="Microsoft.VisualStudio.CoreUtility" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
7-
<bindingRedirect oldVersion="10.0.0.0" newVersion="11.0.0.0"/>
8-
</dependentAssembly>
9-
<dependentAssembly>
10-
<assemblyIdentity name="Microsoft.VisualStudio.Editor" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
11-
<bindingRedirect oldVersion="10.0.0.0" newVersion="11.0.0.0"/>
12-
</dependentAssembly>
13-
<dependentAssembly>
14-
<assemblyIdentity name="Microsoft.VisualStudio.Language.Intellisense" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
15-
<bindingRedirect oldVersion="10.0.0.0" newVersion="11.0.0.0"/>
16-
</dependentAssembly>
17-
<dependentAssembly>
18-
<assemblyIdentity name="Microsoft.VisualStudio.Language.StandardClassification" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
19-
<bindingRedirect oldVersion="10.0.0.0" newVersion="11.0.0.0"/>
20-
</dependentAssembly>
21-
<dependentAssembly>
22-
<assemblyIdentity name="Microsoft.VisualStudio.Text.Data" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
23-
<bindingRedirect oldVersion="10.0.0.0" newVersion="11.0.0.0"/>
24-
</dependentAssembly>
25-
<dependentAssembly>
26-
<assemblyIdentity name="Microsoft.VisualStudio.Text.Logic" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
27-
<bindingRedirect oldVersion="10.0.0.0" newVersion="11.0.0.0"/>
28-
</dependentAssembly>
29-
<dependentAssembly>
30-
<assemblyIdentity name="Microsoft.VisualStudio.Text.UI" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
31-
<bindingRedirect oldVersion="10.0.0.0" newVersion="11.0.0.0"/>
32-
</dependentAssembly>
33-
<dependentAssembly>
34-
<assemblyIdentity name="Microsoft.VisualStudio.Text.UI.Wpf" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
35-
<bindingRedirect oldVersion="10.0.0.0" newVersion="11.0.0.0"/>
36-
</dependentAssembly>
37-
</assemblyBinding>
38-
</runtime>
39-
</configuration>
3+
4+
</configuration>

Test/EditorUtilsTest/EditorUtilsTest.csproj

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -94,18 +94,18 @@
9494
<Name>EditorUtils</Name>
9595
</ProjectReference>
9696
</ItemGroup>
97-
<ItemGroup>
97+
<ItemGroup Condition="'$(VisualStudioVersion)' == '11.0'">
9898
<None Include="App.config" />
99+
</ItemGroup>
100+
<ItemGroup>
99101
<None Include="Key.snk" />
100102
<None Include="packages.config" />
101103
</ItemGroup>
102104
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
103105
<Import Project="$(SolutionDir)\.nuget\nuget.targets" />
104-
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
105-
Other similar extension points exist, see Microsoft.Common.targets.
106+
107+
<!-- Copy the appropriate App.config file into this project before the build occurs -->
106108
<Target Name="BeforeBuild">
109+
<Copy SourceFiles="$(EditorUtilsAppConfig)" DestinationFolder="$(MSBuildThisFileDirectory)" />
107110
</Target>
108-
<Target Name="AfterBuild">
109-
</Target>
110-
-->
111-
</Project>
111+
</Project>

0 commit comments

Comments
 (0)