Skip to content
This repository has been archived by the owner on May 17, 2024. It is now read-only.

Consider how to handle a solution with a mix of SDK-style and non-SDK-style solutions #307

Open
cartermp opened this issue Aug 21, 2020 · 2 comments

Comments

@cartermp
Copy link
Contributor

Are we doing anything wrong? Needs more investigation

@clcdrn
Copy link

clcdrn commented Sep 15, 2020

I reported the original issue here: https://developercommunity.visualstudio.com/content/problem/1147329/mix-of-old-style-and-new-sdk-style-csproj-files-in.html
I was on holiday for 3 weeks, hence the lack of response there. Afterwards I was unable to make further comments to the original post.
I'm still not clear under what account was my original issue saved, I only got a GUID as identifier: edd484c5-ca31-6838-a311-9162dd56dded

I had not realised this could be a general issue when mixing old-style with the new SDK-style projects since this was my first attempt with the new system.
I stumbled upon the same GitHub issue (dotnet/msbuild#4303) but since I had used none of the switches mentioned there plus it was over a year old, I thought it's unrelated.

"It would be great if you could engage there and share any projects (or code) if you like. Any shared example project/solution would help narrow things down a lot."

Can you not use the code I uploaded for the issue? It's only empty projects in a solution with no code. I could upload it to GitHub myself if there's a policy against this. Just please tell me how.

"Engage on github with you to see if there are deficiencies with try-convert that can be solved in a straightforward way"

Unfortunately since I have zero experience with the SDK-style system, I'm not sure what I could do to help.
Before I started working on this, I had made a list with available tools for this .csproj conversion and ended up with these:

Microsoft : https://github.com/dotnet/try-convert
CsprojToVs2017 : https://github.com/hvanbakel/CsprojToVs2017
Brian Lagunas : https://github.com/brianlagunas/ConvertProjectToCore3

Since try-convert was mentioned in the official MS posts regarding .NET Core updates, I did not look into the other ones further.
Maybe I could try the same conversion to see if the same solution works with any of the other ones and report back here. But this will take a while...

@pfeigl
Copy link

pfeigl commented Mar 9, 2021

We ran into the same problem today and we were able to identify the root problem to some extent. The problem only comes up when there are Project Dependencies setup between a different projects.

Example

ProjectA (net472)
Depends on:
ProjectB (net472,net5.0)

Important: With "Depends on:" I'm not referring to normal project references but to the project dependencies you can setup for the whole solution.
image

I think the correct issue on this topic is this:
dotnet/msbuild#2274

This is an interesting article on what those project dependencies actually do when building via msbuild:
https://www.cazzulino.com/project-dependencies-as-project-references.html

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants