Skip to content

Commit 7777609

Browse files
committed
Add unique prefixes to all .targets properties and items
1 parent a2c9313 commit 7777609

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

CommunityToolkit.Mvvm/CommunityToolkit.Mvvm.targets

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,27 +18,27 @@
1818
the same version) but Microsoft.Build.Tasks.CodeAnalysis.dll is where MSBuild loads the compiler tasks from so if
1919
someone is getting creative with msbuild tasks/targets this is the "most correct" assembly to check. -->
2020
<GetAssemblyIdentity AssemblyFiles="$([System.IO.Path]::Combine(`$([System.IO.Path]::GetDirectoryName($(CSharpCoreTargetsPath)))`,`Microsoft.Build.Tasks.CodeAnalysis.dll`))">
21-
<Output TaskParameter="Assemblies" ItemName="CurrentCompilerAssemblyIdentity"/>
21+
<Output TaskParameter="Assemblies" ItemName="MVVMToolkitCurrentCompilerAssemblyIdentity"/>
2222
</GetAssemblyIdentity>
2323

2424
<PropertyGroup>
2525

2626
<!-- Transform the resulting item from GetAssemblyIdentity into a property representing its assembly version -->
27-
<CurrentCompilerVersion>@(CurrentCompilerAssemblyIdentity->'%(Version)')</CurrentCompilerVersion>
27+
<MVVMToolkitCurrentCompilerVersion>@(MVVMToolkitCurrentCompilerAssemblyIdentity->'%(Version)')</MVVMToolkitCurrentCompilerVersion>
2828

2929
<!-- The CurrentCompilerVersionIsNotNewEnough property can now be defined based on the Roslyn assembly version -->
30-
<CurrentCompilerVersionIsNotNewEnough Condition="$([MSBuild]::VersionLessThan($(CurrentCompilerVersion), 4.0))">true</CurrentCompilerVersionIsNotNewEnough>
30+
<MVVMToolkitCurrentCompilerVersionIsNotNewEnough Condition="$([MSBuild]::VersionLessThan($(MVVMToolkitCurrentCompilerVersion), 4.0))">true</MVVMToolkitCurrentCompilerVersionIsNotNewEnough>
3131
</PropertyGroup>
3232

3333
<!-- If the Roslyn version is < 4.0, disable the source generators -->
34-
<ItemGroup Condition ="'$(CurrentCompilerVersionIsNotNewEnough)' == 'true'">
34+
<ItemGroup Condition ="'$(MVVMToolkitCurrentCompilerVersionIsNotNewEnough)' == 'true'">
3535
<Analyzer Remove="@(_MVVMToolkitAnalyzer)"/>
3636
</ItemGroup>
3737

3838
<!-- If the source generators are disabled, also emit a warning. This would've been produced by MSBuild itself as well, but
3939
emitting this manually lets us customize the message to inform developers as to why exactly the generators have been
4040
disabled, and that the rest of the MVVM Toolkit will still keep working as intended, just without additional features. -->
41-
<Warning Condition ="'$(CurrentCompilerVersionIsNotNewEnough)' == 'true'" Text="The MVVM Toolkit source generators have been disabled on the current configuration, as they need Roslyn 4.x in order to work. The MVVM Toolkit will work just fine, but features relying on the source generators will not be available."/>
41+
<Warning Condition ="'$(MVVMToolkitCurrentCompilerVersionIsNotNewEnough)' == 'true'" Text="The MVVM Toolkit source generators have been disabled on the current configuration, as they need Roslyn 4.x in order to work. The MVVM Toolkit will work just fine, but features relying on the source generators will not be available."/>
4242
</Target>
4343

4444
<!-- Remove the analyzer if Roslyn is missing -->

0 commit comments

Comments
 (0)