Skip to content

Commit 8a08bf1

Browse files
committed
Upgrading the project to the VSSDK nuget packages for missing references (support VS2012+)
1 parent ce46975 commit 8a08bf1

File tree

6 files changed

+167
-82
lines changed

6 files changed

+167
-82
lines changed

.editorconfig

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
root=true
22

33
[*]
4-
end_of_line = LF
5-
indent_style = space
6-
indent_size = 2
74
trim_trailing_whitespace = true
5+
indent_style = space
86

97
[*.cs]
108
indent_size = 4
Lines changed: 15 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,9 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="..\packages\Microsoft.VSSDK.BuildTools.14.1.24720\build\Microsoft.VSSDK.BuildTools.props" Condition="Exists('..\packages\Microsoft.VSSDK.BuildTools.14.1.24720\build\Microsoft.VSSDK.BuildTools.props')" />
34
<PropertyGroup>
4-
<MinimumVisualStudioVersion>12.0</MinimumVisualStudioVersion>
5-
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">11.0</VisualStudioVersion>
5+
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
66
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
7-
<FileUpgradeFlags>
8-
</FileUpgradeFlags>
9-
<OldToolsVersion>12.0</OldToolsVersion>
10-
<UpgradeBackupLocation />
11-
<PublishUrl>publish\</PublishUrl>
12-
<Install>true</Install>
13-
<InstallFrom>Disk</InstallFrom>
14-
<UpdateEnabled>false</UpdateEnabled>
15-
<UpdateMode>Foreground</UpdateMode>
16-
<UpdateInterval>7</UpdateInterval>
17-
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
18-
<UpdatePeriodically>false</UpdatePeriodically>
19-
<UpdateRequired>false</UpdateRequired>
20-
<MapFileExtensions>true</MapFileExtensions>
21-
<ApplicationRevision>0</ApplicationRevision>
22-
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
23-
<IsWebBootstrapper>false</IsWebBootstrapper>
24-
<UseApplicationTrust>false</UseApplicationTrust>
25-
<BootstrapperEnabled>true</BootstrapperEnabled>
267
</PropertyGroup>
278
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
289
<PropertyGroup>
@@ -46,6 +27,8 @@
4627
<CopyVsixManifestToOutput>false</CopyVsixManifestToOutput>
4728
<CopyBuildOutputToOutputDirectory>false</CopyBuildOutputToOutputDirectory>
4829
<CopyOutputSymbolsToOutputDirectory>false</CopyOutputSymbolsToOutputDirectory>
30+
<!-- This is added to prevent forced migrations in Visual Studio -->
31+
<MinimumVisualStudioVersion Condition="'$(VisualStudioVersion)' != ''">$(VisualStudioVersion)</MinimumVisualStudioVersion>
4932
</PropertyGroup>
5033
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
5134
<DebugSymbols>true</DebugSymbols>
@@ -65,9 +48,6 @@
6548
<WarningLevel>4</WarningLevel>
6649
</PropertyGroup>
6750
<ItemGroup>
68-
<Reference Include="Microsoft.VisualStudio.CoreUtility">
69-
<Private>False</Private>
70-
</Reference>
7151
<Reference Include="System" />
7252
<Reference Include="System.Core" />
7353
<Reference Include="System.Data" />
@@ -84,31 +64,23 @@
8464
</ItemGroup>
8565
<ItemGroup>
8666
<None Include=".editorconfig" />
87-
</ItemGroup>
88-
<ItemGroup>
89-
<BootstrapperPackage Include=".NETFramework,Version=v4.5">
90-
<Visible>False</Visible>
91-
<ProductName>Microsoft .NET Framework 4.5 %28x86 and x64%29</ProductName>
92-
<Install>true</Install>
93-
</BootstrapperPackage>
94-
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
95-
<Visible>False</Visible>
96-
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
97-
<Install>false</Install>
98-
</BootstrapperPackage>
99-
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
100-
<Visible>False</Visible>
101-
<ProductName>.NET Framework 3.5 SP1</ProductName>
102-
<Install>false</Install>
103-
</BootstrapperPackage>
67+
<None Include="packages.config" />
10468
</ItemGroup>
10569
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
10670
<Import Project="$(VSToolsPath)\VSSDK\Microsoft.VsSDK.targets" Condition="'$(VSToolsPath)' != ''" />
107-
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
71+
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
72+
<PropertyGroup>
73+
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
74+
</PropertyGroup>
75+
<Error Condition="!Exists('..\packages\Microsoft.VSSDK.BuildTools.14.1.24720\build\Microsoft.VSSDK.BuildTools.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.VSSDK.BuildTools.14.1.24720\build\Microsoft.VSSDK.BuildTools.props'))" />
76+
<Error Condition="!Exists('..\packages\Microsoft.VSSDK.BuildTools.14.1.24720\build\Microsoft.VSSDK.BuildTools.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.VSSDK.BuildTools.14.1.24720\build\Microsoft.VSSDK.BuildTools.targets'))" />
77+
</Target>
78+
<Import Project="..\packages\Microsoft.VSSDK.BuildTools.14.1.24720\build\Microsoft.VSSDK.BuildTools.targets" Condition="Exists('..\packages\Microsoft.VSSDK.BuildTools.14.1.24720\build\Microsoft.VSSDK.BuildTools.targets')" />
79+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
10880
Other similar extension points exist, see Microsoft.Common.targets.
10981
<Target Name="BeforeBuild">
11082
</Target>
11183
<Target Name="AfterBuild">
11284
</Target>
11385
-->
114-
</Project>
86+
</Project>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<packages>
3+
<package id="Microsoft.VSSDK.BuildTools" version="14.1.24720" targetFramework="net45" developmentDependency="true" />
4+
</packages>

0 commit comments

Comments
 (0)