This project is read-only.

Issue in using directive codes

0 down vote favorite Im trying to extract the part of code from my CS file using Roslyn and Im suffering the below problem. My C# file code: class ConditionalCompilationCode { if Condition2 ...

Id #502 | Release: None | Updated: Nov 15, 2016 at 11:58 PM by PauloMorgado | Created: Nov 9, 2016 at 10:51 AM by sarathkumarv

Issue calling overloaded generic function

I'm using Visual Studio 2015 version 14.0.24720.00 Update 1 with .NET Framework 4.6.0.1055 I have a static class with one overloaded generic method: public static class ChangeRecordHelper { publi...

Id #501 | Release: None | Updated: Feb 4, 2016 at 11:00 AM by PauloMorgado | Created: Feb 1, 2016 at 10:09 AM by kszlachetka

Get Error When Update Nuget Package Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.1

I'm Update Nuget Package Microsoft.CodeDom.Providers.DotNetCompilerPlatform from 1.0.0 to 1.0.1 and Delete Old folder in packages (Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0). When...

Id #500 | Release: None | Updated: Jan 13, 2016 at 12:24 AM by PauloMorgado | Created: Jan 12, 2016 at 9:56 AM by boontham_hom

roslyn error-code -2146232797 / maybe something with changed "Overload resolution"

Following C# Code can't be compiled with roslyn - why? With previews compiler versions, this works fine. console-program: class Program { static void Main(string[] args) { Number n = 5.0m; ...

Id #499 | Release: None | Updated: Oct 29, 2015 at 7:32 AM by PauloMorgado | Created: Oct 22, 2015 at 11:11 AM by ptr8

ConvertToAutoPropertyCS sample project won't do anything

After building and starting that project, it won't show anything under quick actions for properties. I could not hit any breakpoint in source code too.

Id #498 | Release: None | Updated: Oct 5, 2015 at 6:22 PM by PauloMorgado | Created: Oct 5, 2015 at 5:31 PM by dmihailescu

Wrong ConvertedType at "params" parameter

Consider the following methods: public static string Format(string format, object arg0); public static string Format(IFormatProvider provider, string format, params object[] args); on invocati...

Id #497 | Release: None | Updated: Sep 11, 2015 at 10:57 AM by PauloMorgado | Created: Sep 11, 2015 at 9:29 AM by domoszlai

Update home page for VS2015 RTM

Install the SDK Templates VSIX package to get the Visual Studio project templates. Link "http://visualstudiogallery.msdn.microsoft.com/849f3ab1-05cf-4682-b4af-ef995e2aa1a5" doesn't work anymore.

Id #496 | Release: None | Updated: Aug 2, 2015 at 8:13 PM by existen | Created: Aug 2, 2015 at 8:13 PM by existen

Fix VS2013 + Roslyn and/or Resharper compatibility

By this stage, this may be a known issue and/or duplicate, but it's hard to say with as fast as the sands are shifting these days. I installed the preview and templates for Visual Studio 2013 Pro...

Id #495 | Release: None | Updated: Jun 17, 2015 at 7:32 AM by PauloMorgado | Created: Jun 15, 2015 at 4:55 PM by mwpowellhtx

How to add new Project to Existing Solution in version 0.6.0.0

Hi, I want to add the new Project to Existing Solution but it did not work I am using the 0.6.0.0 version of Roslyn CTP I am using Following Code MSBuildWorkspace workspace = MSBuildWorkspa...

Id #494 | Release: None | Updated: Mar 18, 2015 at 4:54 PM by PauloMorgado | Created: Mar 18, 2015 at 11:01 AM by rajeshrai

MSBuildWorkspace fails to open solution if a C# project is missing a compilation target

I am trying to use Roslyn to compile a VS2013 solution for code analysis purposes. The solution has many projects, one of which has no .CS files (we just use it to store JS and CSS files. It has a ...

Id #493 | Release: None | Updated: Mar 6, 2015 at 8:12 PM by chasemedallion | Created: Mar 6, 2015 at 8:12 PM by chasemedallion

Conditional Compilation in XML Comments

Please support conditional compilation within XML documentation comments. This has been a source of pain since portable libraries came on the scene a while ago. Often linked code files are used to ...

Id #492 | Release: None | Updated: Jan 27, 2015 at 9:01 PM by davedev | Created: Jan 27, 2015 at 3:44 PM by davedev

Custom name for anonymous methods and lambda expressions to have more readable stack traces.

As you may already know, we can assign a name to a function in javascript, see a following sample: jQuery.ajax("some url : jQuery.ajax will get something from a specified web resource").then(functi...

Id #491 | Release: None | Updated: Jan 19, 2015 at 6:52 PM by VSadov | Created: Jan 17, 2015 at 5:18 AM by real_persian

GetSymbolInfo returns a weird result in a specific case.

Given this code: using System.Linq; using System.Reflection; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; namespace RoslynOddity {...

Id #489 | Release: None | Updated: Feb 25, 2015 at 1:32 PM by OmerRaviv2 | Created: Jan 13, 2015 at 2:46 PM by dkinitiate

Script Document IntelliSense race condition

Source: (in a Script document): if (someSequence.Count() > 2) IEnumerable<int> RandomStream(int max) { yield return int. Pressing Ctrl+Space, Space, or Enter will try to consume a cancelled Model...

Id #488 | Release: None | Updated: Nov 27 at 6:17 PM by chandera | Created: Jan 11, 2015 at 6:36 PM by SSL

Formatter ignores NewLine options

Run the code below and notice that neither \r\n is removed, nor that \n is being used. using System; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis....

Id #484 | Release: None | Updated: Jan 8, 2015 at 6:25 PM by jrieken | Created: Jan 8, 2015 at 6:24 PM by jrieken

Rename tries to rename explicit metadata interface implementations

Source: class X : IComparer { int IComparer.Compare(object x, object y) => 0; } class Y : X, IComparer { public int Compare(object x, object y) => ((IComparer)this).Compare(x, y); } Renaming Y....

Id #483 | Release: None | Updated: Jan 8, 2015 at 3:09 PM by SSL | Created: Jan 8, 2015 at 3:07 PM by SSL

Implement Interface through member adds extra casts

Source: sealed class X : IComparer{ X x; } Quick fix: public int Compare(object x, object y) { return ((IComparer)this.x).Compare(x, y); } Why do you add the cast, even when there is no exp...

Id #482 | Release: None | Updated: Jan 8, 2015 at 3:00 PM by SSL | Created: Jan 8, 2015 at 3:00 PM by SSL

Collection Initializers don't show Quick Fixes to import extension methods

Source: class X : IEnumerable { public IEnumerator GetEnumerator() { new X { 1 }; return null; } } namespace Ext { static class Extensions { public static void Add(this X x, int i) ...

Id #480 | Release: None | Updated: Jan 8, 2015 at 2:49 PM by SSL | Created: Jan 8, 2015 at 2:49 PM by SSL

Stopping from StackOverflow leaves other lines highlighted

Run https://gist.github.com/SLaks/9202893 as 32-bit. When it throws a stack overflow, hit stop. The line in Main() will still be highlighted, until you edit it.

Id #477 | Release: None | Updated: Jan 7, 2015 at 12:23 AM by SSL | Created: Jan 7, 2015 at 12:23 AM by SSL

Object ID expressions show preprocessor completions

Typing 1# in the watch, immediate, or breakpoint windows will show completions for preprocessor directives.

Id #475 | Release: None | Updated: Jan 6, 2015 at 7:31 PM by SSL | Created: Jan 6, 2015 at 7:31 PM by SSL

Works in Experimental Instance but not Normal Instance

've created a couple of code diagnostic analyser and a colourisation which are packaged into a single VSIX. This VSIX works perfectly in the Experimental instance of visual studio, the diagnostic a...

Id #474 | Release: None | Updated: Nov 27 at 6:17 PM by jmarolf | Created: Jan 6, 2015 at 6:46 PM by AdamSpeight2008

Exceptions thrown from an exception filter should be catchable or halt application execution

It appears that if an exception is thrown in the exception filter block, there is no way to catch that exception. Additionally, the application continues on as if that exception was never thrown. ...

Id #473 | Release: None | Updated: Jan 7, 2015 at 8:32 PM by VSadov | Created: Jan 4, 2015 at 5:27 PM by aholmes0

Support async in generic methods whose return value resolves to Task

The following method gives me CS1983: The return type of an async method must be void, Task or Task<T> private async T Run<T>(Func<T> func) where T : Task { return await func(); } It should just ...

Id #472 | Release: None | Updated: Jan 5, 2015 at 10:47 PM by nmgafter | Created: Jan 3, 2015 at 3:05 AM by yufeih

AbstractSimplificationService.ReduceAsync calls Task.WaitAll

Async methods should not unnecessarily block threads (UI thread or otherwise). This method delegates to a synchronous Reduce method which calls Task.WaitAll. It appears Task.WaitAll takes a Canc...

Id #471 | Release: None | Updated: Feb 13, 2015 at 5:16 AM by AArnott | Created: Dec 29, 2014 at 5:09 PM by AArnott

obj?.decimalField ?? 0 gives compiler error: ReadFile on pipe failed -or- error MSB6006

When building my Web Application in VS 2015 Preview, I get the error 1>------ Rebuild All started: Project: MyProject, Configuration: Debug Any CPU ------ 1>CSC : Internal Compiler Client error : ...

Id #470 | Release: None | Updated: Nov 27 at 6:17 PM by AlekseyTs | Created: Dec 28, 2014 at 11:00 PM by ManusHand

Consider exposing FindDerivedClassesAsync in DependentTypeFinder

DependentTypeFinder contains a useful method - FindDerivedClassesAsync http://source.roslyn.codeplex.com I'd like if this was made a part of the public API so that I didn't need to do this :) It ...

Id #468 | Release: None | Updated: Dec 24, 2014 at 3:08 PM by jasoni | Created: Dec 24, 2014 at 2:59 PM by jasoni

MEF composition in DiagnosticAnalyzer

While trying to implement a larger system composed of several refactorings and analyzers, I wanted to provide an easy way of sharing settings between the classes. I started implementing this by usi...

Id #467 | Release: None | Updated: Feb 15, 2015 at 9:48 AM by mareklinka | Created: Dec 22, 2014 at 6:05 PM by mareklinka

Parameterless Constructor in Struct not been called during instance creation

Create a new Console Application in VS 2015 Preview and write the following code: class Program { public static List<T> CreateList<T>(int count) where T : new() { List<T> list = new...

Id #465 | Release: None | Updated: Dec 26, 2014 at 6:58 PM by LiorBa | Created: Dec 18, 2014 at 5:48 AM by tenor

Strange C# Compiler Problem

First I'm not using rosyln to compile the so I don't know If the error happen also when I use it. So I could have found some strange think. I'm working on some code for a project that I'm doing bu...

Id #464 | Release: None | Updated: Jan 14, 2015 at 8:18 PM by pgavlin | Created: Dec 15, 2014 at 11:44 PM by albus95

Mismatch between ISymbol.GetDocumentationCommentId() and ids in documentation XML files.

In VS 2015 Preview, type: 'Console.WriteLine(' and scroll through the method overloads in the parameter info popup. You'll notice that the 19th overload doesn't have any documentation information....

Id #463 | Release: None | Updated: Dec 12, 2014 at 11:13 PM by tenor | Created: Dec 12, 2014 at 11:13 PM by tenor

The analyzer driver makes duplicate callbacks for FieldDeclarationSyntax nodes

An analyzer defined by public override void Initialize(AnalysisContext context) { context.RegisterSyntaxNodeAction(AnalyzeFieldDeclaration, SyntaxKind.FieldDeclaration); } private static void An...

Id #462 | Release: None | Updated: Dec 31, 2014 at 5:45 PM by manishv | Created: Dec 12, 2014 at 7:20 PM by dotHenrik

Roslyn.Diagnostics.Analyzers in OSS preview branch need to be fake signed

In the Roslyn OSS build some assemblies need to be fake signed: Roslyn.Diagnostics.Analyzers.dll Roslyn.Diagnostics.Analyzers.VisualBasic.dll Roslyn.Diagnostics.Analyzers.CSharp.dll

Id #456 | Release: None | Updated: Dec 9, 2014 at 9:29 PM by KevinRansom | Created: Dec 9, 2014 at 5:33 AM by KevinRansom

Ambiguous reference between Static<T1>.Blah and Static<T2>.Blah produces non-deterministic error message

Id #450 | Release: None | Updated: Dec 8, 2014 at 10:05 PM by KevinRansom | Created: Dec 8, 2014 at 10:03 PM by KevinRansom

Exception during dictionary initializer compilation

It is likely related to strange evaluation behavior of nested dictionary initializer: using System; using System.Collections.Generic; public class Foo { public List<int> this[string _] => null; ...

Id #449 | Release: None | Updated: Jan 6, 2015 at 9:07 PM by angocke | Created: Dec 7, 2014 at 10:24 PM by ControlFlow

The WithSemicolon-method of PropertyDeclarationSyntax should be named WithSemicolonToken

PropertyDeclarationSyntax has a WithSemicolon-method while a MethodDeclarationSyntax has a WithSemicolonToken-method. As these two methods are similar they should be named the same (WithSemicolonTo...

Id #448 | Release: None | Updated: Dec 6, 2014 at 5:02 PM by dotHenrik | Created: Dec 6, 2014 at 5:02 PM by dotHenrik

Alternatives to Dim for variables

Dim seems to be a holdover from ancient history, and new users of VB would naturally expect it to be related to the ReDim keyword, and to have something to do with Arrays. I think the Let keywor...

Id #447 | Release: None | Updated: Apr 22, 2015 at 6:38 PM by RobertEinhorn | Created: Dec 3, 2014 at 7:29 PM by justinmichel

StackOverflow exception when debugger attached

Here is a sample app that will crash with StackOverflow exception, but only if you run it from visual studio with debugger attached. We are using Visual Studio Pro 2013 Update 4.

Id #446 | Release: None | Updated: Dec 4, 2014 at 9:36 AM by kolesnick | Created: Dec 3, 2014 at 1:42 PM by SlyFox

Roslyn Diagnostic + Visual Studio Colorisation

Issue Does any know where I can location an "simple" example of colourisation of a token based on a Roslyn diagnostic. Yep I can make them Info, Warning, Error or Hidden. So let say want to use H...

Id #445 | Release: None | Updated: Dec 2, 2014 at 6:21 PM by AdamSpeight2008 | Created: Dec 2, 2014 at 6:21 PM by AdamSpeight2008

CS1566 error when trying to embed XML documentation files as resources

With the VS 2015 Preview I am getting the following error: CSC : error CS1566: Error reading resource 'Assembly.XML' -- 'The process cannot access the file 'C:\Source\Assembly\Assembly.XML' becau...

Id #444 | Release: None | Updated: Dec 1, 2014 at 9:35 PM by jdesetto | Created: Dec 1, 2014 at 9:35 PM by jdesetto

Incorrect simplification of Nullable{T} in XML comment

The following shows an incorrect Simplify name proposal for a reference to Nullable<T> within an XML documentation comment. This can be reproduced with the following code: /// <summary> /// The...

Id #443 | Release: None | Updated: Dec 1, 2014 at 6:55 PM by sharwell | Created: Dec 1, 2014 at 6:55 PM by sharwell

VB ^ operator optimization

In VB 2013 it looks like "a ^ 2" just gets turned into a call to Math.Pow(a, 2.0). It would be nice if VB could notice when an integer exponent is used, and then call a more optimized version of P...

Id #442 | Release: None | Updated: Dec 2, 2014 at 4:26 PM by PauloMorgado | Created: Dec 1, 2014 at 5:12 PM by justinmichel

Expose SymbolEquivalenceComparer publicly

When working with multiple compilations, SymbolEquivalenceComparer is painfully missing since it's internal. This seems to be the only way to compare for symbol equivalence across compilations, whi...

Id #440 | Release: None | Updated: Nov 27, 2014 at 1:11 AM by MrJul | Created: Nov 27, 2014 at 1:08 AM by MrJul

Adding reference of one project to another is not Working

Hi, I have used the following code to add the project reference but it didn't work MSBuildWorkspace workspace = MSBuildWorkspace.Create(); Microsoft.CodeAnalysis.Solution originalSolution ...

Id #439 | Release: None | Updated: Nov 27 at 6:17 PM by Pilchie | Created: Nov 26, 2014 at 5:48 AM by rajeshrai

Go To Definition fails on top-level code in Script documents

You can create a Script document to repro this by cloning & running https://github.com/SLaks/WebEssentials2015/tree/roslyn-markdown (no longer requires Dev12), creating a .md file, and entering ...

Id #438 | Release: None | Updated: Nov 27 at 6:17 PM by Pilchie | Created: Nov 26, 2014 at 4:26 AM by SSL

Signature Help in Razor isn't colorized

Signature help (from Ctrl+Shift+Space, not mouseover) in any projection buffer (eg, C# or VB code in a Razor file) is not colorized.

Id #437 | Release: None | Updated: Nov 27 at 6:17 PM by brettv | Created: Nov 26, 2014 at 4:10 AM by SSL

VB xml-doc-comment crashes when use reserved keyword for formal type parameter

Look at this code: ''' <summary> ''' <see cref="C(Of Integer).f()"/> ''' </summary> Class C(Of T) Sub f() End Sub End Class What I expect: an error report, because what goes into the cref should...

Id #436 | Release: None | Updated: Dec 24, 2014 at 12:18 AM by angocke | Created: Nov 25, 2014 at 12:43 AM by lwischik

VB XML-doc-comment parsing should terminate on quotes

See attached picture. ''' <summary> ''' <see cref="List(Of "/> ''' </summary> class C What I expect: the argument of cref should terminate at the closing quote and should be considered ill-formed...

Id #434 | Release: None | Updated: Nov 25, 2014 at 12:35 AM by lwischik | Created: Nov 25, 2014 at 12:35 AM by lwischik

VB Trivia Issue?

To be honest I don't know if this is an issue with how I use the API or an issue in the API. I use a LINQ expression to find the Single LIne If Statements and Multi-Line If Statements. .ToList on ...

Id #433 | Release: None | Updated: Nov 24, 2014 at 3:00 PM by AdamSpeight2008 | Created: Nov 24, 2014 at 3:00 PM by AdamSpeight2008

Peek doesn't translate line offsets for projection buffers

If I hit Alt+F12 on any local variable defined within a Razor CSHTML file, the peek window will take the line number within the internal C# buffer, and show that line number in the outer CSHTML, sh...

Id #431 | Release: None | Updated: Nov 27 at 6:17 PM by jasonmalinowski | Created: Nov 24, 2014 at 3:35 AM by SSL

Simplification fails on top-level statement in VB Script

Source (the entirety of a VB Script-type document): System.Int32.Parse("") Opening the simplification quick fix will throw a null reference in AbstractSimplificationService.Reduce. This does not...

Id #430 | Release: None | Updated: Nov 23, 2014 at 8:16 PM by SSL | Created: Nov 23, 2014 at 8:16 PM by SSL

Semantic model for VB Script document chokes on top-level method

In a VB Script-type editor, create a top-level function (not in any class). The language services will choke on http://source.roslyn.codeplex.com/#Microsoft.CodeAnalysis.VisualBasic/Compilation/S...

Id #429 | Release: None | Updated: Nov 23, 2014 at 8:23 PM by SSL | Created: Nov 23, 2014 at 8:05 PM by SSL

Simplify primitive type with namespace isn't included

Source: using System; ... Int32 a = 2; System.Int32 b = 3; Selecting Fix All Occurrences on either one of these will not affect the other one.

Id #426 | Release: None | Updated: Nov 27, 2014 at 10:42 PM by manishv | Created: Nov 23, 2014 at 2:14 PM by SSL

Repeated throws aren't marked as unreachable

Source: throw new MyException(); throw new MyException(); Console.ReadKey(); The third line will give a CS0162 Unreachable warning; the second line incorrectly won't.

Id #425 | Release: None | Updated: Nov 23, 2014 at 2:09 PM by SSL | Created: Nov 23, 2014 at 2:09 PM by SSL

IntelliSense thinks that C# script field initializer have no instance

Source (as Script, not Document): int a = 1; int b = a; IntelliSense will not offer a as a completion when initializing b, even though this compiles fine. (an easy way to test a Script editor i...

Id #424 | Release: None | Updated: Nov 23, 2014 at 3:47 AM by SSL | Created: Nov 23, 2014 at 3:46 AM by SSL

VB-Compiler shows incomprehensible error message

Hi all, take a look at the enclosed screenshot. The VB 2013 compiler at that point showed "Loop control variable cannot be a property or a late-bound indexed array" which was much easier to und...

Id #421 | Release: None | Updated: Nov 22, 2014 at 6:04 PM by loeffel | Created: Nov 22, 2014 at 10:38 AM by loeffel

VB: Intellisense shows wrong TypeList with Nullables and Elvis-Operator

Hi guys, please take a look at the attached screenshot. IntelliSense at this point should show the list of DateTimeOffset, not of Nullable. Thanks, Klaus

Id #420 | Release: None | Updated: Nov 27 at 6:17 PM by chandera | Created: Nov 22, 2014 at 10:31 AM by loeffel

Negative value can be assigned to ushort constant

Compile following code with B.dll reference using System; using TypeLib; public class Bar { public const ushort FIELD = Foo.CONSTANT; public static void Main () { Console.WriteLine (FIE...

Id #416 | Release: None | Updated: Jan 14, 2015 at 9:02 PM by AdamSpeight2008 | Created: Nov 21, 2014 at 2:12 PM by mareksafar

SyntaxVisualizer Properties Pane to Allow Property Drilldown

The syntax visualizer is becoming a very important part of understanding existing code in Roslyn - particularly in creating visualizers. As such, it could really use improvements For the propert...

Id #413 | Release: None | Updated: Nov 27 at 6:17 PM by shyamn | Created: Nov 20, 2014 at 3:08 PM by KathleenDollard

SyntaxVisualizer Properties Pane to Just Show "Common" Items

The syntax visualizer is becoming a very important part of understanding existing code in Roslyn - particularly in creating visualizers. As such, it could really use improvements ). For the pro...

Id #412 | Release: None | Updated: Nov 27 at 6:17 PM by shyamn | Created: Nov 20, 2014 at 3:06 PM by KathleenDollard

Please make XML Doc Comment classes public

This includes ReferencePathUtilities and either FileBasedXmlDocumentationProvider or IDocumentationProviderService. These are necessary when working with XML doc comments, especially for editor s...

Id #410 | Release: None | Updated: Nov 27 at 6:17 PM by Pilchie | Created: Nov 20, 2014 at 4:10 AM by SSL

Roslyn doesn't respect additional static implicit operators on decimal in Script#

This is a cross-post of this Connect issue: https://connect.microsoft.com/VisualStudio/feedback/details/1000442/roslyn-doesnt-respect-static-implicit-conversions-in-script Script# defines implici...

Id #409 | Release: None | Updated: Jan 14, 2015 at 8:14 PM by pgavlin | Created: Nov 20, 2014 at 2:44 AM by michaelaird

DocumentationProvider XML behavior is inconsistent

XmlDocumentationProvider returns plain text only, stripping out all tags and newlines. http://source.roslyn.codeplex.com/#Microsoft.CodeAnalysis.Workspaces/Utilities/Documentation/XmlDocumentationP...

Id #406 | Release: None | Updated: Nov 27 at 6:17 PM by jasonmalinowski | Created: Nov 19, 2014 at 9:14 PM by SSL

Syntax Visualizer - quick way to get the selected node Type copied to your clipboard

It would be nice if it is possible in the Roslyn Syntax Visualizer been able to copy from the properties type label, or just a quick way to get the selected node Type copied to your clipboard. Th...

Id #403 | Release: None | Updated: Nov 27 at 6:17 PM by shyamn | Created: Nov 19, 2014 at 7:08 PM by RonnieHegelund

solution.AddDocument not undoable

Hi, I don't know, If I am doing it well, but when I add new Document to Solution in CodeRefactoringProvider and changing syntaxtree, VS will change editing document and creates new one. But when u...

Id #402 | Release: None | Updated: Nov 25, 2014 at 6:31 PM by Pilchie | Created: Nov 19, 2014 at 5:58 PM by jeniczek42

Conversion before and after user-defined conversions

The Conversion class has two members UserDefinedFromConversion and UserDefinedToConversion, which are internal but contain information which, as far as I can tell, is not available elsewhere. Can y...

Id #401 | Release: None | Updated: Nov 19, 2014 at 5:40 PM by erikkallen | Created: Nov 19, 2014 at 5:38 PM by erikkallen

Simplifier annotation not working in Visual Basic

I am attempting to resolve the following issue: https://github.com/DotNetAnalyzers/NullParameterCheckRefactoring/issues/18 I attempted to use the same strategy as the C# implementation: adding t...

Id #399 | Release: None | Updated: Nov 27 at 6:17 PM by shyamn | Created: Nov 19, 2014 at 5:09 PM by sharwell

Query pattern when Select is a delegate

The program below will print System.Func<System.Func<C, C>, C>.Invoke(System.Func<C, C>) and nowhere is it indicated that the invoked member is the field C.Select, and similar for all possible qu...

Id #397 | Release: None | Updated: Nov 18, 2014 at 10:00 PM by erikkallen | Created: Nov 18, 2014 at 9:59 PM by erikkallen

GetDirectives method for CSharpSyntaxNode

It seem like there should be a way to enumerate over all directives under a node's sub-tree. There are currently GetFirstDirective and GetLastDirective methods, but if I want to enumerate over all ...

Id #396 | Release: None | Updated: Nov 18, 2014 at 9:37 PM by mdour | Created: Nov 18, 2014 at 9:37 PM by mdour

Provide implicit interface implementations

IMethodSymbol, IEventSymbol, and IPropertySymbol all have an ExplicitInterfaceImplementations property. It would be nice to also have an ImplicitInterfaceImplementations property and/or an Interfac...

Id #395 | Release: None | Updated: Nov 18, 2014 at 9:30 PM by mdour | Created: Nov 18, 2014 at 9:30 PM by mdour

Common base for lambda syntax nodes

It seems like SimpleLambdaExpressionSyntax and ParenthesizedLambdaExpressionSyntax should share a common base class since they both have ArrowToken, AsyncKeyword, and Body properties. It would also...

Id #394 | Release: None | Updated: Nov 20, 2014 at 10:01 PM by VSadov | Created: Nov 18, 2014 at 9:24 PM by mdour

Provide more information about invocations

I need the answers to the following questions about invocations: Which argument maps to which parameter in the invoked method? and Which values are supplied for each parameter in the invoked meth...

Id #393 | Release: None | Updated: Nov 18, 2014 at 9:08 PM by erikkallen | Created: Nov 18, 2014 at 9:08 PM by erikkallen

Probable bug in SemanticModel.GetCollectionInitializerSymbolInfo()

I expect this program to output True, but it does not class Program { static void Main(string[] args) { var syntaxTree = CSharpSyntaxTree.ParseText(@" using System; using System.Collections.Ge...

Id #390 | Release: None | Updated: Dec 4, 2014 at 9:06 PM by angocke | Created: Nov 18, 2014 at 7:42 AM by erikkallen

Can no longer define extern constructors in derived classes using Roslyn

public class A { public A(int a) { } } public class B : A { public extern B(); } This causes several errors to be reported, even in C# 5.0 mode. This code compiles fine in previous versi...

Id #386 | Release: None | Updated: Dec 24, 2014 at 12:18 AM by angocke | Created: Nov 17, 2014 at 8:44 PM by chadnedz

Methods imported from VB assembly are not correctly marked as "explicit interface implementations"

Consider the following C# source: public class FooCS : System.IDisposable { void System.IDisposable.Dispose() {} } And roughly equivalent VB source: Public Class FooVB Implements System.IDispos...

Id #385 | Release: None | Updated: Nov 20, 2014 at 9:31 PM by VSadov | Created: Nov 17, 2014 at 7:03 PM by rcook

Nested call to non-existent ctor gives nonsensical quick fix

Source: class X { X(string x) { new X(new string()); } } The quick fix in the middle line will offer to create X(string), even though that (a) already exists and (b) has nothing to do with t...

Id #384 | Release: None | Updated: Nov 17, 2014 at 4:41 AM by SSL | Created: Nov 17, 2014 at 4:25 AM by SSL

CS0108 Use new keyword should offer a quick fix to add the new keyword

If I shadow a method and leave out the new keyword, the only quick fix offered is to add #pragma suppress. You really should add a quick fix to add the new keyword too.

Id #383 | Release: None | Updated: Nov 23, 2014 at 8:13 AM by BlueCode | Created: Nov 17, 2014 at 4:08 AM by SSL

FuncEval strangeness in optimized code

I suspect that this bug simply happens whenever you try to inspect Reflection objects in optimized code. Precise repro: Start VS2015 (I hit F5 in extension project) Attach the VS2015 debugger (w...

Id #381 | Release: None | Updated: Nov 17, 2014 at 9:47 PM by panelsonms | Created: Nov 17, 2014 at 3:35 AM by SSL

Localization in VS2015 web applications

Hi, How do we achieve the localization in next version of Dot Net, i,e., in MVC 6? Thanks. Nayana M

Id #376 | Release: None | Updated: Nov 14, 2014 at 7:15 PM by VSadov | Created: Nov 14, 2014 at 10:15 AM by nayana_manchi

Rename doesn't resolve conflict by casting to interface

Source: public class Base : IEnumerable { public IEnumerator GetEnumerator() { throw new NotImplementedException(); } } public sealed class Derived : Base, IWeird, IEnumerable { public void X...

Id #373 | Release: None | Updated: Nov 24, 2014 at 9:58 PM by BlueCode | Created: Nov 13, 2014 at 6:15 PM by SSL

Rename doesn't show conflict in interface mapping

Source: public class Base : IEnumerable { public IEnumerator GetEnumerator() { throw new NotImplementedException(); } } public class Derived : Base, IWeird, IEnumerable { public void X() { } ...

Id #372 | Release: None | Updated: Nov 17, 2014 at 6:20 PM by SSL | Created: Nov 13, 2014 at 6:13 PM by SSL

C# Overload Resolution Regression in VS2015

This code (while a little sketch) compiles with VS2013 but on VS2015 produces errors: 1>C:\Users\hmansell\Documents\Visual Studio 14\Projects\ConsoleApplication2\ConsoleApplication2\Program.cs(24,...

Id #371 | Release: None | Updated: Nov 19, 2014 at 11:04 PM by angocke | Created: Nov 13, 2014 at 3:53 PM by hmansell

VS 2015 Preview cannot target VB apps on .NET 4.5.3

Open VS 2015 Create a new Visual Basic console app, targeting .NET Framework 4.5.3 Attempt to Build *** EXPECTED RESULT *** Build completes. *** ACTUAL RESULT *** Receive 9 errors with the r...

Id #368 | Release: None | Updated: Nov 13, 2014 at 6:48 PM by lonewolfcj | Created: Nov 12, 2014 at 7:08 PM by lonewolfcj

C# Compiler Regression with Visual Studio 2015

The following code compiles OK on VS2013 but fails with an error in VS2015 preview: 1>c:\users\hmansell\documents\visual studio 14\Projects\ConsoleApplication2\ConsoleApplication2\Program.cs(26,38...

Id #367 | Release: None | Updated: Nov 20, 2014 at 12:24 AM by hmansell | Created: Nov 12, 2014 at 6:48 PM by hmansell

Incorrect VBC_VER preprocessing constant for VB

The Visual Basic compiler exposes a preprocessing constant named VBC_VER. This constant indicates the version of the Visual Basic language, starting with 7.0 for the first VB.NET release in 2002, a...

Id #366 | Release: None | Updated: Nov 12, 2014 at 3:08 PM by timaki | Created: Nov 12, 2014 at 3:08 PM by timaki

SyntaxToken documentation does not mention defaults

This is related to pull request: https://roslyn.codeplex.com/SourceControl/network/forks/DinSoft/roslyn/contribution/7669 I would prefer to see a note regarding returning default(SyntaxToken) wh...

Id #365 | Release: None | Updated: Nov 12, 2014 at 3:27 AM by sharwell | Created: Nov 12, 2014 at 3:27 AM by sharwell

Not very helpful CS0121 error message text

Compile following code using System; namespace A.B { static class X { public static int Test (this int o) { return 1; } } } namespace A.C { static class X { public static...

Id #364 | Release: None | Updated: Nov 13, 2014 at 11:55 PM by angocke | Created: Nov 11, 2014 at 10:12 AM by mareksafar

FAQ(0) update?

public class FAQ { [AttributeUsage(AttributeTargets.Method)] private class FAQAttribute : Attribute { public int Id { get; private set; } public FAQAttribute(int id) ...

Id #362 | Release: None | Updated: Nov 10, 2014 at 8:06 PM by VSadov | Created: Nov 10, 2014 at 10:08 AM by danam

Space in inherited class declaration in Script breaks the binder

Source: (parsed as Script, not Document) class AB C : object { } Pressing Ctrl+Space in the space between AB and C will throw from http://source.roslyn.codeplex.com/#Microsoft.CodeAnalysis.CSharp...

Id #361 | Release: None | Updated: Nov 9, 2014 at 11:22 PM by SSL | Created: Nov 9, 2014 at 11:22 PM by SSL

Writes to locals & fields don't use decimal.Zero

http://tryroslyn.azurewebsites.net/#b:master/K4Zwlgdg5gBAygTxAFwKYFsDcAoADsAIwBswBjGUogQxBBgGEYBvbGNmAE1VLHSqJgAzMKiIcYAXhgAGLK3YB7AgCtuyGAQUAPVOKmyc7GPmJkYANwVhxAWQAUASmbyjbYaL0y5r9u7GSYAEZvHw1tXQ...

Id #360 | Release: None | Updated: Nov 11, 2014 at 4:27 AM by SSL | Created: Nov 9, 2014 at 7:47 PM by SSL

IntelliSense shows named argument that was already passed positionally

Keystrikes: int.Parse("", style: 0, Pressing Ctrl+Space will show both provider: and s:, even though s: was already specified as the first positional argument. This also happens if you don't p...

Id #359 | Release: None | Updated: Nov 27 at 6:17 PM by chandera | Created: Nov 9, 2014 at 5:35 PM by SSL

True & False operators from base class are ignored for short-circuited overloaded operators

Source: https://github.com/icsharpcode/ILSpy/blob/cc270c8f206b0e2863dc1866fe30b42faf5a49b1/ICSharpCode.Decompiler/Tests/CustomShortCircuitOperators.cs This code compiles fine on non-Roslyn, but g...

Id #358 | Release: None | Updated: Nov 9, 2014 at 2:48 PM by SSL | Created: Nov 9, 2014 at 2:48 PM by SSL

Don't loop forever when trying to create a directory

My decompiler found the following code in MetadataAsSourceFileService.GetGeneratedFileAsync: while (!Directory.Exists(var_15)) { try { Direct...

Id #357 | Release: None | Updated: Nov 27 at 6:17 PM by dpoeschl | Created: Nov 9, 2014 at 5:13 AM by SSL

Please make IDocumentNavigationService public

This interface is needed to support F12 in non-VS hosts. Can you also make ISymbolNavigationService public? This would be useful in VS extensions (such as https://github.com/SLaks/Ref12) that pr...

Id #354 | Release: None | Updated: Nov 7, 2014 at 3:22 PM by SSL | Created: Nov 7, 2014 at 3:22 PM by SSL

Spaces are trimmed after rewriting

Space between left expression and operator ('+', '/', '*', 'as' ) could be trimmed if you replace SyntaxNode complitelly Rewriter code: internal class ExperimentalRewriter : CSharpSyntaxRewriter ...

Id #353 | Release: None | Updated: Nov 6, 2014 at 11:25 PM by VSadov | Created: Nov 5, 2014 at 2:00 PM by x0040h

StackOverflow exceptions are broken in the Locals window

When a natural stack overflow occurs, the first entry in the Locals window (which should be $exception) has a blank key, and a value of "Flushing the results of this expression failed.". Clicking...

Id #352 | Release: None | Updated: Nov 7, 2014 at 5:51 PM by ManishJ | Created: Nov 5, 2014 at 3:39 AM by SSL

"Edit and continue" appears on debug but no edit was made

Hello, We developed a VisualStudio extension based on Roslyn language service. For now, we work on Visual Studio 2013, so we use the Roslyn Preview package. We installed both package on some k...

Id #351 | Release: None | Updated: Nov 6, 2014 at 10:52 PM by VSadov | Created: Nov 4, 2014 at 5:36 PM by ggeslin

Add Using inserts redundant namespace qualifier

Sourc: namespace A { namespace B { class T { } } namespace C { using System; class X : T { } } } The Add Using quick fix on : T will incorrectly insert using A.B above that line, eve...

Id #350 | Release: None | Updated: Nov 4, 2014 at 1:41 PM by SSL | Created: Nov 4, 2014 at 1:41 PM by SSL

CSharpCompilation.Emit() throws error

Whilst using the latest NuGet package of Roylsn (0.7.4091001-beta), I get some strange errors when emiting .pdb files in-memory. Using the attached code, I run the following, which uses the Memor...

Id #349 | Release: None | Updated: Jan 6, 2015 at 9:07 PM by angocke | Created: Nov 4, 2014 at 12:39 PM by MattWarren

Exception while loading an msbuild project

In the current master branch when loading a C# project I get an exception from ProjectFileLoader.cs in GetLoaderForProjectTypeGuid. It tries to read the ProjectTypeGuid which is a string for me and...

Id #348 | Release: None | Updated: Nov 27 at 6:17 PM by jasonmalinowski | Created: Nov 4, 2014 at 10:31 AM by Zarat

Quick Fixes should check Workspace.CanApplyChange

I made a Workspace where CanApplyChange() always returned false (by accident). Quick fixes worked fine, and called ChangedDocumentText, in spite of that. The format command handler, on the othe...

Id #347 | Release: None | Updated: Dec 12, 2014 at 6:50 PM by SSL | Created: Nov 3, 2014 at 3:14 AM by SSL