-
Notifications
You must be signed in to change notification settings - Fork 212
Expand file tree
/
Copy pathDirectory.Build.targets
More file actions
23 lines (22 loc) · 1.04 KB
/
Directory.Build.targets
File metadata and controls
23 lines (22 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<Project>
<ItemGroup>
<PackageReference Include="StyleCop.Analyzers" PrivateAssets="All" />
</ItemGroup>
<!-- Auto-create nuget.config from template for local development -->
<Target Name="EnsureNuGetConfig" BeforeTargets="CollectPackageReferences;Restore">
<PropertyGroup>
<NuGetConfigTemplate>$(MSBuildThisFileDirectory)nuget.config.template</NuGetConfigTemplate>
<NuGetConfigTarget>$(MSBuildThisFileDirectory)nuget.config</NuGetConfigTarget>
</PropertyGroup>
<Message Text="Checking for nuget.config..." Importance="low" />
<Copy SourceFiles="$(NuGetConfigTemplate)"
DestinationFiles="$(NuGetConfigTarget)"
Condition="Exists('$(NuGetConfigTemplate)') And !Exists('$(NuGetConfigTarget)')"
SkipUnchangedFiles="true">
<Output TaskParameter="CopiedFiles" ItemName="NuGetConfigCreated" />
</Copy>
<Message Text="Created nuget.config from template for local development"
Importance="high"
Condition="'@(NuGetConfigCreated)' != ''" />
</Target>
</Project>