-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Transitive dependency on a project.json project treated as ProjectReference #922
Comments
If we change the path variable in the ConsoleApp15's asset file in the libraries section to point to ClassLibrary1.csproj then it works fine - Original (fails)-
After changing (Builds) -
|
The error arises when
It's in that list because it's included here, resulting in
Maybe it should be <ProjectReference Include="@(_TransitiveProjectReferences->'%(ResolvedPath)')" /> instead? |
@natidea on this. So the bug is when the transitive project references kick in and there are SDK -> project.json refs involved, correct? |
|
I'm kind of curious how this hasn't gotten more attention. Is this not a use case that was expected? I am trying to make a cross platform application and one of these platforms is a full .NET WPF application, and it seems like no matter what I do I am getting screwed by one issue or another. I am currently on VS 2015 and nuget doesn't handle transitive .NET standard dependencies in legacy projects, so I get runtime errors (NuGet/Home#4488). The only workaround requires me to upgrade to the new project format and VS 2017, which would have been fine, except for this issue. The only workaround here seems to be to flatten the dependency tree, which I suppose is better than my current predicament since now I'll get compile errors instead of runtime errors. Now I would have to spend time upgrading all of the project formats, implement the nuget transitive dependency workaround, and then also implement this workaround. This definitely inspires confidence in the platform. |
I would suggest switching all projects to PackageReference after moving to VS 2017. It works with non SDK projects too. |
Also #479 is closed so this may be fixed can you try using the .net core 2.1 preview 2 sdk? |
I tried again to upgrade all the projects to the new format and that seems to have fixed at least this issue. I'm not sure what was different last time (maybe I left some projects unconverted), it seems this only affects project.json projects, so not surprisingly updating to the new format wouldn't have issues. |
…0190830.5 (dotnet#922) - Microsoft.AspNetCore.Mvc.Analyzers - 3.0.0-rc1.19430.5 - Microsoft.AspNetCore.Mvc.Api.Analyzers - 3.0.0-rc1.19430.5 - Microsoft.AspNetCore.Analyzers - 3.0.0-rc1.19430.5 - Microsoft.AspNetCore.Components.Analyzers - 3.0.0-rc1.19430.5
Setup -
git clone https://github.com/mishra14/dotnetsdkerror
Expected -
Solution builds successfully
Actual -
VS throws an error -
Details about solution -
Workaround -
If I add an extra reference from ConsoleApp15 to ClassLibrary1, the solution builds fine. This indicates that something is wrong when pulling in the msbuildpath a references project!
Notes -
The text was updated successfully, but these errors were encountered: