Roslyn refractoring - Prevent Refractor
Hi, During code re-factoring after the user clicks on the option, i would like to show my own custom window and cancel the automated code re-factoring.I tried implementing ICodeActionOperation,but it...
View ArticleMemory Leak in Solution.LoadStandAloneProject.
This is my second try at the same issue. There is a huge memory leak in Solution.LoadStandAloneProject. I am 99% sure this is caused by creating a new Microsoft.Build.Evaluation.ProjectCollection each...
View ArticleHow did the Solution.LoadStandAloneProject change from CTP2?
What has changed in the way Solution.LoadStandAloneProject(projectPath) behaves when not in the context of visual studio (msbuild)? Because now the method call returns a project, but it has no...
View ArticleCan't install Roslyn September 2012 CTP
I have Visual Studio Express 2012 for Windows Desktop.Trying to install Roslyn gives me error:Trying to install VS 2012 SDK gives me error:There is no knowledge that is not power.
View ArticleA few questions about GetCompletionItemGroups (and related cool stuff)
Hi,First off Roslyn is AWESOME the team working on this deserves a big thumbs-up.Anyways I am currently using the September CTP in a little WPF app in conjunction with the AvalonEdit control.When using...
View ArticleIs it possible to copy a value of the local variable xHost from the host...
I can copy a value of the variable xRoslyn from a Roslyn script to xHost in the host application by using "Execute" function.int xHost = session.Execute<int>("xRoslyn");Is it possible to do...
View Article"Imports" is not recognized [VB 11]
I have the following code:Sub RunScript() Dim engine = New ScriptEngine engine.AddReference(GetType(System.Math).Assembly) engine.ImportNamespace("System") Dim s As Session = engine.CreateSession() Dim...
View ArticleTranslating error diagnostic SourceSpan property to source Line and Column
While examining the Diagnostics property of CompilationErrorException, I noticed that the Location.SourceSpan holds the start and length of the erring section of code.Is there a function I can use to...
View ArticleSyntax Error
I'm using September CTP.1. I'm trying to execute the following code:Sub RunScript() Dim engine = New Roslyn.Scripting.VisualBasic.ScriptEngine() Dim s As Session = engine.CreateSession() Dim f =...
View ArticleThere is no Assembly.Unload method in .net. Consequently it is not possible...
I created a simple application which use Roslyn. publicstaticvoid Function() { ScriptEngine engine =newScriptEngine(); Session session = engine.CreateSession();...
View ArticleHow to get semantic model for script code with a session context
Take a scenario in C# interactive where a user submits 'var command = "do something";'User then types 'c' and gets a completion list of all symbols that begin (or contain) c. The command field will be...
View ArticleObservable and Roslyn
When trying to create an Observable in a Roslyn Session, I receive a CompilationErrorException:(1,1): error CS0012: The type 'System.Object' is defined in an assembly that is not referenced. You must...
View ArticleWhen & How can I use Roslyn in a commercial add-in for Visual Studio?
Hi all,I am very interested in Roslyn project and I really like to do a commercial add-in for Visual Studio by using this project. I am wondering is there any time line so that I could expect to use it...
View ArticleOutlining for #r blocks
My script files lately tend to look like the following:#r "System" #r "System.Core" #r "SomeAssembly.dll"using System; using System.IO; using SomeNamespace;When I am editing these .csx files, the...
View ArticleRoslyn December CTP Release
Just checking to see if there will be a Roslyn December CTP? That would be a nice Xmas gift:)Thanks
View ArticleSet Roslyn.Scripting.Session.Execute Permissions
Hi,I want to use Roslyn for executing code snippets but I want to execute the code from sandbox. If I create the sandbox and then execute Session.Execute from there, it fails because at that point...
View ArticleDifficult to determine if a Symbol is an instance of a type
It's surprisingly hard to tell if a symbol or expression is an instance of a type or not.My desired results are:"Some string" //Instance String // Not an instance Guid // Not an instance System.Guid...
View ArticleCan't access Int32Rect from C# interactive window
Hello. I'm experimenting with the C# interactive window in the Roslyn CTP but I'm receiving an error when I try to declare types of "Int32Rect" despite entering "using System.Windows;" at the...
View ArticleFeature Request: Ability to pass CompilationOptions to...
The ability to pass CompilationOptions to the CompileSubmission method would be very useful. I'd like to be able to specify that the ConcurrentBuild option be set to false, as it won't speed up the...
View ArticleHow to get the value of an array in Roslyn
Hi All,I try to get the array value using Roslyn. For example, if I have a C# code like this:int[] arrInt ={10,20,30,40,50};then how can I get the information that the value in arrInt[0] is 10,...
View Article