File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
src/Tasks/Microsoft.NET.Build.Tasks/targets Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -232,9 +232,11 @@ Copyright (c) .NET Foundation. All rights reserved.
232
232
</PropertyGroup >
233
233
234
234
<!-- NOTE: Keep in sync with https://github.com/dotnet/msbuild/blob/main/src/Tasks/Microsoft.Common.tasks -->
235
- <UsingTask TaskName =" Microsoft.CodeAnalysis.BuildTasks.CopyRefAssembly" AssemblyFile =" $(RoslynTargetsPath)\Microsoft.Build.Tasks.CodeAnalysis.dll" />
236
- <UsingTask TaskName =" Microsoft.CodeAnalysis.BuildTasks.Csc" AssemblyFile =" $(RoslynTargetsPath)\Microsoft.Build.Tasks.CodeAnalysis.dll" />
237
- <UsingTask TaskName =" Microsoft.CodeAnalysis.BuildTasks.Vbc" AssemblyFile =" $(RoslynTargetsPath)\Microsoft.Build.Tasks.CodeAnalysis.dll" />
235
+ <!-- `Condition="Exists('$(RoslynTargetsPath)')` is needed because the package might not be yet downloaded during restore in VS
236
+ and we do not want to fail the restore phase because of that. -->
237
+ <UsingTask TaskName =" Microsoft.CodeAnalysis.BuildTasks.CopyRefAssembly" AssemblyFile =" $(RoslynTargetsPath)\Microsoft.Build.Tasks.CodeAnalysis.dll" Condition =" Exists('$(RoslynTargetsPath)')" />
238
+ <UsingTask TaskName =" Microsoft.CodeAnalysis.BuildTasks.Csc" AssemblyFile =" $(RoslynTargetsPath)\Microsoft.Build.Tasks.CodeAnalysis.dll" Condition =" Exists('$(RoslynTargetsPath)')" />
239
+ <UsingTask TaskName =" Microsoft.CodeAnalysis.BuildTasks.Vbc" AssemblyFile =" $(RoslynTargetsPath)\Microsoft.Build.Tasks.CodeAnalysis.dll" Condition =" Exists('$(RoslynTargetsPath)')" />
238
240
239
241
<ItemGroup Condition =" '$(_NeedToDownloadMicrosoftNetSdkCompilersToolsetPackage)' == 'true'" >
240
242
<PackageDownload Include =" Microsoft.Net.Sdk.Compilers.Toolset" Version =" [$(NETCoreSdkVersion)]" />
You can’t perform that action at this time.
0 commit comments