Use RTM version of framework ref assemblies#51819
Merged
1 commit merged intodotnet:mainfrom Mar 12, 2021
Merged
Conversation
This changes our code to use the RTM version of the framework reference assemblies rather than preview. The RTM version though forces a reference to Microsoft.VisualBasic.dll when building VB projects. That caused a compilation error in part of our code because of the following pattern ```vb For Each str in strings ``` In VB the identifier in the `For Each` is not necessarily a new declaration but can also refer to existing identifiers. Hence this name must go through standard name lookup. Once the reference to Microsoft.VisualBasic.dll is added the `Microsoft.VisualBasic.Conversions` module becomes available and the method `Str` in that module is now a valid top level name. This causes the above code to stop compiling. Fix is to use a non-conflicting identifier. closes #517711
Member
Author
|
@dotnet/roslyn-compiler @RikkiGibson @jmarolf for review. |
cston
approved these changes
Mar 11, 2021
sharwell
approved these changes
Mar 11, 2021
RikkiGibson
approved these changes
Mar 11, 2021
jasonmalinowski
approved these changes
Mar 12, 2021
Member
|
I neglected to ask when I first reviewed: are we fine with the implications of this new reference? Could this cause a reference to Microsoft.VisualBasic.dll to come along with Microsoft.CodeAnalysis.VisualBasic.dll when it previously did not? |
Member
Author
|
Yeah the extra ref is only occurring in a few places and it's fine there. |
This pull request was closed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This changes our code to use the RTM version of the framework reference
assemblies rather than preview.
The RTM version though forces a reference to Microsoft.VisualBasic.dll
when building VB projects. That caused a compilation error in part of
our code because of the following pattern
In VB the identifier in the
For Eachis not necessarily a newdeclaration but can also refer to existing identifiers. Hence this name
must go through standard name lookup.
Once the reference to Microsoft.VisualBasic.dll is added the
Microsoft.VisualBasic.Conversionsmodule becomes available and themethod
Strin that module is now a valid top level name. This causesthe above code to stop compiling. Fix is to use a non-conflicting
identifier.
closes #51711