Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When conditioning source files between TFMs, build only errors always get reported against first TFM #2811

Open
davkean opened this issue Sep 11, 2017 · 1 comment
Assignees
Labels
Feature-Error-List Reporting compile/build errors, warnings, and messages to the Error List. Feature-Multi-Targeting Targeting and building for multiple frameworks. Triage-Approved Reviewed and prioritized
Milestone

Comments

@davkean
Copy link
Member

davkean commented Sep 11, 2017

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

  1. Open attached project and build

Expected: Two builds 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

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.

MultiTargetBug.zip

@davkean davkean self-assigned this Sep 11, 2017
@davkean davkean added Bug Feature-Error-List Reporting compile/build errors, warnings, and messages to the Error List. labels Sep 11, 2017
@davkean davkean added this to the 15.5 milestone Sep 11, 2017
@Pilchie Pilchie modified the milestones: 15.5, 15.6 Oct 17, 2017
@Pilchie Pilchie modified the milestones: 15.6, Unknown Dec 22, 2017
@jjmew jjmew added Triage-Approved Reviewed and prioritized and removed Triage-Approved Reviewed and prioritized labels Jan 14, 2019
@davkean davkean added the Feature-Multi-Targeting Targeting and building for multiple frameworks. label Feb 4, 2020
@davkean
Copy link
Member Author

davkean commented Feb 4, 2020

Here's a duplicate: #3611.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature-Error-List Reporting compile/build errors, warnings, and messages to the Error List. Feature-Multi-Targeting Targeting and building for multiple frameworks. Triage-Approved Reviewed and prioritized
Projects
None yet
Development

No branches or pull requests

4 participants