dotnet / upgrade-assistant

A tool to assist developers in upgrading .NET Framework applications to .NET 6 and beyond
MIT License
1.11k stars 163 forks source link

An equivalent project (a project with the same global properties and tools version) is already present in the project collection #635

Open yehudahaber opened 3 years ago

yehudahaber commented 3 years ago

Getting the below error when updated the startup project (last) of all the projects in the solution. This is in the "Convert project file to SDK style" step

[19:58:24 INF] [dotnet] at Microsoft.Build.Shared.ErrorUtilities.ThrowInvalidOperation(String resourceName, Object[] args) [19:58:24 INF] [dotnet] at Microsoft.Build.Evaluation.ProjectCollection.LoadedProjectCollection.AddProject(Project project) [19:58:24 INF] [dotnet] at Microsoft.Build.Evaluation.ProjectCollection.OnAfterRenameLoadedProject(String oldFullPathIfAny, Project project) [19:58:24 INF] [dotnet] at Microsoft.Build.Evaluation.Project.ProjectImpl.b__1410(String oldFullPath) [19:58:24 INF] [dotnet] at Microsoft.Build.Evaluation.Project.ProjectImpl.Initialize(IDictionary2 globalProperties, String toolsVersion, String subToolsetVersion, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext) [19:58:24 INF] [dotnet] at Microsoft.Build.Evaluation.Project..ctor(ProjectRootElement xml, IDictionary2 globalProperties, String toolsVersion, String subToolsetVersion, ProjectCollection projectCollection, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext) [19:58:24 INF] [dotnet] at MSBuild.Abstractions.UnconfiguredProject.LoadProjects(ProjectCollection collection, ProjectRootElement rootElement) in //src/MSBuild.Abstractions/UnconfiguredProject.cs:line 38 [19:58:24 INF] [dotnet] at MSBuild.Abstractions.MSBuildConversionWorkspace.TryCreateSdkBaselineProject(String projectFilePath, IProject project, IProjectRootElement root, ImmutableDictionary2 configurations, String tfm, Boolean keepCurrentTFMs, Nullable1& baselineProject) in //src/MSBuild.Abstractions/MSBuildConversionWorkspace.cs:line 194 [19:58:24 INF] [dotnet] at MSBuild.Abstractions.MSBuildConversionWorkspace..ctor(ImmutableArray`1 paths, Boolean noBackup, String tfm, Boolean keepCurrentTFMs, Boolean forceWeb) in //src/MSBuild.Abstractions/MSBuildConversionWorkspace.cs:line 55 [19:58:24 INF] [dotnet] at MSBuild.Abstractions.MSBuildConversionWorkspaceLoader.LoadWorkspace(String path, Boolean noBackup, String tfm, Boolean keepCurrentTFMs, Boolean forceWeb) in //src/MSBuild.Abstractions/MSBuildConversionWorkspaceLoader.cs:line 42 [19:58:24 INF] [dotnet] at MSBuild.Conversion.Program.Run(String project, String workspace, String msbuildPath, String tfm, Boolean forceWebConversion, Boolean preview, Boolean diffOnly, Boolean noBackup, Boolean keepCurrentTfms) in //src/try-convert/Program.cs:line 102 [19:58:24 ERR] [dotnet] Error: Exited with non-success code: -1

sunandabalu commented 3 years ago

@yehudahaber Could you share the csproj that you are running UA against?

yehudahaber commented 3 years ago

1100+ lines in redacted form... UpgradeAssistantFailed.zip

sunandabalu commented 3 years ago

@yehudahaber Thanks for the csproj, we will take a look. This looks like a bug.

sunandabalu commented 3 years ago

/cc @mjrousos

isaacrlevin commented 2 years ago

Is there an update here?

cc @twsouthwick @cathysull

yehudahaber commented 1 year ago

This is still an issue using the newest version. Is there any guidance on how to get past this?