-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
ImplicitNamespaceImports generated codefile generates an invalid import if you try to import as an alias. #19446
Comments
Bug seems to be here: Lines 43 to 47 in 8594395
|
The only way I can think of to this this problem is to actually move this into either an inline C# code task in the SDK (you guys probably have a policy against that) or move it to one of the Build Task projects that builds an dll so it can properly be fixed and have it assign to |
Fixes dotnet#19446. Signed-off-by: AraHaan <[email protected]>
Fixes dotnet#19446. Signed-off-by: AraHaan <[email protected]>
Fixes dotnet#19446. Signed-off-by: AraHaan <[email protected]>
Welp I tried on the PR and it seems no mater what I do something in the tests decides to fail currently. |
So basically I should be doing |
For C# projects yes, use |
But when will the daily builds ship with #19599 after it gets merged? On my Repositories and locally I use the daily builds from the .NET install scripts. |
@JunTaoLuo could you look into this? |
@wli3 @JunTaoLuo doesn't wort at Microsoft anymore. @AraHaan the change to support |
Let's say for example I try to import these:
The resulting generated
<project name>.ImplicitNamespaceImports.cs
file will contain:Which results in:
<project name>/obj/Debug/net6.0/<project name>.ImplicitNamespaceImports.cs(18,40): error CS1525: Invalid expression term '='
I feel like whereever in the .NET SDK that generates that file that it should actully explicitly look for things like
=
,static
, etc before it tries to insertglobal::
then insert it after it findsstatic
and/or=
so that way the compilation would work.My .NET SDK version currently is:
6.0.100-rc.1.21366.58
.The text was updated successfully, but these errors were encountered: