This project is read-only.

Discussions under APIs

Please see the language topics for design notes and discussion on potential new features, the APIs topic for questions and discussion on all API layers, and the General topic for all else.  As the need arises over time, coordinators can create new topics.

See the Questions, Comments, and Feedback page to see where the team discusses features, how to file bugs, etc.

Invoke SyntaxRewriter on each Build

first post: xdurovsk wrote: Hello guys, I create my cusotm syntax rewriter, which inheris fro...

latest post: PauloMorgado wrote: Discussions have moved to https://github.com/dotnet/roslyn/issues/ ...

Collectible dynamic (assembly) modules

first post: worki wrote: Hi all, Our company has a .NET software program that is running du...

latest post: PauloMorgado wrote: There isn't necessarily a post about this on the GitHub issues, but...

answered by: Zarat wrote: Yes they removed that intentionally, including the whole scripting ...

Getting comments

first post: shaishavap26 wrote: Hi, I am very new in Roslyn, I want to get the comment informatio...

latest post: PauloMorgado wrote: These discussions have moved to http://stackoverflow.com/

Why are all the classes sealed?

first post: DarkBond1 wrote: I'm converting a large project from CodeDom to Roslyn. The project...

latest post: PauloMorgado wrote: This kind of discussions have moved to http://stackoverflow.com/

Cannot test Roslyn

first post: emilm wrote: Hello I want to test Roslyn (especially the CSharp scripting compo...

latest post: PauloMorgado wrote: Discussions have moved to https://github.com/dotnet/roslyn/issues/ ...

Using Roslyn to discover types in referenced assemblies and generate a runtime list of those types

first post: AntarisZX wrote: One thing many frameworks do at the moment is assembly scanning, wh...

latest post: PauloMorgado wrote: This kind of discussions has moved to http://stackoverflow.com/ques...

Roslyn's performance

first post: xeno_by wrote: Hi everyone! From discussions here, it can be clearly seen that ...

latest post: robinsedlaczek wrote: Hi together! I wrote down all the knowledge I've collected regardi...

answered by: VSadov wrote: == Weak red subtrees. An interesting thing to note about red nodes...

Cloning objects

first post: juanpablogc wrote: I understand the implementation of ICloneable and the base of Membe...

latest post: PauloMorgado wrote: Discussions have moved to https://github.com/dotnet/roslyn/issues/

Declarative Roslyn and Metaprogramming

first post: emiliosantos wrote: Hey guys, I thought I'd share my work on metaprogramming using Ro...

latest post: emiliosantos wrote: **Knat wrote:** > I think you may do a real-world metaprogramming e...

How to run DiagnosticAnalyzers?

first post: Omnibrain wrote: Given a list of diagnostic analyzers how do I run them on given a s...

latest post: nmgafter wrote: The Roslyn team no longer uses this site. Your comments are most we...

How to compile a script of code at runtime and call it immediately?

first post: afaznet wrote: Hello team, First of all I have to say that you have done amazing a...

latest post: shaggygi97 wrote: The updated scripting APIs are now back in the github repo. I woul...

answered by: svick wrote: From [the FAQ](https://roslyn.codeplex.com/wikipage?title=FAQ&refer...

Number of API method requests

first post: atodorow wrote: Greetings. In this thread I would like to request several method ...

latest post: atodorow wrote: I was not sure if this was the right place to post. Thank you! I wi...

SemanticModel Problems -- Syntax node is not within syntax tree

first post: bburg89 wrote: I have a problem with SemanticModel while trying to use their GetSy...

latest post: jmarolf wrote: ParseFile is there for when you don't need anything other than synt...

Does Roslyn have a hard dependency on Visual Studio?

first post: albahari wrote: Instantiating a CustomWorkspace throws a ReflectionTypeLoadExceptio...

latest post: Pilchie wrote: We haven't made any progress here. We're focused mostly on doing w...

answered by: Pilchie wrote: The workspaces layer has a dependency on the build tools because it...

generate reference to symbol

first post: tsadigov wrote: I am working on a refactoring. It generates a new class and I want ...

String Interpolation: Will interpolation with pluralization be handled?

first post: jgill wrote: It was pointed out to me that C# 6.0 is headed towards using an int...

latest post: Halo_Four wrote: **lwischik wrote:** > I think that the resource editor (.resx files...

Single vsix for both VB and C# Diagnostic Analysis

first post: jerriclynsjohn wrote: I wanted to know if it is possible to have both C# and VB rules be ...

latest post: sazim wrote: My reuirement is there will be several Refactoring DLLs (created w...

answered by: srivatsn wrote: > Does this mean that the compiler is loaded into the memory only o...

Diagnostic hard to extend

first post: Omnibrain wrote: Hi Diagnostic.CustomTags is internal now it's very difficult for ...

Formatting issues

first post: matkoch wrote: Recently, I asked how I can format and beautify my generated syntax...

Detect updates in workspace

first post: matkoch wrote: In relation to this stackoverflow post, I would like to ask if it's...

MetadataFileReference and Assembly not found in VS2015

first post: bburg89 wrote: I was trying to migrate several of my projects from VS2013 to VS201...

latest post: jmarolf wrote: I assume you are running is inside of a portable class library? In...

answered by: jmarolf wrote: we added factories to MetadataReference instead of having you creat...

How to get 'ProjectGuid' from Rosylyn API

first post: MichalMoc wrote: Hi! I am using MSBuildWorkspace to open a solution and it's project...

latest post: mattwar wrote: The project Guid is not exposed through any API. It does exist in ...

answered by: mattwar wrote: The project Guid is not exposed through any API. It does exist in ...

MSBuildWorkSpace cannot open solution files

first post: bburg89 wrote: I am new to Workspace API in Roslyn and come up with a simple proje...

Simplify document (qualified names)

first post: matkoch wrote: We're trying to achieve a simplification of our generated syntax tr...

latest post: matkoch wrote: For completeness; without warranty :) ``` public class TypeDescr...

Diagnostics do not get updated

first post: nvalchev wrote: Hello, I am writing an analyzer which report diagnostics for unused...

latest post: tmeschter wrote: Without knowing more about how your analyzer is structured it is ha...

Code Generation Roslyn

first post: yinon92 wrote: Hi, I saw that the way to do Code Generation is to use ICodeGenera...

latest post: jmarolf wrote: We haven't released a new nuget package yet, but you can look at t...

Am I able to refresh diagnostics on settings change in Roslyn

first post: nvalchev wrote: Let's say that I've created a diagnostic analyzer that shows warnin...

latest post: srivatsn wrote: Not the Initialize method but the actions that you register (for eg...

Syntax Visualizer Extension Source Code.

first post: gooluck777 wrote: where to find syntax visualizer full source code for visual studio ...

latest post: akarpus wrote: Just use IlSpy and look at the source. * http://ilspy.net/ * Insta...

OverriddenOrHiddenMembers is internal

first post: macpak wrote: I am working on some diagnostics and I need to check if the current...

ReportDiagnostic and ContainsDiagnostics

first post: akarpus wrote: I'm using the latest Roslyn and VS15 preview bits. I have written...

latest post: jmarolf wrote: [ContainsDiagnostics](http://source.roslyn.codeplex.com/#Microsoft....

Using modified Roslyn bits against Visual Studio Previews

first post: MattGertz wrote: I'm creating this thread to create a more discoverable discussion a...

latest post: KevinRansom wrote: That's great news, if you wouldn't mind can you add an issue to the...

Find specific invocation

first post: DanDanR wrote: Hey boys and girls! I've got a specific method invocation similar ...

latest post: jmarolf wrote: What you want to do is get the method symbol for the method in ques...

Language Design Notes Archive

first post: AdamSpeight2008 wrote: On a recent video (that I can't find), it was mentioned that the la...

latest post: nmgafter wrote: We've discussed it and in principle we'd like to do it. The only ob...

Tutorial on how to create a new language service based on Roslyn services

first post: BlueCode wrote: C#, VB and TypeScript is now based on Roslyn and uses the new edito...

latest post: dsaf wrote: **BlueCode wrote:** > C#, VB and TypeScript is now based on Roslyn ...

Performance Improvement?

first post: MichaelDBang wrote: Hello Community, I am experimenting with Fody, Cecil, and Roslyn....

latest post: Knat wrote: The latest Roslyn nuget package is http://www.nuget.org/packages/Mi...

How to get all 'ISymbol's from partial class

first post: MichalMoc wrote: Hi, i want to get all methods from a class but i stumbled on partia...

latest post: mattwar wrote: The type symbol should have all member symbols, even for a partial...

Make IFormattingRule/BaseFormattingRule public

first post: gouky wrote: I want to create a new formatting rule that will put all my automat...

latest post: Zarat wrote: What is the status of this? We have demand to enforce formatting s...

Getting the ProjectId from a Compilation and DocumentId from a SyntaxTree

first post: gfraiteur wrote: Hello, I would need to relate an analysis (from inside an Analyze...

latest post: Zarat wrote: Why does the command line build not have a solution/project/documen...

Find method refs - up to date example

first post: RuffCoder wrote: Hello I installed the VS2015 preview and SDK today. My intention ...

latest post: RuffCoder wrote: I have found the samples - they are at Roslyn/Src/Samples/Samples.s...

Template Functions & Template Masks

first post: AdamSpeight2008 wrote: Template Functions Template Functions will allow you return the exp...

latest post: AdamSpeight2008 wrote: Found a way to do Template Functions (kind of) in C#6 via String In...

'Microsoft.CodeAnalysis.MetadataFileReference' is inaccessible due to its protection level

first post: danieladacruz wrote: Hi I am trying to get a semantic model for a syntax tree as sugge...

latest post: KathleenDollard wrote: Daniel, I just wanted to thank you. I encountered this and it sol...

answered by: danieladacruz wrote: I found the answer by myself: references: new[] { MetadataReferenc...

Stop using InternalsVisibleTo to from the core compiler to C# and VB compiler

first post: Alxandr wrote: Currently, the Core compiler has a lot of internal types that are u...

latest post: Alxandr wrote: No, but you can hide them from intellisense. Types can be "hidden" ...

How to get TextSpan for given LinePositionSpan?

first post: Przemyslaw wrote: SyntaxTree has GetLineSpan method for opposite conversion. But I ca...

latest post: Przemyslaw wrote: Found it: syntaxTree.GetText().Lines.GetTextSpan(...)

Behaviour of CanBeReferencedByName

first post: Suchiman wrote: Hello, i'm working on a Diagnostic that may suggest to replace va...

latest post: Suchiman wrote: *push* still wondering :-)

Conversions before and after user-defined conversions

first post: erikkallen wrote: The Conversion class has two members UserDefinedFromConversion and ...

latest post: erikkallen wrote: (but if feature requests do not belong in Discussions -> API, I thi...

Unable to install Microsoft.CodeAnalysis.EditorFeatures.Text from nuget

first post: MattWarren wrote: If I try to install it, I get the following error: PM> Install-Pack...

latest post: MattWarren wrote: @OmerRaviv2 thanks for doing that

Signing not supported?

first post: erikkallen wrote: Trying to generate a signed assembly results in the error message "...

latest post: erikkallen wrote: The problem was I hadn't set the StrongNameProvider in the CSharpCo...

How to find out the conversion associated with a CastExpressionSyntax?

first post: erikkallen wrote: Currently I'm using var conversion = _semanticModel.ClassifyConvers...

latest post: mdour wrote: @erikkallen, I submitted an issue about this: https://roslyn.codepl...

How to get the argument to parameter map?

first post: erikkallen wrote: Given an invocation like F(arg2: 1, arg1: 2) how can I determine (s...

latest post: erikkallen wrote: https://roslyn.codeplex.com/workitem/393

What efforts are being made collaboratively between the Roslyn team and the F# team to bring a consistent development experience for all 3 primary .Net languages?

first post: HighCore wrote: I'm sorry if this has been asked before. I tried searching here in ...

latest post: KevinRansom wrote: The Roslyn language designers have a lot of work to do before they ...

Lifted operators

first post: erikkallen wrote: How can I determine if an IMethodSymbol represents a lifted operator?

latest post: jmarolf wrote: **JesperTreetop wrote:** > **jmarolf wrote:** > > We have an [inter...

Expose MethodSymbol.CallsAreOmitted

first post: mdour wrote: I see that MethodSymbol has a CallsAreOmitted(SyntaxTree) method wh...

latest post: mdour wrote: Thank you @erikkallen for submitting this issue

How to determine if a call is non-virtual?

first post: erikkallen wrote: How can I determine (in the semantic model) that in the case clas...

latest post: erikkallen wrote: Bump

GetSymbolInfo bug

first post: erikkallen wrote: The following program will run to the line that writes FAILURE, mea...

latest post: erikkallen wrote: Did you manage to reproduce it with the official package?

Probable bug in SemanticModel.GetCollectionInitializerSymbolInfo()

first post: erikkallen wrote: I expect this program to output True, but it does not class Program...

latest post: erikkallen wrote: https://roslyn.codeplex.com/workitem/390

Missing reference to System.Composition.CompositionContext

first post: jbe7339 wrote: After updating the NGet package from 0.7 to 1.0 Beta I get the foll...

latest post: jbe2277 wrote: Thank for your feedback. I will give it a try.

ISyntaxNodeAnalyzer<T> missing v.1.0.0-beta1-20141031-01

first post: eriklieben wrote: I am trying to upgrade my code from v0.7.4 to v1.0.0-beta, but the ...

latest post: eriklieben wrote: I am using VS2015. Rewriting to DiagnosticAnalyzer, looks much bet...

Roslyn access to CodeLens data?

first post: RonSijm wrote: Hey, I was wondering, how difficult would it be to expose the Cod...

latest post: MattGertz wrote: (Should have added that, for a "fix" that does nothing, it's OK to ...

Indirect function call.

first post: Newbiek wrote: Hi Everybody, In IL its possible to call a function indirect with ...

latest post: afsherman wrote: I think what you need something like Visual Studio on UserVoice, bu...

ROSLYN BROKEN SINCE 3 MONTHS NOW

first post: Scynapse wrote: (CC of a public letter sent to Theo Yaung, also sent to people ment...

latest post: MattGertz wrote: Done -- new discussion is at https://roslyn.codeplex.com/discussion...

Example of extending C# with custom syntax powered by Visual Studio editor support?

first post: dsaf wrote: Hi, Is there a Roslyn sample that would demonstrate the following:...

latest post: JesperTreetop wrote: It seems to me that the next version of Visual Studio [is about to ...

Question regarding SemanticModel.LookupSymbols and curly braces

first post: galenus wrote: Hello, I'm trying to use the API in question in order to retrieve...

latest post: nmgafter wrote: This was a design decision. I think the scope you get pointing to t...

How would I make more of this analysis Roslyn and less text parsing?

first post: ImaginaryDev wrote: F# version C# version it does what I want but seems more of it sh...

latest post: jmarolf wrote: Which version of visual studio do you have installed? To use the s...

Roslyn Diagnostic with Code Fix: Analyzing Web.config file

first post: mhidalgo wrote: Hi guys, I've been playing with Roslyn Diagnostic with Code Fix f...

latest post: JesperTreetop wrote: Roslyn diagnostics are being loaded by the C# and VB compilers and ...

variable declared in foreach loop

first post: Przemyslaw wrote: Hi, I wonder why ForeachStatementSyntax contains IdentifierToken ...

Can roslyn be used to compile code in Windows 8 Apps ?

first post: roshan605 wrote: Hi, I want to know whether I can use Roslyn to compile windows 8 ...

latest post: jmarolf wrote: We don't have an API that exactly duplicates intellisense, but we d...

answered by: jmarolf wrote: Its certainly possible :) We have several apis you could use. Here...

does roslyn support incremental compilation?

first post: haliving wrote: hello, i'm trying to determine if roslyn can do incremental compi...

latest post: nmgafter wrote: haliving wrote: But surely I can emit only a method? For my resear...

MetadataStreamReference?

first post: erikkallen wrote: It would be nice to have a MetadataStreamReference class in additio...

latest post: erikkallen wrote: Thank you very much for your reply, and this seems very much like a...

answered by: Zarat wrote: That already exists, it's just called "MetadataImageReference" inst...

Race conditions with async Roslyn API

first post: Zarat wrote: Hi, I've got a question regarding the async APIs in Roslyn: is it a...

latest post: Zarat wrote: The question has been answered on the linked issue, seems to have b...

Completion API is coupled to workspaces

first post: galenus wrote: Currently the API requires using Workspace API, which means I have ...

latest post: galenus wrote: Thanks for suggestion, I will try it.

Compilation succeeded even though there were some errors from Diagnostic Analyzer

first post: jerriclynsjohn wrote: Why is that I'm able to compile a code which is showing an error in...

latest post: jerriclynsjohn wrote: Yes it is my own diagnostic analyzer with the following DiagnosticD...

Roslyn.Services.Editor API's

first post: chekm8 wrote: I have an existing application that uses the 2012 version of the Ro...

latest post: jmarolf wrote: You can take a look at Src\Samples\Sample.sln for a list of all the...

Generates Pdb files for assemblies compiled with Roslyn

first post: s1m0 wrote: I am trying to compile a series of projects into DLLs, and it works...

latest post: s1m0 wrote: Hi Jesper, I just tried your suggestion and it works! Thank you v...

answered by: JesperTreetop wrote: The `Emit` method has two optional parameters; `pdbStream` and `pdb...

MethodImplAttributes through Symbols

first post: dkinitiate wrote: The ImplementationAttributes that implementations of IMethodSymbol,...

latest post: erikkallen wrote: Currently, private reflection is the shit with Roslyn. It feels lik...

Are there any plans to create API specifically for code generation?

first post: AlexeiShcherbakov wrote: Are there any plans to create API specifically for code generation?...

latest post: ADGreen wrote: Hey all, In answer to your question. Yes, there are plans and we'r...

Context/RelatedDocuments API

first post: Zarat wrote: Hi, what is the point of "context" documents and the RelatedDocumen...

Sample anaylzer code for Dev14/CTP3

first post: lwischik wrote: I wrote an sample analyzer for Dev14/CTP3/Roslyn. Thought it would ...

latest post: Expandable wrote: **lwischik wrote:** > Expeandable, I agree it should be more robust...

Best practices for choosing diagnostic IDs?

first post: csdahlberg wrote: Is there any guidance around choosing IDs for Roslyn-based diagnost...

latest post: mattwar wrote: The FxCop pattern is not required, but likely still popular because...

SemanticModel.GetSymbolInfo() on VB syntax node AddAssignmentStatement returns always null

first post: PierreP wrote: I expected to get the ISymbol of an operator. Let's take an examp...

latest post: PierreP wrote: Sure! Here it is: https://roslyn.codeplex.com/workitem/276

state of code issues and actions?

first post: ImaginaryDev wrote: Is roslyn to a state where I can install it in the regular vs2013 h...

latest post: AlexTurnMSFT wrote: The VS 2013 End User Preview and SDK Preview of Roslyn were snapsho...

answered by: AlexTurnMSFT wrote: The VS 2013 End User Preview and SDK Preview of Roslyn were snapsho...

Refreshing Analyzers

first post: Maurici018 wrote: I have a project "A" that references the output of an "Analyzer" li...

latest post: Maurici018 wrote: I managed to find a workaround to the aforementioned issue, it is n...

Containing type for synthesized dynamic operators

first post: erikkallen wrote: In dynamic a = null, b = null; dynamic c = a + b; The BinaryExpre...

Base interfaces for symbols

first post: erikkallen wrote: I think it would be very helpful if there were a base interface IMe...

How to distinguish between indexing an array and a dynamic object

first post: erikkallen wrote: An indexing, such as obj[a, b] is represented by an ElementAccessEx...

NormalizeWhitespace() produces unhandy whitespaces for blocks in some contexts

first post: MaxNo wrote: Hello! Simple test case SyntaxFactory.ParseStatement("{{}f();}"...

Can I use Roslyn as a static aspect weaver?

first post: obiwanjacobi wrote: I would like to generate extra code in the resulting assembly (NOT ...

latest post: rameshn wrote: Is there any update on this subject? Thanks, Ramesh

SwitchLabelSyntax

first post: Omnibrain wrote: Is the switch label syntax missing the expression or am I overlooki...

latest post: Omnibrain wrote: Yes that helps - thanks.

Roslyn Script Hosting Idea and Wish List

first post: sheehou wrote: I like Roslyn Script Engine. I am using Microsoft Roslyn CTP - Sept...

latest post: zeldafreak wrote: Just wanted to +1 this. ASP.NET vNext is already going this route w...

Interface Member Accessibility Public?

first post: KathleenDollard wrote: As a first step, I just want to confirm whether what I am seeing is...

latest post: Expandable wrote: Is ``newItem`` the symbol for ``Foo``? As members of interfaces are...

Make reflection easier

first post: dotnetchris wrote: The reflection API/DSL is borderline incoherent. Assuming you can...

latest post: TomasMatousek wrote: There are no official samples yet. There will be by the time we shi...

Backward Compatibility of .NET Compiler Platform Preview for Visual Studio 2014

first post: jerriclynsjohn wrote: I'm using .NET Compiler Platform (Roslyn) Preview for Visual Studio...

latest post: jerriclynsjohn wrote: I'm not clear on this topic. Is it safe to say that the compilers a...

answered by: jmarolf wrote: As Pilchie said, we are currently focused on VS 2014 and have no p...

Can multiple .vsix with VB/C# Diagnostic Analyzer/CodeFix/AutoUpdate cause performance issue?

first post: jerriclynsjohn wrote: I'm implementing a system that will implement code quality as part ...

Roslyn as a portable class library

first post: JesperTreetop wrote: The compiler executables can't be portable, but is the goal that th...

latest post: mattwar wrote: Yes, that's where it's headed.

answered by: mattwar wrote: Yes, that's where it's headed.

Creating an Event - accessors required?

first post: mar3ek wrote: Hi all. I've been trying to insert an event into a class by suing a...

latest post: mar3ek wrote: Oh, I totally missed that, thank you! Regarding the verbosity... ye...

answered by: svick wrote: It looks like you want `EventFieldDeclarationSyntax`, not `EventDec...

Adding a BaseList and Formatter

first post: mar3ek wrote: Hello. First, thanks for all the amazing work that's going into Ros...

Can we get an overload of TryGetValue() without the side effect?

first post: richardtallent wrote: If I understand correctly, C# 6's "declaration expressions" would a...

Visual feedback for DiagnosticSeverity.Info

first post: vbfox wrote: Hi, there is actually no differences between DiagnosticSeverity.In...

Port Code-Diagnostic-With-Fix Project to Console-Application Project

first post: lindelof wrote: Hi Roslyn developers, Is there a good way to reuse code-diagnosti...

Possible issue with ParseLeadingTrivia

first post: KathleenDollard wrote: CTP 0.7.4052301 running in VS 2013 I have this code var...

latest post: KathleenDollard wrote: That's fine.

Can only build C# 5.0

first post: sruppr wrote: Whenever I try to emit a project I load in any way, I get diagnosti...

latest post: VSadov wrote: This is ByDesign. Features that may undergo design changes, possi...

answered by: VSadov wrote: This is ByDesign. Features that may undergo design changes, possi...