File tree Expand file tree Collapse file tree 4 files changed +11
-8
lines changed
src/Tasks/Microsoft.NET.Build.Tasks/targets Expand file tree Collapse file tree 4 files changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -335,7 +335,9 @@ Copyright (c) .NET Foundation. All rights reserved.
335
335
336
336
<PropertyGroup Condition =" '$(RoslynCompilerType)' == 'Core'" >
337
337
<RoslynTargetsPath Condition =" '$(MSBuildRuntimeType)' == 'Core'" >$(MSBuildThisFileDirectory)..\..\..\Roslyn</RoslynTargetsPath >
338
+ <RoslynTasksAssembly Condition =" '$(MSBuildRuntimeType)' == 'Core'" >$(MSBuildThisFileDirectory)..\..\..\Roslyn\Microsoft.Build.Tasks.CodeAnalysis.dll</RoslynTasksAssembly >
338
339
<RoslynTargetsPath Condition =" '$(MSBuildRuntimeType)' != 'Core'" >$(MSBuildThisFileDirectory)..\..\..\Roslyn\binfx</RoslynTargetsPath >
340
+ <RoslynTasksAssembly Condition =" '$(MSBuildRuntimeType)' != 'Core'" >$(MSBuildThisFileDirectory)..\..\..\Roslyn\binfx\Microsoft.Build.Tasks.CodeAnalysis.Sdk.dll</RoslynTasksAssembly >
339
341
<CSharpCoreTargetsPath >$(MSBuildThisFileDirectory)..\..\..\Roslyn\Microsoft.CSharp.Core.targets</CSharpCoreTargetsPath >
340
342
<VisualBasicCoreTargetsPath >$(MSBuildThisFileDirectory)..\..\..\Roslyn\Microsoft.VisualBasic.Core.targets</VisualBasicCoreTargetsPath >
341
343
</PropertyGroup >
Original file line number Diff line number Diff line change @@ -77,6 +77,7 @@ Copyright (c) .NET Foundation. All rights reserved.
77
77
78
78
<PropertyGroup Condition =" '$(RoslynCompilerType)' == 'FrameworkPackage' and '$(OS)' == 'Windows_NT' and '$(MSBuildRuntimeType)' == 'Full'" >
79
79
<RoslynTargetsPath >$(NuGetPackageRoot)\microsoft.net.sdk.compilers.toolset\$(NETCoreSdkVersion)</RoslynTargetsPath >
80
+ <RoslynTasksAssembly >$(RoslynTargetsPath)\Microsoft.Build.Tasks.CodeAnalysis.dll</RoslynTasksAssembly >
80
81
<_NeedToDownloadMicrosoftNetSdkCompilersToolsetPackage >true</_NeedToDownloadMicrosoftNetSdkCompilersToolsetPackage >
81
82
<_MicrosoftNetSdkCompilersToolsetPackageRootEmpty Condition =" '$(NuGetPackageRoot)' == ''" >true</_MicrosoftNetSdkCompilersToolsetPackageRootEmpty >
82
83
</PropertyGroup >
Original file line number Diff line number Diff line change @@ -223,9 +223,9 @@ Copyright (c) .NET Foundation. All rights reserved.
223
223
<!-- NOTE: Keep in sync with https://github.com/dotnet/msbuild/blob/main/src/Tasks/Microsoft.Common.tasks -->
224
224
<!-- `Condition="Exists('$(RoslynTargetsPath)')` is needed because the package might not be yet downloaded during restore in VS
225
225
and we do not want to fail the restore phase because of that. -->
226
- <UsingTask TaskName =" Microsoft.CodeAnalysis.BuildTasks.CopyRefAssembly" AssemblyFile =" $(RoslynTargetsPath)\Microsoft.Build.Tasks.CodeAnalysis.dll " Condition =" Exists('$(RoslynTargetsPath )')" />
227
- <UsingTask TaskName =" Microsoft.CodeAnalysis.BuildTasks.Csc" AssemblyFile =" $(RoslynTargetsPath)\Microsoft.Build.Tasks.CodeAnalysis.dll " Condition =" Exists('$(RoslynTargetsPath )')" />
228
- <UsingTask TaskName =" Microsoft.CodeAnalysis.BuildTasks.Vbc" AssemblyFile =" $(RoslynTargetsPath)\Microsoft.Build.Tasks.CodeAnalysis.dll " Condition =" Exists('$(RoslynTargetsPath )')" />
226
+ <UsingTask TaskName =" Microsoft.CodeAnalysis.BuildTasks.CopyRefAssembly" AssemblyFile =" $(RoslynTasksAssembly) " Condition =" Exists('$(RoslynTasksAssembly )')" />
227
+ <UsingTask TaskName =" Microsoft.CodeAnalysis.BuildTasks.Csc" AssemblyFile =" $(RoslynTasksAssembly) " Condition =" Exists('$(RoslynTasksAssembly )')" />
228
+ <UsingTask TaskName =" Microsoft.CodeAnalysis.BuildTasks.Vbc" AssemblyFile =" $(RoslynTasksAssembly) " Condition =" Exists('$(RoslynTasksAssembly )')" />
229
229
230
230
<ItemGroup Condition =" '$(_NeedToDownloadMicrosoftNetSdkCompilersToolsetPackage)' == 'true'" >
231
231
<PackageDownload Include =" Microsoft.Net.Sdk.Compilers.Toolset" Version =" [$(NETCoreSdkVersion)]" />
Original file line number Diff line number Diff line change @@ -175,7 +175,7 @@ Copyright (c) .NET Foundation. All rights reserved.
175
175
AssemblyFile =" $(MicrosoftNETBuildTasksAssembly)" />
176
176
<UsingTask TaskName =" Microsoft.NET.Build.Tasks.ResolvePackageAssets"
177
177
AssemblyFile =" $(MicrosoftNETBuildTasksAssembly)" />
178
-
178
+
179
179
<!-- The condition on this target causes it to be skipped during design-time builds if
180
180
the restore operation hasn't run yet. This is to avoid displaying an error in
181
181
the Visual Studio error list when a project is created before NuGet restore has
@@ -214,17 +214,17 @@ Copyright (c) .NET Foundation. All rights reserved.
214
214
<Target Name =" _ResolveCompilerVersion"
215
215
Condition =" '$(CompilerApiVersion)' == '' And
216
216
('$(Language)' == 'C#' Or '$(Language)' == 'VB') And
217
- Exists('$(RoslynTargetsPath)\Microsoft.Build.Tasks.CodeAnalysis.dll ')" >
218
-
219
- <GetAssemblyIdentity AssemblyFiles =" $(RoslynTargetsPath)\Microsoft.Build.Tasks.CodeAnalysis.dll " >
217
+ Exists('$(RoslynTasksAssembly) ')" >
218
+
219
+ <GetAssemblyIdentity AssemblyFiles =" $(RoslynTasksAssembly) " >
220
220
<Output TaskParameter =" Assemblies" ItemName =" _CodeAnalysisIdentity" />
221
221
</GetAssemblyIdentity >
222
222
223
223
<PropertyGroup >
224
224
<_RoslynApiVersion >$([System.Version]::Parse(%(_CodeAnalysisIdentity.Version)).Major).$([System.Version]::Parse(%(_CodeAnalysisIdentity.Version)).Minor)</_RoslynApiVersion >
225
225
<CompilerApiVersion >roslyn$(_RoslynApiVersion)</CompilerApiVersion >
226
226
</PropertyGroup >
227
-
227
+
228
228
</Target >
229
229
230
230
<Target Name =" ResolvePackageAssets"
You can’t perform that action at this time.
0 commit comments