-
-
Notifications
You must be signed in to change notification settings - Fork 985
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
Support extern alias
in generated code.
#2289
Comments
For this to be done automatically, this is blocked by #1403 (unless we want to pass We could possibly expose an API to support this case manually, but I'd prefer not to. |
@teo-tsirpanis How did you get it to work outside of BDN? When I try, I hit this long-standing issue. dotnet/msbuild#4943 I'm not sure if we can support this in BDN if msbuild doesn't even properly support it. |
In my case the two assemblies have different names (one is called |
Any update or workaround for this? |
You can avoid exposing the |
I was benchmarking the old and new version of my library and the benchmark methods were returning objects of a type with the same name from the old or new assembly. I can't vary the NuGet package versions because the new version is not yet released and the API is different.
In my benchmark code I used
extern alias
to point to the old library but this did not carry over to the code BenchmarkDotNet generated, causingerror CS0433: The type 'Grammar' exists in both 'Farkle, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' and 'FarkleNeo, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'
.I found a workaround by returning
object
so I guess it's a pretty niche scenario.The text was updated successfully, but these errors were encountered: