Skip to content
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

SA1402 Code Fix: New file created in other project when using Xamarin shared project #2127

Open
accidentaldeveloper opened this issue Apr 25, 2016 · 3 comments
Assignees
Labels

Comments

@accidentaldeveloper
Copy link
Contributor

Scenario:
Solution with:
Xamarin Shared Project (calling this Mobile.Shared)
Xamarin iOS Project (Mobile.iOS)
Xamarin Android Project (Mobile.Android)

Mobile.iOS and Mobile.Android reference Mobile.Shared
File (Foo.cs) contains two classes, violating SA1402
Execute the Code Fix for the offending class

Expected:
StyleCop creates a new file in Mobile.Shared for the second class

Actual:
StyleCop creates a new file in each of the projects referencing Mobile.Shared (Mobile.iOS and Mobile.Android)

Thank you so much for this project. This is not a blocking issue - just trying to do my part by reporting it.

@vweijsters vweijsters added the bug label Apr 26, 2016
@vweijsters vweijsters self-assigned this Apr 26, 2016
@vweijsters
Copy link
Contributor

Hi, thanks for reporting this. I'll investigate and see if it can be fixed.

@sharwell
Copy link
Member

This is similar to some other bugs we've had. At the time we last checked, this was caused by a Roslyn limitation; the most frustrating part is Roslyn doesn't even provide us with information to know whether or not the bug will occur (so we could selectively disable the code fix for violations in shared projects).

@vweijsters
Copy link
Contributor

The workaround described in #1714 might work here as well (link)

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

No branches or pull requests

3 participants