Skip to content

Commit

Permalink
(maint) Use best practices nuget package
Browse files Browse the repository at this point in the history
This replaces the editorconfig file removed in earlier commits.
  • Loading branch information
vexx32 committed Jul 26, 2024
1 parent 212aa16 commit dd911ed
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/chocolatey.console/chocolatey.console.csproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\Chocolatey.BestPractices.1.0.0\build\Chocolatey.BestPractices.props" Condition="Exists('..\packages\Chocolatey.BestPractices.1.0.0\build\Chocolatey.BestPractices.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
Expand All @@ -16,6 +17,8 @@
<FileAlignment>512</FileAlignment>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<PlatformTarget>x86</PlatformTarget>
Expand Down Expand Up @@ -248,4 +251,12 @@
</ItemGroup>
<Copy SourceFiles="@(ChocolateyPowerShell)" DestinationFolder="$(TargetDir)\helpers\" SkipUnchangedFiles="true" />
</Target>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<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>
</PropertyGroup>
<Error Condition="!Exists('..\packages\Chocolatey.BestPractices.1.0.0\build\Chocolatey.BestPractices.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Chocolatey.BestPractices.1.0.0\build\Chocolatey.BestPractices.props'))" />
<Error Condition="!Exists('..\packages\Chocolatey.BestPractices.1.0.0\build\Chocolatey.BestPractices.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Chocolatey.BestPractices.1.0.0\build\Chocolatey.BestPractices.targets'))" />
</Target>
<Import Project="..\packages\Chocolatey.BestPractices.1.0.0\build\Chocolatey.BestPractices.targets" Condition="Exists('..\packages\Chocolatey.BestPractices.1.0.0\build\Chocolatey.BestPractices.targets')" />
</Project>
1 change: 1 addition & 0 deletions src/chocolatey.console/packages.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="AlphaFS" version="2.1.3" targetFramework="net40" />
<package id="Chocolatey.BestPractices" version="1.0.0" targetFramework="net48" />
<package id="log4net" version="2.0.12" targetFramework="net48" />
<package id="Microsoft.Web.Xdt" version="3.1.0" targetFramework="net48" />
<package id="SimpleInjector" version="2.8.3" targetFramework="net48" />
Expand Down

0 comments on commit dd911ed

Please sign in to comment.