Error CS1519 Invalid token '}' in class, struct, or interface member declaration MultiTargetBug(net452) C:\Temp\FooBar\ClassInNet452Only.cs 9 Active
Error CS0103 The name 'blahThisIsAnError' does not exist in the current context. MultiTargetBug(net452) C:\Temp\FooBar\ClassInNet452Only.cs 8 Active
Error CS1519 Invalid token '}' in class, struct, or interface member declaration MultiTargetBug(netcoreapp2.0) C:\Temp\FooBar\ClassInNet452Only.cs 9 Active
Actual: Three build errors
Error CS1519 Invalid token '}' in class, struct, or interface member declaration MultiTargetBug(net452) C:\Temp\FooBar\ClassInNet452Only.cs 9 Active
Error CS0103 The name 'blahThisIsAnError' does not exist in the current context. MultiTargetBug(net452) C:\Temp\FooBar\ClassInNet452Only.cs 8 Active
Error CS1519 Invalid token '}' in class, struct, or interface member declaration MultiTargetBug(netcoreapp2.0) C:\Temp\FooBar\ClassInNet452Only.cs 9 Active
If you switch to build only you can see that the error coming out of the net452 build is actually being reported against netcoreapp2.0.
Filed on behalf:
https://developercommunity.visualstudio.com/content/problem/103384/a-multi-target-csproj-project-cant-open-file-with.html. https://developercommunity.visualstudio.com/content/problem/233599/error-output-incorrect-on-multi-trageting-targetfr.html
Expected: Two builds errors:
Actual: Three build errors
If you switch to build only you can see that the error coming out of the net452 build is actually being reported against netcoreapp2.0.
MultiTargetBug.zip