Clean should delete the generated Files
This commit is contained in:
Родитель
4dd518a866
Коммит
0aaf96c5c0
|
@ -5,7 +5,7 @@
|
|||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Azure.WebJobs" Version="2.1.0-beta1" />
|
||||
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.Http" Version="1.0.0-beta1" />
|
||||
<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="1.0.0-alpha7" />
|
||||
<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="1.0.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>netstandard1.5;net46</TargetFrameworks>
|
||||
<PackageVersion>1.0.0-alpha7</PackageVersion>
|
||||
<PackageVersion>1.0.0</PackageVersion>
|
||||
<BuildOutputTargetFolder>tools</BuildOutputTargetFolder>
|
||||
<AssemblyOriginatorKeyFile>PublicKey.snk</AssemblyOriginatorKeyFile>
|
||||
<SignAssembly>False</SignAssembly>
|
||||
|
|
|
@ -138,4 +138,88 @@ Copyright (c) .NET Foundation. All rights reserved.
|
|||
OutputPath="$(PublishIntermediateOutputPath)"/>
|
||||
</Target>
|
||||
|
||||
<!--********************************************************************-->
|
||||
<!-- CopyLocalLockFileAssemblies does not copy all the required assemblies
|
||||
to the bin folder. These adhoc targets fixes the issue.
|
||||
-->
|
||||
<!--********************************************************************-->
|
||||
|
||||
<Target
|
||||
Name="ResolveAdditionalReferenceCopyLocalPathsForFunctions"
|
||||
DependsOnTargets="RunResolvePublishAssembliesForFunctions"
|
||||
AfterTargets="ResolveReferences"
|
||||
>
|
||||
|
||||
<!--
|
||||
Copy publish assemblies that not already included in ReferenceCopyLocalPaths
|
||||
via CopyLocalLockFileAssemblies=true. This will include RID-specific assets
|
||||
that would be published in the runtimes/ folder, but excluded from
|
||||
CopyLocalLockFileAssemblies when no RuntimeIdentifier is set.
|
||||
-->
|
||||
<ItemGroup Condition="'$(RuntimeIdentifier)' == ''">
|
||||
<!--
|
||||
NOTE: The exclusion here is to ensure that we do not override any existing
|
||||
ReferenceCopyLocalPaths with assets from RunResolvedPublishAssemblies.
|
||||
The ReferenceCopyLocalPaths can have conflicts resolved that are not
|
||||
also resolved in the publish set, and publish currently relies on copy
|
||||
local paths having precedence over it to ensure conflict resolution
|
||||
applies. We must preserve that precedence here.
|
||||
-->
|
||||
<_RidSpecificAssembliesByDestination
|
||||
Include="@(ResolvedAssembliesToPublish->'%(DestinationSubPath)')"
|
||||
Exclude="@(ReferenceCopyLocalPaths->'%(DestinationSubDirectory)%(Filename)%(Extension)')"
|
||||
OriginalItemSpec="%(ResolvedAssembliesToPublish.Identity)"
|
||||
/>
|
||||
|
||||
<_RidSpecificAssembliesByDestination
|
||||
DestinationSubDirectory="%(_RidSpecificAssembliesByDestination.RelativeDir)"
|
||||
/>
|
||||
|
||||
<ReferenceCopyLocalPaths
|
||||
Include="@(_RidSpecificAssembliesByDestination->'%(OriginalItemSpec)')"
|
||||
Exclude="@(ReferenceCopyLocalPaths)"
|
||||
/>
|
||||
</ItemGroup>
|
||||
|
||||
<!--
|
||||
Copy reference assemblies needed for runtime compilation to refs/ folder. Only
|
||||
those that are not a also runtime assemblies and therefore already included in
|
||||
ReferenceCopyLocalPaths via CopyLocalLockFileAssemblies=true are needed.
|
||||
-->
|
||||
<ItemGroup Condition="'$(PreserveCompilationContext)' == 'true'">
|
||||
<ReferenceCopyLocalPaths
|
||||
Include="@(ReferencePath)"
|
||||
Exclude="@(ReferenceCopyLocalPaths)"
|
||||
DestinationSubDirectory="$(RefAssembliesFolderName)\"
|
||||
/>
|
||||
</ItemGroup>
|
||||
|
||||
</Target>
|
||||
|
||||
<!--
|
||||
We only need to call RunResolvePublishAssemblies during build when we do not
|
||||
have a RuntimeIdentifier.Otherwise, we already have everything we need from
|
||||
CopyLocalLockFileAssemblies.
|
||||
-->
|
||||
<Target
|
||||
Name="RunResolvePublishAssembliesForFunctions"
|
||||
Condition="'$(RuntimeIdentifier)' == ''"
|
||||
DependsOnTargets="RunResolvePublishAssemblies"
|
||||
/>
|
||||
|
||||
<!--
|
||||
Cleanup the TargetDir folder on Clean to delete the generated content.
|
||||
-->
|
||||
<Target
|
||||
Name="CleanupTargetDir"
|
||||
AfterTargets="Clean">
|
||||
|
||||
<ItemGroup>
|
||||
<_FilesInTargetDir Include="$(TargetDir)\**\*" />
|
||||
</ItemGroup>
|
||||
|
||||
<Delete Files="@(_FilesInTargetDir)" ContinueOnError="true" />
|
||||
<RemoveDir Directories="$(TargetDir)" ContinueOnError="true" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
||||
|
|
Загрузка…
Ссылка в новой задаче