microsoft / MSBuildLocator

An API to locate MSBuild assemblies from an installed Visual Studio location. Use this to ensure that calling the MSBuild API will use the same toolset that a build from Visual Studio or msbuild.exe would.
Other
221 stars 86 forks source link

update warning presence in Microsoft.Build.Locator.targets #233

Closed YuliiaKovalova closed 1 year ago

YuliiaKovalova commented 1 year ago

Fixes: https://github.com/microsoft/MSBuildLocator/issues/89

ladipro commented 1 year ago

Does this work? It looks like it should hit dotnet/msbuild#1155

+1, this does not build.

@YuliiaKovalova, in addition to fixing it could you please also add

  <Import Project="..\..\src\MSBuildLocator\build\Microsoft.Build.Locator.targets"/>

to BuilderApp.csproj so this file is covered by CI?

YuliiaKovalova commented 1 year ago

Does this work? It looks like it should hit dotnet/msbuild#1155

+1, this does not build.

@YuliiaKovalova, in addition to fixing it could you please also add

  <Import Project="..\..\src\MSBuildLocator\build\Microsoft.Build.Locator.targets"/>

to BuilderApp.csproj so this file is covered by CI?

I was inspired by https://stackoverflow.com/questions/3289538/is-there-any-msbuild-task-to-check-if-a-string-contains-another-string-similar

:) I will doublecheck

Should I check it with a regular expression?

ladipro commented 1 year ago

I was inspired by https://stackoverflow.com/questions/3289538/is-there-any-msbuild-task-to-check-if-a-string-contains-another-string-similar

Yes, it works for properties but sadly not for metadata.

Should I check it with a regular expression?

I don't think so. Please check this comment.

YuliiaKovalova commented 1 year ago

I was inspired by https://stackoverflow.com/questions/3289538/is-there-any-msbuild-task-to-check-if-a-string-contains-another-string-similar

Yes, it works for properties but sadly not for metadata.

Should I check it with a regular expression?

I don't think so. Please check this comment.

It works, thank you !

YuliiaKovalova commented 1 year ago

@rainersigwald , please review the changes.