The Roslyn Project System is the new project system used for .NET Core projects, and Visual Studio 2017
Questions tagged [roslyn-project-system]
12 questions
9
votes
3 answers
WPF controls not recognized in code-behind when using new CSPROJ format
I've created a WPF application using the new CSPROJ format in Visual Studio 2017.
By
setting the LanguageTargets,
setting the generator for XAML files,
setting the build action for App.Xaml,
and forcing the debug executable
I can successfully…

RB.
- 36,301
- 12
- 91
- 131
3
votes
1 answer
Is my .csproj using the .NET project-system or the Common Project System
I was reading through the documentation on the .NET foundation's GitHub repository for the .NET project-system and saw that the latest system used to run C# projects on Visual Studio is the new Project System by default; however, as the older…

Turner Bass
- 801
- 8
- 20
2
votes
1 answer
How do I apply the assembly:ThemeInfo attribute with an auto-generated AssemblyInfo?
After the migration to the new VS 2017 project system, the AssemblyInfo.cs file is now auto-generated by default. How can I add the assembly:ThemeInfo[] attribute to my project that is required by WPF to find the default Themes\generic.xamlfile…

Lennart
- 9,657
- 16
- 68
- 84
1
vote
1 answer
Cannot read the external namespaces (Microsoft.AspNetCore.MVC...) in Roslyn (in another project it is working)
I have set up one Roslyn analyzer project that is reading properly the (external and internal) namespaces from Symbol (open solution in workspace -> read documents -> read classes -> read class symbol); however, when I created another xUnit project…

ce8
- 23
- 1
- 3
1
vote
1 answer
Difference in performance when using Compiler API versus Workspace API in Roslyn
I know that there are several API provided by Roslyn; however, I was not sure what is the difference in performance when using Compiler API and Workspace API. Does Workspace API build the entire solution and generate the IL code?

ce8
- 23
- 1
- 3
1
vote
0 answers
Unable to retreive XAML members of Control via Roslyn Compilation
Given an INamedTypeSymbol of a WPF Window, I can't seem to obtain a ISymbol for the members that are defined in XAML (and are then compiled as part of the auto-generated .g.cs file).
To reproduce the problem I'm having,
Create a new blank WPF…

MBi
- 51
- 6
1
vote
1 answer
using roslyn, how to get a type of 'var'?
I want to get the type represented by var.
var localDeclaration = methodDeclaration.DescendantNodes().OfType().First();
var identifierName =…

eden
- 21
- 2
1
vote
0 answers
How to enforce .Net Core project always take the file Build Action according to the file extension
The issue:
If I change the file extension from the visual studio, the file Build Action will be according to the previous Build Action and not according to the new file extension.
There is a way to enforce the visual studio always takes the Build…

itaiy
- 1,152
- 1
- 13
- 22
0
votes
0 answers
.NET 6 SDK on Docker container not loading full namespaces of external packages of projects that target smaller SDKs in Workspace API of Roslyn
I am using .NET 6.0 SDK to register an instance via MSBuildLocator in Roslyn. According to MSBuildLocator.IsRegistered the instance is registered and returns true. Locally everything works perfect and when I load external projects (that target .NET…

ce8
- 23
- 1
- 3
0
votes
0 answers
How to find the path of a base class via Roslyn?
I am trying to find the path of the base class via Roslyn but I could not find any helpful resource.
Does anyone have an idea how to approach the problem.
E.g. path: "../File1.cs" contains:
using ...;
namespace Extraction
{
class Class1 : Class2…

ce8
- 23
- 1
- 3
0
votes
1 answer
OutKind.ConsoleApplication Err(Roslyn Compiler)
I compiling with roslyn some Diagnostics Error showing My code is below:
using System;
using System.Reflection;
using System.Runtime.Loader;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.Emit;
using System.IO;
using…

karthick19892089
- 1
- 3
0
votes
0 answers
Copy projects from existing VisualStudioWorkspace to new AdhocWorkspace
We have a VisualStudioWorkspace with all the projects that are open in Visual Studio. Now we would like to create a new AdhocWorkspace object, with a limited set of the projects in the VisualStudioWorkspace.
Is it somehow possible to copy projects…

TWT
- 2,511
- 1
- 23
- 37