未验证 提交 782fa030 编写于 作者: T Tomáš Matoušek 提交者: GitHub

DevDivInsertionFiles: Fix dependency error reporting (#35924)

Two issues:
1) Replace AfterTargets="Build" with BeforeTargets="AfterBuild"
   Workaround for https://github.com/microsoft/msbuild/issues/3345
2) System.ValueTuple
   Seems like the System.ValueTuple package is missing lib/net472/_._, so lib/net47/System.ValueTuple.dll is identified as a runtime dependency although it is not.
上级 7abef736
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
Projects in this directory do not produce useful binaries, they are only used to generate packages. Projects in this directory do not produce useful binaries, they are only used to generate packages.
Build target only needs to build their project dependencies (via ResolveProjectReferences). Build target only needs to build their project dependencies (via ResolveProjectReferences).
--> -->
<Target Name="Build" DependsOnTargets="ResolveProjectReferences"> <Target Name="CoreBuild" DependsOnTargets="ResolveProjectReferences">
<MakeDir Directories="$(IntermediateOutputPath)" ContinueOnError="True"/> <MakeDir Directories="$(IntermediateOutputPath)" ContinueOnError="True"/>
</Target> </Target>
......
...@@ -93,12 +93,6 @@ ...@@ -93,12 +93,6 @@
<!-- <!--
Exclude dependencies that are not inserted from Roslyn repo. Exclude dependencies that are not inserted from Roslyn repo.
Note: can't use globs due to https://github.com/Microsoft/msbuild/issues/3791. Note: can't use globs due to https://github.com/Microsoft/msbuild/issues/3791.
these dependency should be removed once StreamJsonRpc adds a build target for
net472 - https://github.com/dotnet/roslyn/issues/34558
<_Dependency Remove="Nerdbank.Streams"/>
<_Dependency Remove="System.IO.Pipelines"/>
--> -->
<ItemGroup> <ItemGroup>
<_Dependency Remove="@(_Dependency)" Condition="$([MSBuild]::ValueOrDefault('%(Identity)', '').StartsWith('Microsoft.VisualStudio.'))"/> <_Dependency Remove="@(_Dependency)" Condition="$([MSBuild]::ValueOrDefault('%(Identity)', '').StartsWith('Microsoft.VisualStudio.'))"/>
...@@ -114,6 +108,7 @@ ...@@ -114,6 +108,7 @@
<_Dependency Remove="StreamJsonRpc"/> <_Dependency Remove="StreamJsonRpc"/>
<_Dependency Remove="Nerdbank.Streams"/> <_Dependency Remove="Nerdbank.Streams"/>
<_Dependency Remove="System.IO.Pipelines"/> <_Dependency Remove="System.IO.Pipelines"/>
<_Dependency Remove="System.ValueTuple"/>
<_Dependency Remove="System.Threading.Tasks.Dataflow"/> <_Dependency Remove="System.Threading.Tasks.Dataflow"/>
<_Dependency Remove="VSLangProj"/> <_Dependency Remove="VSLangProj"/>
<_Dependency Remove="VSLangProj2"/> <_Dependency Remove="VSLangProj2"/>
...@@ -199,7 +194,7 @@ ...@@ -199,7 +194,7 @@
Write a list of assembly names and versions that the insertion tool uses to update assembly versions in DevDiv. Write a list of assembly names and versions that the insertion tool uses to update assembly versions in DevDiv.
--> -->
<Target Name="_GenerateDependentAssemblyVersions" <Target Name="_GenerateDependentAssemblyVersions"
AfterTargets="Build" BeforeTargets="AfterBuild"
DependsOnTargets="_CalculateDependenciesToInsert" DependsOnTargets="_CalculateDependenciesToInsert"
Inputs="$(MSBuildAllProjects)" Inputs="$(MSBuildAllProjects)"
Outputs="$(_DependentAssemblyVersionsFile)"> Outputs="$(_DependentAssemblyVersionsFile)">
...@@ -223,7 +218,7 @@ ...@@ -223,7 +218,7 @@
Copy NuGet packages to be inserted into VS by the insertion tool. Copy NuGet packages to be inserted into VS by the insertion tool.
--> -->
<Target Name="_CopyPackagesToInsert" <Target Name="_CopyPackagesToInsert"
AfterTargets="Build" BeforeTargets="AfterBuild"
Condition="'$(Configuration)' == 'Release' and '$(ContinuousIntegrationBuild)' == 'true'" Condition="'$(Configuration)' == 'Release' and '$(ContinuousIntegrationBuild)' == 'true'"
DependsOnTargets="_CalculateDependenciesToInsert;_UnpackDependencies;ApplyOptimizations"> DependsOnTargets="_CalculateDependenciesToInsert;_UnpackDependencies;ApplyOptimizations">
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册