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

Do not transform solution project dependencies into ProjectReference dependencies #1422

Closed
wants to merge 2 commits into from

Conversation

cdmihai
Copy link
Contributor

@cdmihai cdmihai commented Jul 18, 2017

Copy link
Member

@rainersigwald rainersigwald left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure we should do this workaround instead of fixing #939. Then there wouldn't be anything special about SDK projects' solution build.

If we want to fix this for 15.3, this workaround seems like a good idea. For 15.5 I'd rather see the root cause fixed.

Copy link
Member

@rainersigwald rainersigwald left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Last comment was supposed to be red, not green, sorry.

@cdmihai
Copy link
Contributor Author

cdmihai commented Jul 18, 2017

I think this change could be orthogonal to #939. It enables msbuild to behave like VS does, in the presence of sln based project dependencies. Without this change msbuild injects an extra ProjectReference, whereas VS does not. This makes building in VS different from building in the command line. Right now this difference in behaviour exposes #939. In the future it might have other random side effects.

@cdmihai
Copy link
Contributor Author

cdmihai commented Jul 18, 2017

In addition, the right user gesture for #939 is to explicitly declare a project reference inside the csproj file, whereas this PR handles the case when the user wants (for some unknown reason) a sln based dependency.

On the other hand, we could consider sln based dependencies obsolete, and in that sense encourage users to mark the dependency accordingly in the csproj instead. From this point of view it makes sense to not take this PR, and guide users to the correct solution when they use sln based dependencies and get a build error from the command line.

@rainersigwald
Copy link
Member

When MSBuild is generating the from-solution-dependencies ProjectReferences, we mark them with the same metadata that a user would use for an explicit reference.

This knob is orthogonal to correct ProjectReference behavior, but I'm concerned about changing the in-solution build experience only for SDK projects. That seems like something that'd come back to bite us in the future.

@nguerrera nguerrera closed this Oct 7, 2017
mmitche pushed a commit to mmitche/sdk that referenced this pull request Jun 5, 2020
…0200427.16 (dotnet#1422)

- Microsoft.AspNetCore.Analyzers: 5.0.0-preview.5.20226.5 -> 5.0.0-preview.5.20227.16
- Microsoft.AspNetCore.Mvc.Analyzers: 5.0.0-preview.5.20226.5 -> 5.0.0-preview.5.20227.16
- Microsoft.AspNetCore.Components.Analyzers: 5.0.0-preview.5.20226.5 -> 5.0.0-preview.5.20227.16
- Microsoft.AspNetCore.Mvc.Api.Analyzers: 5.0.0-preview.5.20226.5 -> 5.0.0-preview.5.20227.16

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants