Skip to main content
Filter by
Sorted by
Tagged with
57 votes
2 answers
12k views

I've been looking at Roslyn for quite some time now, and I'm curious and excited about it. One thing I noticed is that they mentioned that the compiler is re-written in managed code. This raises the ...
mirhagk's user avatar
  • 1,295
0 votes
1 answer
506 views

When working with Roslyn, I will often have a node that is in the CompilationUnitSyntax but not the SemanticModel or vice-versa. (Or I can only pull the nodes out with operations of one or the other--...
Brian Rosamilia's user avatar
1 vote
1 answer
104 views

Im wondering if it is possible to use some cool features of Roslyn such as dynamic compilation in an ASP.NET application hosted in a shared hosting. Is that possible?
Daniel San's user avatar
  • 2,056
1 vote
1 answer
214 views

How can I change name of (IProject) in Roslyn? I found only the extension method UpdateAssemblyName(), but it do something else (of course).
TcKs's user avatar
  • 26.8k
16 votes
1 answer
4k views

I want to get the SyntaxNode of a line given the location(lineNumber). The code below should be self-explanatory, but let me know of any questions. static void Main() { string ...
Antony Thomas's user avatar
0 votes
1 answer
187 views

I am creating a workspace in memory for unit testing purposes, but I cannot access the symbol info of a certain InvocationExpression (which is required for the CodeIssue I am testing). Here is a ...
lee's user avatar
  • 2,258
0 votes
1 answer
162 views

What I am looking for is a an api that load a DOM and javascript and treat it in the manner of Roslyn. I can then use to analyze and convert different html into a compliant html 5 with jquery for ...
Joe's user avatar
  • 721
4 votes
1 answer
1k views

I am embedding a C# script engine into my application using Roslyn and so far, I can execute code with no issues. I can for example execute the following code: using System; var str = "Hello Roslyn"; ...
GETah's user avatar
  • 21.5k
3 votes
1 answer
449 views

I'm checking the Roslyn API using 'Getting Started: Semantic Analysis' walkthrough. There's a part in it which tries to add a reference to the compilation: var compilation = Compilation.Create("...
mehrandvd's user avatar
  • 9,184
5 votes
1 answer
2k views

I am embedding a script engine based on Roslyn into my application and started facing some issues. When loading a reference into my engine, I do the following var engine = new Roslyn.Scripting.CSharp....
GETah's user avatar
  • 21.5k
10 votes
8 answers
4k views

I'm developing a TypeScript code generator that will use custom attributes on C# classes to generate TypeScript definitions and code files. I'm considering two options for TypeScript code generation /...
dmck's user avatar
  • 7,861
28 votes
2 answers
19k views

I have a piece of software that generates code for a C# project based on user actions. I would like to create a GUI to automatically compile the solution so I don't have to load up Visual Studio just ...
KallDrexx's user avatar
  • 28k
5 votes
3 answers
9k views

We're currently using .NET 3.5 and part of our application uses dynamic invocation (using MethodBase.Invoke) I am wondering if it is possible to mix in Named Parameters (in .NET 4) with dynamic ...
lysergic-acid's user avatar
6 votes
2 answers
3k views

I have a custom msbuild task with this command: var workspace = Workspace.LoadStandAloneProject(csprojPath); When I run it, it throws the following error: System.InvalidCastException was unhandled ...
Janik Zikovsky's user avatar
8 votes
3 answers
3k views

I need to provide scripting capabilities within my application, allowing customers to extend its functionality using our object model. I was hoping to offer some kind of integrated C#/VB.Net editor ...
Andrew Stephens's user avatar
4 votes
1 answer
450 views

I am experimenting with the Roslyn script engine. Using the following code, I set up my script engine. var csharpEngine = new ScriptEngine(); csharpEngine.AddReference("System"); csharpEngine....
Nate's user avatar
  • 5,407
1 vote
1 answer
153 views

To find the target of an ExpressionSyntax instance I call mySemanticModel.GetSymbolInfo(myExpressionSyntax). I have several SemanticModel instances that each relate to a code file's syntax tree. I ...
Nik Gibbs's user avatar
3 votes
1 answer
204 views

I would like to implement a Rename-refactoring with Roslyn in Visual Studio. To do this, I want the user to enter the desired name that would be given to selected variable. How can I prompt the user ...
Marc Andreson's user avatar
8 votes
2 answers
4k views

I'm running roslyn ctp2 I am attempting to add a new html file to a project IWorkspace workspace = Workspace.LoadSolution("MySolution.sln"); var originalSolution = workspace.CurrentSolution; ...
Dan Black's user avatar
  • 1,217
5 votes
2 answers
488 views

Following this tutorial http://msdn.microsoft.com/en-us/vstudio/hh543922.aspx , I'm trying to use the ReplaceNode method that should be in the SyntaxNode class. The thing is, I have this error: "...
J.-B. C.'s user avatar
  • 902
9 votes
1 answer
3k views

I'm trying to modify syntax tree and then get semantic model updated. Here is what I have so far: var tree = Roslyn.Compilers.CSharp.SyntaxTree.ParseCompilationUnit(code); var compilation = Roslyn....
ren's user avatar
  • 3,991
1 vote
1 answer
672 views

Suppose I have "".GetType() which is ExpressionStatementSyntax (or maybe InvocationExpressionSyntax) in the syntax tree and I want to turn it into ("".GetType()), that is I want to turn my ...
ren's user avatar
  • 3,991
2 votes
1 answer
2k views

I want to use Roslyn to get all types used in a piece of code. I started with the following SyntaxWalker: public class DependenciesCollector : SyntaxWalker { public override void ...
SynerCoder's user avatar
  • 12.9k
0 votes
1 answer
261 views

I just installed the Roslyn CTP, but when I try to open the C# Interactive Window I got a popup error message: No valid exports were found that match the constraint '((exportDefinition.ContractName =...
Charlie's user avatar
  • 1,332
0 votes
1 answer
349 views

Using Roslyn's Workspaces, is there any way to acquire a hook into the active IWorkspace provided by Visual Studio? I want to be able to open ExampleProject in Visual Studio, then in my own ...
Kal_Torak's user avatar
  • 2,561