aspnet / Tooling

Issue tracker and info on Visual Studio tooling for ASP.NET
Other
256 stars 124 forks source link

The migrated solution picks the wrong csproj file, not the migrated one #923

Closed Tragetaschen closed 7 years ago

Tragetaschen commented 7 years ago

For my project, I had forked the original dbus-sharp project and added the necessary bits for project.json/xproj based VS integration. I have now tried to migrate this with the VS 2017 RC based tooling and it's stumbling over that project.

The fork is a submodule within my git repository and global.json points to that submodule's src folder and my solution points to the xproj in the project's folder.

After automatic migration in VS, there is a new Dbus.Sharp.csproj next to the old xproj that looks like the other migrated projects. However, the solution now points to the dbus-daemon.csproj instead of the migrated project.

When I remove the two "old" csproj files before attempting the migration, the solution migrates correctly.

mlorbetske commented 7 years ago

@srivatsn any ideas?

srivatsn commented 7 years ago

@livarcocc and @333fred

333fred commented 7 years ago

@Tragetaschen, are you using a specific branch? I cloned and looked at master, but it doesn't look like the solution file points to the xproj project files, but is pointing at the csproj files.

Tragetaschen commented 7 years ago

As said, that repository is a submodule in my private git repository. I'm referencing the xproj from a solution within that private repository. I'll try to create a public repository here on github with a similar setup and hopefully it shows the problem.

However, my thinking currently goes that it might be a simple

// instead of
Directory.FindFiles("...", "*.csproj").First();
// do
Path.ChangeExtension(Directory.FindFiles("...", "*.xproj").First(), ".csproj");
Tragetaschen commented 7 years ago

I just tried to reproduce it and couldn't (Tragetaschen/aspnet-tooling-issue-923). It also doesn't reproduce with my main project in the recent RC of Visual Studio 2017.

Yay?