Reputation: 820
I have a problem writing a targets
file for my vcxproj
project.
In my targets
file the first thing I want to set some build properties based on the configuration so I have this:
<Choose>
<When Condition="$(Configuration.Contains('Debug', StringComparison.OrdinalIgnoreCase))">
<PropertyGroup>
</PropertyGroup>
</When>
</Choose>
But when I try to open the project with imported target file I get an error
error : The expression ""Debug".Contains(Debug, StringComparison.OrdinalIgnoreCase)" cannot be evaluated. Method 'System.String.Contains' not found.
I am using Visual Studio 2022 Preview. Acording to MSBuild docs the string is just a .Net5 string and should have the method. Could someone help me please?
Upvotes: 2
Views: 1598