Skip to content

Generated classes create conflicts with InternalsVisibleTo #448

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

Closed
clairernovotny opened this issue May 28, 2015 · 5 comments
Closed

Generated classes create conflicts with InternalsVisibleTo #448

clairernovotny opened this issue May 28, 2015 · 5 comments

Comments

@clairernovotny
Copy link

Using the 3.0 b2 msbuild tasks, I see this:

C:\Users\Oren\Source\Git\MetroLog\MetroLog.WP8\obj\Release\GitVersionTaskAssemblyInfo.g.cs(8,12,8,23): warning CS0436: The type 'ReleaseDateAttribute' in 'C:\Users\Oren\Source\Git\MetroLog\MetroLog.WP8\obj\Release\GitVersionTaskAssemblyInfo.g.cs' conflicts with the imported type 'ReleaseDateAttribute' in 'MetroLog, Version=0.8.8.0, Culture=neutral, PublicKeyToken=ba4ace74c3b410f3'. Using the type defined in 'C:\Users\Oren\Source\Git\MetroLog\MetroLog.WP8\obj\Release\GitVersionTaskAssemblyInfo.g.cs'.

Problem is that the ReleaseDateAttribute and GitVersionInformation classes are created in the root namespace, so they'll conflict with friend access.

Proposal:
Put the attribute in a namespace underneath the assembly name.

I.e., for an assemlby Foobar.Frob:

namespace Foobar.Frob {
...
}

@clairernovotny clairernovotny changed the title ReleaseDate attribute is . Creates conflicts Generated classes create conflicts with InternalsVisisbleTo May 28, 2015
@clairernovotny clairernovotny changed the title Generated classes create conflicts with InternalsVisisbleTo Generated classes create conflicts with InternalsVisibleTo May 28, 2015
@JakeGinnivan
Copy link
Contributor

@SimonCropp, thoughts?

@SimonCropp
Copy link
Contributor

Dont object. But how bigger "breaking" change is this?

@clairernovotny
Copy link
Author

As these classes are generated at compile-time and included, how many people have references to those types?

I'd think it'd be more of a breaking change if it was generated on included somehow in VS so developers could use those types in their code directly?

@SimonCropp
Copy link
Contributor

well either way we r in v3beta so i say lets do it. @onovotny want to do a PR?

@clairernovotny
Copy link
Author

Wish I could, I just don't have the bandwidth right now :/

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

No branches or pull requests

3 participants