Merge pull request #87 from Azure/fixReferences

Fixing the copying of application dll
This commit is contained in:
Vijay Ramakrishnan 2017-08-04 15:06:00 -07:00 коммит произвёл GitHub
Родитель 2386db4816 5b9f65e34b
Коммит 797869f0ec
2 изменённых файлов: 51 добавлений и 19 удалений

Просмотреть файл

@ -21,22 +21,48 @@ WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and
<Target Name="_GenerateFunctionsPostBuild"
AfterTargets="Build">
<!-- Copy the application dll to bin -->
<Move SourceFiles="$(TargetPath)"
DestinationFiles="$(TargetDir)\bin\$(TargetFileName)"
OverwriteReadOnlyFiles="true" />
<!-- Copy the application dll pdb to bin -->
<Move SourceFiles="$(TargetDir)$(TargetName).pdb"
DestinationFiles="$(TargetDir)\bin\$(TargetName).pdb"
OverwriteReadOnlyFiles="true" />
<!-- TODO: CopyFilesToOutputDirectory does not look at the outdir to copy the pdbs. hence copying it manually. -->
<!-- Copy the application pdb to the bin folder-->
<Move SourceFiles="$(TargetDir)\$(TargetName).pdb"
DestinationFiles="$(TargetDir)\bin\$(TargetName).pdb"
OverwriteReadOnlyFiles="true"
Condition="Exists('$(TargetDir)\$(TargetName).pdb')" />
<BuildFunctions
TargetPath="$(TargetDir)\bin\$(TargetFileName)"
TargetPath="$(TargetPath)"
OutputPath="$(TargetDir)"/>
</Target>
<!--
============================================================
_FunctionsBeforeCopyFilesToOutputDirectory
Sets the correct runtime folder for functions
============================================================
-->
<Target Name="_FunctionsBeforeCopyFilesToOutputDirectory"
BeforeTargets="CopyFilesToOutputDirectory">
<PropertyGroup>
<BackUpOutDirPropertyValue>$(OutDir)</BackUpOutDirPropertyValue>
<OutDir>$(OutDir)bin\</OutDir>
</PropertyGroup>
</Target>
<!--
============================================================
_FunctionsAfterCopyFilesToOutputDirectory
Resets the correct runtime folder for functions
============================================================
-->
<Target Name="_FunctionsAfterCopyFilesToOutputDirectory"
AfterTargets="CopyFilesToOutputDirectory">
<PropertyGroup>
<OutDir>$(BackUpOutDirPropertyValue)</OutDir>
</PropertyGroup>
</Target>
<!--
============================================================
_ResolveAdditionalReferenceCopyLocalPathsForFunctions
@ -96,6 +122,7 @@ WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and
DestinationSubDirectory="$(RefAssembliesFolderName)\"/>
</ItemGroup>
<!-- Force the binaries to be copied to the bin folder.-->
<ItemGroup>
<ReferenceCopyLocalPaths>
<DestinationSubDirectory>bin\%(ReferenceCopyLocalPaths.DestinationSubDirectory)</DestinationSubDirectory>
@ -106,6 +133,11 @@ WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and
</ResolvedAssembliesToPublish>
</ItemGroup>
<!-- Target path needs to point to the correct dll so that P2P references work. -->
<PropertyGroup>
<TargetPath>$(TargetDir)\bin\$(TargetFileName)</TargetPath>
</PropertyGroup>
</Target>
<!--

Просмотреть файл

@ -127,14 +127,14 @@ WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and
-->
<Target Name="_GenerateFunctionsAndCopyContentFiles">
<!-- Copy the application dll to the bin folder-->
<Move SourceFiles="$(PublishDir)\$(TargetFileName)"
DestinationFiles="$(PublishDir)\bin\$(TargetFileName)"
OverwriteReadOnlyFiles="true" />
<ItemGroup>
<FunctionsPublishAssemblies Include="$(PublishDir)\*.dll;
$(PublishDir)\*.pdb" />
</ItemGroup>
<!-- Copy the application pdb to the bin folder-->
<Move SourceFiles="$(PublishDir)\$(TargetName).pdb"
DestinationFiles="$(PublishDir)\bin\$(TargetName).pdb"
<!-- Copy the additional assemblies to the bin folder-->
<Move SourceFiles="@(FunctionsPublishAssemblies)"
DestinationFiles="$(PublishDir)\bin\%(Filename)%(Extension)"
OverwriteReadOnlyFiles="true" />
<BuildFunctions