Roslyn: Shared project model

Created on 10 May 2017  路  2Comments  路  Source: dotnet/roslyn

I got this bug report:


Added a second class in same .cs file.

namespace stuff
{
class1 { }
class2 { }
}

When adding additional class in same .cs file, VS4Mac suggested moving class2 it鈥檚 own file. Instead of creating new class2.cs in existing file鈥檚 project (in this case the shared code project of the Xamarin Forms project), it moved to iOS specific project.

Basicaly the MoveTypeToFile refactoring moves the class to the project the shared project is associated with. Roslyn has no representation for shared projects ATM and I don't see any way to fix that - and it may affect more refactorings like generate type and so on.

Would be nice if that could be fixed in future versions.

Area-IDE Bug

Most helpful comment

the problem with SharedProjects and MoveTypeRefactoringProvider still persists - it actually crashes now - not even moving to a concrete project

All 2 comments

This is probably the same probem. (IIRC there's a corresponding issue here on GitHub, but I can't seem to find it now.)

the problem with SharedProjects and MoveTypeRefactoringProvider still persists - it actually crashes now - not even moving to a concrete project

Was this page helpful?
0 / 5 - 0 ratings

Related issues

DavidArno picture DavidArno  路  3Comments

codingonHP picture codingonHP  路  3Comments

asvishnyakov picture asvishnyakov  路  3Comments

MadsTorgersen picture MadsTorgersen  路  3Comments

joshua-mng picture joshua-mng  路  3Comments