Coder Social home page Coder Social logo

roslyn-sdk's Introduction

Roslyn SDK

Branch Status
dev16.0.x Build Status
main Build Status

What is the Roslyn-SDK?

Roslyn is the compiler platform for .NET. It consists of the compiler itself and a powerful set of APIs to interact with the compiler. The Roslyn platform is hosted at github.com/dotnet/roslyn. The compiler is part of every .NET installation. The APIs to interact with the compiler are available via NuGet (see the Roslyn repository for details). The Roslyn SDK includes additional components to get you started with advanced topics such as distributing a Roslyn analyzer as Visual Studio extension or to inspect code with the Syntax Visualizer. The documentation for the Roslyn platform can be found at docs.microsoft.com/dotnet/csharp/roslyn-sdk. This repository contains code for both the Roslyn-SDK templates and Syntax Visualizer.

Installation instructions

Visual Studio 2017 (Version 15.5 and above)

  1. Run Visual Studio Installer
  2. Hit Modify
  3. Select the Individual components tab
  4. Check the box for .NET Compiler Platform SDK

Visual Studio 2015

For older versions of Visual Studio the .NET Compiler Platform SDK is available as an extension in the Visual Studio gallery.

roslyn-sdk's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

roslyn-sdk's Issues

Upgrading NuGet.CommandLine breaks Analyzer project

@lgolding commented on Fri May 22 2015

Repro:

  1. Create a project from the "Analyzer with Code Fix (NuGet + VSIX)" template
  2. Build the project: it succeeds.
  3. In Solution Explorer, right-click the Analyzer project node and select Manage NuGet packages.
  4. In NuGet package manager, upgrade NuGet.CommandLine from 2.8.2 (which comes in the template) to latest available (2.8.5 at time of this writing).

Expected: I can still build my project.

Actual: The build fails with the error:

C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(4707,5): error MSB3073: The command ""C:\Users\lgolding\Documents\Visual Studio 2015\Projects\MyAnalyzers\packages\NuGet.CommandLine.2.8.2\tools\NuGet.exe" pack Diagnostic.nuspec -NoPackageAnalysis -OutputDirectory ." exited with code 3.

This is because the project file has a postbuild step that runs "nuget.exe pack" explicitly from the 2.8.2 directory, and upgrading to NuGet.CommandLine.2.8.5 doesn't change this.


@sharwell commented on Fri May 22 2015

This is completely fixed if the templates adopt the second suggestion I made in this comment (using the NuGet package I created for packaging NuGet packages from the output of a single project).


@davkean commented on Fri Nov 20 2015

Moving to SDK.


@ronelm2000 commented on Sun Jun 26 2016

Hey, to anyone who experienced this error, I made a band-aid workaround for the real problem.

  1. Go to your project directory/packages and find the NuGet.CommandLine. folder. Copy the folder name.
  2. Go to your Analyzer Project (Portable) and click on Properties.
  3. Go to Build Events
  4. Replace the deprecated folder name with the necessary folder name.

Visual Basic Extensibility Analyzer with Code Fix (NuGet + VSIX) doesn't build every time

@paul1956 commented on Fri Sep 11 2015

It always works first time after starting VB, after that sometime it builds without error, other times it get two errors. Both errors are on line 235

<Exec Command="&quot;$(SolutionDir)packages\NuGet.CommandLine.2.8.5\tools\NuGet.exe&quot; pack Diagnostic.nuspec -NoPackageAnalysis -Version %(Pure_Visual_Basic_RefactoringAssemblyInfo.Version) -OutputDirectory ." WorkingDirectory="$(OutDir)" LogStandardErrorAsError="true" ConsoleToMSBuild="true">
The system cannot find the path specified
The command ""C:\Users\Paul\Documents\Visual Studio 2015\Projects\Pure Visual Basic Refactoring\packages\NuGet.CommandLine.2.8.5\tools\NuGet.exe" pack Diagnostic.nuspec -NoPackageAnalysis -Version 1.0.5732.37058 -OutputDirectory ." exited with code 3.

If I unload the portable class and reload it, everything works ONCE.


@jmarolf commented on Sat Sep 12 2015

What console output do you get if you run

"C:\Users\Paul\Documents\Visual Studio 2015\Projects\Pure Visual Basic Refactoring\packages\NuGet.CommandLine.2.8.5\tools\NuGet.exe" pack Diagnostic.nuspec -NoPackageAnalysis -Version 1.0.5732.37058 -OutputDirectory .

from the output directory for your project?


@paul1956 commented on Sat Sep 12 2015

@jmmarolf do you mean from a Windows Command Prompt or is there some way to run from within VS. I will not be back on computer for 10 hours but will try then. What is strange is it always works the first time the project is loaded and then fails until the project is reloaded (even without exiting VS).


@jmarolf commented on Sat Sep 12 2015

@paul1956 right, from a command prompt. Curious to know the actual nuget error message.


@paul1956 commented on Sat Sep 12 2015

C:\Users\Paul\Documents\Visual Studio 2015\Projects\Pure Visual Basic Refactorin
g\Pure Visual Basic Refactoring\Pure_Visual_Basic_Refactoring\bin\Debug>"C:\User
s\Paul\Documents\Visual Studio 2015\Projects\Pure Visual Basic Refactoring\packa
ges\NuGet.CommandLine.2.8.5\tools\NuGet.exe" pack Diagnostic.nuspec -NoPackageAn
alysis -Version 1.0.5732.37058 -OutputDirectory .
The system cannot find the path specified.

The packages directory is at

C:\Users\Paul\Documents\Visual Studio 2015\Projects\Pure Visual Basic Refactoring

This does not explain why sometimes it works and others it fails. If the path is wrong it should never work.

From the solution file it looks like the value of $(SolutionDir) is changing between builds

    <Exec Command="&quot;$(SolutionDir)packages\NuGet.CommandLine.2.8.5\tools\NuGet.exe&quot; pack Diagnostic.nuspec -NoPackageAnalysis -Version %(Pure_Visual_Basic_RefactoringAssemblyInfo.Version) -OutputDirectory ." WorkingDirectory="$(OutDir)" LogStandardErrorAsError="true" ConsoleToMSBuild="true">
      <Output TaskParameter="ConsoleOutput" PropertyName="OutputOfExec" />
    </Exec>

@paul1956 commented on Sun Sep 13 2015

I noticed that there is a "" missing in the path NuGet.CommandLine.2.8.5 should be NuGet.CommandLine\2.8.5 but that does not explain why it works after unloading the project and then reloading.

VS integration nuget should specify its dependency on exact version of Immutable

@ljw1004 commented on Tue Jun 28 2016

Version Used: VS2015 Update2, and Update3

Steps to Reproduce:

  1. File > New > C# > Extensibility > Code Refactoring (VSIX)
  2. References > Manage NuGet packages > Installed > System.Collections.Immutable > upgrade to v1.2.0
  3. Add this code:
// Add this inside the start of ComputeRefactoringsAsync:
try { test(false); }
catch (System.Exception ex) {
    System.Diagnostics.Debug.WriteLine(ex.Message);
}

// This is the method "test":
void test(bool b)
{
    if (!b) return;
    Solution s = null;
    s.GetDocumentIdsWithFilePath("");
}

Expected Behavior:

It should either work at runtime, or give a build-time error.

Actual Behavior:

It builds okay. At runtime it never enters method test. Instead it hits the catch block with exception Could not load System.Collections.Immutable v1.2.0

Discussion:

I believe that the Visual Studio process already has a particular version of System.Collections.Immutable loaded into its address space. This seems to be version 1.1.37 in both Update2 and Update3.

Now my VSIX comes along and is loaded into the same address space. It had been compiled against v1.2.0 of System.Collections.Immutable, but only v1.1.37 is loaded.

When I attempt to invoke my method test() which contains calls to a Roslyn API which returns an immutable array (e.g. Solution.GetDocumentIdsWithFilePath) then upon first entry to this method, the JIT tries to load all types it needs to compile this method. But it's unable to load System.Collections.Immutable. It therefore fails to JIT my method test().

This is all really subtle and hard to discover, and easy to run into...

  • The File>New>Refactoring template happens to avoid it because File>New spits out a NuGet reference to System.Collections.Immutable v1.1.36. But NuGet users are likely to upgrade their packages just to get rid of the irritating NuGet "updates available" flag.
  • It's not even clear to the user why System.Collections.Immutable reference is even there. A tidy-minded user is likely to switch over to project.json, and then only use the minimum set of NuGet references (just Microsoft.CodeAnalysis.CSharp.Workspaces on its own will suffice).
    • Actually, when I did File>New>Refactoring, uninstalled all the nugets, created a new project.json, and installed solely the nuget Microsoft.CodeAnalysis.CSharp.Workspaces v1.2.2, then it brought in a dependency on System.Collections.Immutable 1.2.0. And I had expected this to fail like the above. But it succeeded! I don't know why!
    • When I tried to do a larger VSIX project with a few more Roslyn references - https://blogs.msdn.microsoft.com/lucian/2016/06/27/visual-studio-text-adornment-vsix-using-roslyn/ - then it did run into the System.Collections.Immutable 1.2.0 problem. I'm not sure why.

What I think should happen:

This is confusing...

  • Why does System.Collections.Immutable get updated so often?
  • Can there be a binding redirect so that VS is happy to pull in a newer version of it?
  • Should one of the nuget packages e.g. Microsoft.VisualStudio.LanguageService have a hard-coded dependency on the exact right version of System.Collections.Immutable so that NuGet doesn't silently pick a newer one?

I honestly don't know. But the status quo feels like dangerous -- it's a narrow golden path, and impossible to know that certain reasonable actions will lead you astray, and hard to debug what's gone wrong.


@ljw1004 commented on Tue Jun 28 2016

I know! Let's have a few different NuGet packages:

Microsoft.VisualStudio compatibility check for VS2015 Update 2 or higher
Microsoft.VisualStudio compatibility check for VS2015 Update 3 or higher
...

And the templates will add a reference to the appropriate one of these. These NuGet packages don't contain any libraries. All they do is have "exact version dependencies" on other NuGets, to make sure you don't pick a too-recent version of anything.

I figure the names of these packages will be self-documenting enough.


@jmarolf commented on Fri Dec 15 2017

Issue moved to dotnet/roslyn-sdk #56 via ZenHub


@jmarolf commented on Fri Dec 15 2017

Issue moved to dotnet/roslyn-sdk #57 via ZenHub


@jmarolf commented on Fri Dec 15 2017

Issue moved to dotnet/roslyn-sdk #58 via ZenHub

Samples solution has lots of warnings about missing projects

@davkean commented on Wed Apr 13 2016

Open src\Samples.sln:

Severity    Code    Description Project File    Line    Suppression State
Warning     The referenced component 'Microsoft.CodeAnalysis.VisualBasic' could not be found.   TreeTransformsVB            
Warning     The referenced component 'Microsoft.CodeAnalysis' could not be found.   BasicAnalyzers          
Warning     The referenced component 'Microsoft.CodeAnalysis' could not be found.   CSharpAnalyzers         
Warning     The referenced component 'Microsoft.CodeAnalysis' could not be found.   TreeTransformsVB            
Warning     The referenced component 'Microsoft.CodeAnalysis.CSharp' could not be found.    CSharpAnalyzers         
Warning     The referenced component 'Microsoft.CodeAnalysis.CSharp.Workspaces' could not be found. CSharpAnalyzers         
Warning     The referenced component 'Microsoft.CodeAnalysis.VisualBasic' could not be found.   BasicAnalyzers          
Warning     The referenced component 'Microsoft.CodeAnalysis.VisualBasic.Workspaces' could not be found.    BasicAnalyzers          
Warning     The referenced component 'Microsoft.CodeAnalysis.Workspaces' could not be found.    BasicAnalyzers          
Warning     The referenced component 'Microsoft.CodeAnalysis.Workspaces' could not be found.    CSharpAnalyzers         
Warning     The referenced component 'Microsoft.CodeAnalysis.Workspaces.Desktop' could not be found.    BasicAnalyzers          
Warning     The referenced component 'Microsoft.CodeAnalysis.Workspaces.Desktop' could not be found.    CSharpAnalyzers         

There's approximately ~132 warnings.

Analyzer and Code Fix testing should allow alternate test failure messages

There is no current way to alter the message produced by the Analyzer and Code Fix on failure.

Analyzer and Code Fix testing from the templates has a fixed message

This presents a problem for me because I use sample code files and do not know which sample code file failed without a debug breakpoint to evaluate real-time values.

I would like CodeFixVerifier to accept a delegate to create the message. This is the easiest way to give the person writing the tests adequate control over the message.

An alternate message string is not sufficient because there are many reasons someone might have extra information to deliver to the person looking at test failures.

Testing Code Fixes does not allow alternate spacing or other formatting

@KathleenDollard commented on Sat Mar 14 2015

When documents are compared after applying code fixes during testing, obviously, every character counts :)

The default of 4 spaces in the workspace used for creating the fixed documents is arbitrary, and results in significant challenges in creating test data when the developers machine uses a different spacing.

I suggest modifying the VerifyCSharpTestFix and VerifyBasicTestFix methods to accept workspace options that can be added to the workspace prior to applying the new document.

Allowing workspace formatting options here is preferable to allowing the indent space value because there are other formatting options someone may wish to apply.

I've done this in my copy if you would like to see that code.

VS integration nuget should specify its dependency on exact version of Immutable

@ljw1004 commented on Tue Jun 28 2016

Version Used: VS2015 Update2, and Update3

Steps to Reproduce:

  1. File > New > C# > Extensibility > Code Refactoring (VSIX)
  2. References > Manage NuGet packages > Installed > System.Collections.Immutable > upgrade to v1.2.0
  3. Add this code:
// Add this inside the start of ComputeRefactoringsAsync:
try { test(false); }
catch (System.Exception ex) {
    System.Diagnostics.Debug.WriteLine(ex.Message);
}

// This is the method "test":
void test(bool b)
{
    if (!b) return;
    Solution s = null;
    s.GetDocumentIdsWithFilePath("");
}

Expected Behavior:

It should either work at runtime, or give a build-time error.

Actual Behavior:

It builds okay. At runtime it never enters method test. Instead it hits the catch block with exception Could not load System.Collections.Immutable v1.2.0

Discussion:

I believe that the Visual Studio process already has a particular version of System.Collections.Immutable loaded into its address space. This seems to be version 1.1.37 in both Update2 and Update3.

Now my VSIX comes along and is loaded into the same address space. It had been compiled against v1.2.0 of System.Collections.Immutable, but only v1.1.37 is loaded.

When I attempt to invoke my method test() which contains calls to a Roslyn API which returns an immutable array (e.g. Solution.GetDocumentIdsWithFilePath) then upon first entry to this method, the JIT tries to load all types it needs to compile this method. But it's unable to load System.Collections.Immutable. It therefore fails to JIT my method test().

This is all really subtle and hard to discover, and easy to run into...

  • The File>New>Refactoring template happens to avoid it because File>New spits out a NuGet reference to System.Collections.Immutable v1.1.36. But NuGet users are likely to upgrade their packages just to get rid of the irritating NuGet "updates available" flag.
  • It's not even clear to the user why System.Collections.Immutable reference is even there. A tidy-minded user is likely to switch over to project.json, and then only use the minimum set of NuGet references (just Microsoft.CodeAnalysis.CSharp.Workspaces on its own will suffice).
    • Actually, when I did File>New>Refactoring, uninstalled all the nugets, created a new project.json, and installed solely the nuget Microsoft.CodeAnalysis.CSharp.Workspaces v1.2.2, then it brought in a dependency on System.Collections.Immutable 1.2.0. And I had expected this to fail like the above. But it succeeded! I don't know why!
    • When I tried to do a larger VSIX project with a few more Roslyn references - https://blogs.msdn.microsoft.com/lucian/2016/06/27/visual-studio-text-adornment-vsix-using-roslyn/ - then it did run into the System.Collections.Immutable 1.2.0 problem. I'm not sure why.

What I think should happen:

This is confusing...

  • Why does System.Collections.Immutable get updated so often?
  • Can there be a binding redirect so that VS is happy to pull in a newer version of it?
  • Should one of the nuget packages e.g. Microsoft.VisualStudio.LanguageService have a hard-coded dependency on the exact right version of System.Collections.Immutable so that NuGet doesn't silently pick a newer one?

I honestly don't know. But the status quo feels like dangerous -- it's a narrow golden path, and impossible to know that certain reasonable actions will lead you astray, and hard to debug what's gone wrong.


@ljw1004 commented on Tue Jun 28 2016

I know! Let's have a few different NuGet packages:

Microsoft.VisualStudio compatibility check for VS2015 Update 2 or higher
Microsoft.VisualStudio compatibility check for VS2015 Update 3 or higher
...

And the templates will add a reference to the appropriate one of these. These NuGet packages don't contain any libraries. All they do is have "exact version dependencies" on other NuGets, to make sure you don't pick a too-recent version of anything.

I figure the names of these packages will be self-documenting enough.

Wiki is outdated

@pjt33 commented on Mon Nov 16 2015

https://github.com/dotnet/roslyn/wiki/Samples-and-Walkthroughs says that the samples include

  • AsyncPackage - A set of diagnostics and code fixes that help you use the await/async keywords correctly.

I haven't done a full bisection, but this sample disappeared somewhere between the tag toolset_2 and the tag toolset_3.

It would be helpful to update the wiki page to either point at a suitable tag / branch / commit for people who want this sample or to remove the mention entirely.


@davkean commented on Mon Nov 16 2015

@jmarolf?


@chaitanyagurrapu commented on Sun Nov 22 2015

Another outdated instruction. Step 8 of this walk through https://github.com/dotnet/roslyn/wiki/Getting-Started-C%23-Semantic-Analysis has the following instructions ...

image

Which doesn't work as we are passing in a string where an assembly is expected
image

But passing in an assembly doesn't work either as this method has since been obsoleted.

image

The correct way seems to be

image

The downside of putting all this documentation in the Wiki is that the community cannot send pull requests to update it or suggest improvements. Perhaps the team should consider using the gh-pages feature of github for the documentation .

Localization for "Download the .NET Compiler Platform SDK" template project

@mavasani commented on Mon Jun 29 2015

See attached snapshots, the messages, name of the template project and the index.html contents all seem to be non-localized in a localized VS drop.

loc_new_project_dialog
loc_download_roslyn_sdk
loc_analyzer_with_codefix_project


@mavasani commented on Mon Jun 29 2015

Additionally, the ReadMe.txt created for the Analyzer with fix project is also non-localized. Should the contents of this file also be localized?


@mavasani commented on Mon Jun 29 2015

One more observation: the comments added to the default analyzer + fix project are also in ENU. Probably they should be localized too?


@jmarolf commented on Fri Feb 19 2016

After talking to @jinujoseph I am moving this to 1.3 and hope to get the authoring in immediately after 1.2 ships


@jmarolf commented on Fri Dec 15 2017

Issue moved to dotnet/roslyn-sdk #39 via ZenHub

FAQ still refers to preview and many of links don't go anywhere or to the wrong place

@paul1956 commented on Fri Sep 11 2015

Found at https://github.com/dotnet/roslyn/wiki/FAQ

Instructions don't match current Roslyn and the link to the FAQ files doesn't exist.
#%installdir%{CSharp|VisualBasic}\APISampleUnitTests{CS|VB}\faq.{cs|vb}".

I did find the Solution file at roslyn\src\Samples\VisualBasic\APISampleUnitTests.FAQ.VB. along with a solution file.APISampleUnitTestsVB.sln but the load failed with

C:\Users\Paul\Documents\GitHub\repos\roslyn\src\Samples\VisualBasic\APISampleUnitTests\APISampleUnitTestsVB.vbproj : error  : The imported project "C:\Users\Paul\Documents\GitHub\repos\roslyn\src\Samples\VisualBasic\Tools\Microsoft.CodeAnalysis.Toolset.Open\Targets\VSL.Settings.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.  C:\Users\Paul\Documents\GitHub\repos\roslyn\src\Samples\VisualBasic\APISampleUnitTests\APISampleUnitTestsVB.vbproj

@jmarolf commented on Sat Sep 12 2015

The project should be loading the targets file located here (C:\Users\Paul\Documents\GitHub\repos\roslyn\build\Targets\VSL.Settings.targets fore you).

Is this line the same in your APISampleUnitTestsVB.vbproj file?


@paul1956 commented on Sat Sep 12 2015

No the line is what is in my original message. Except with substituation variables. It is going to a sub directory of src/samples/VisualBasic


@jmarolf commented on Sat Sep 12 2015

@paul1956 I suggest pulling the latest changes into your enlistment then.
From command prompt in C:\Users\Paul\Documents\GitHub\repos\roslyn execute the command git pull


@paul1956 commented on Sat Sep 12 2015

After Git Pull

C:\Users\Paul\Documents\GitHub\repos\roslyn\src\Samples\VisualBasic\APISampleUnitTests\APISampleUnitTestsVB.vbproj : error  : The imported project "C:\Users\Paul\Documents\GitHub\repos\roslyn\build\Targets\VSL.Settings.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.  C:\Users\Paul\Documents\GitHub\repos\roslyn\src\Samples\VisualBasic\APISampleUnitTests\APISampleUnitTestsVB.vbproj

Looking at the file APISampleUnitTestsVB.vbproj it is identical to the one on my machine

I am loading the file C:\Users\Paul\Documents\GitHub\repos\roslyn\src\Samples\VisualBasic\APISampleUnitTests\APISampleUnitTestsVB.sln it looks like this file expects to be loaded from the parent directory.

Add CI for samples

need a way to verify that the samples build cleanly on all supported versions of VS

VS 2017 RC: "View Directed Syntax Graph" does not appear when right-clicking a node in the Syntax Visualizer

@jamesqo commented on Mon Dec 05 2016

Version Used: 1.3.0.60420 (latest from https://marketplace.visualstudio.com/items?itemName=VisualStudioProductTeam.NETCompilerPlatformSDK)

Steps to Reproduce:

  1. Download Visual Studio 2017 RC
  2. Install the .NET Compiler Platform SDK from the link above
  3. Open any C# project
  4. Open the Syntax Visualizer and right click one of the syntax elements

Expected Behavior: There should be a "View Directed Syntax Graph" option at the top of the menu.

Actual Behavior: There is an empty section there instead.

Is this a known issue? I'm just getting started with Roslyn, so I'm not sure if I've done anything wrong. Thanks!


@Pilchie commented on Mon Dec 12 2016

Moving to SDK and Samples.

I suspect that this might be because your VS install doesn't include the diagramming components necessary to support that option.

@jmarolf - what do you think?


@jmarolf commented on Mon Dec 12 2016

@Pilchie thats my guess but I'll take a look


@jwooley commented on Wed Feb 22 2017

Confirmed that using the installer's "Individual Features" and selecting the "Code Map" option enables this feature again.
image

SyntaxVisualizer is getting assembly conflicts warnings on build machines

@davkean commented on Mon Dec 21 2015

15:54:17 BUILD WARNINGS for d:\j\workspace\dotnet_roslyn_prtest_win_vsi_p1\Closed\Setup\Setup.proj
15:54:17 22:58:04.355 12>C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1819,5): warning MSB3277: Found conflicts between different versions of the same dependent assembly that could not be resolved. These reference conflicts are listed in the build log when log verbosity is set to detailed. [d:\j\workspace\dotnet_roslyn_prtest_win_vsi_p1\Open\src\Tools\Source\SyntaxVisualizer\SyntaxVisualizerControl\SyntaxVisualizerControl.csproj]
15:54:17 22:58:04.514 13>C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1819,5): warning MSB3277: Found conflicts between different versions of the same dependent assembly that could not be resolved. These reference conflicts are listed in the build log when log verbosity is set to detailed. [d:\j\workspace\dotnet_roslyn_prtest_win_vsi_p1\Open\src\Tools\Source\SyntaxVisualizer\SyntaxVisualizerDgmlHelper\SyntaxVisualizerDgmlHelper.vbproj]
15:54:17 22:58:06.369 11>C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1819,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "System.Collections.Immutable, Version=1.1.36.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [d:\j\workspace\dotnet_rosly

GetRelatedDocumentsWithChanges is inaccessible

@paul1956 commented on Fri Apr 22 2016

Version Used:
Visual Studio Update 2, Roslyn tag 1.2.1
Steps to Reproduce:

  1. Load Samples.sln from Roslyn source
  2. Fix all the missing NuGet Packages (separate issue)
  3. in PasteHandler.cs and ViewCreationListener.cs GetRelatedDocumentsWithChanges is inaccessible due to its protection level

Expected Behavior:
No error
Actual Behavior:

Error   CS0122  'TextExtensions.GetRelatedDocumentsWithChanges(SourceText)' is inaccessible due to its protection level CopyPasteWithUsing  ..\repos\roslyn-version-1.2.1\src\Samples\CSharp\CopyPasteWithUsing\PasteHandler.cs 58  Active
Error   CS0122  'TextExtensions.GetRelatedDocumentsWithChanges(SourceText)' is inaccessible due to its protection level CopyPasteWithUsing  ..\repos\roslyn-version-1.2.1\src\Samples\CSharp\CopyPasteWithUsing\ViewCreationListener.cs 160 Active

@Pilchie commented on Mon Apr 25 2016

It looks like we have two copies of that method - one in Workspaces and one in EditorFeatures.Text, and it's the latter one that is public.

http://source.roslyn.io/Microsoft.CodeAnalysis.EditorFeatures.Text/R/5faa3f57c5b4e137.html

Do you have a reference to the EditorFeatures.Text nuget package and using Microsoft.CodeAnalysis.Text;?


@paul1956 commented on Mon Apr 25 2016

I didn't have the NuGet Package EditorFeatures.Text and I wasn't recommended to install it. Adding it fixes the issues. None of this is my code, it is the Roslyn Sample.sln from Update 2 I was trying to test.


@jmarolf commented on Mon Apr 25 2016

@paul1956 can you submit a PR with the added nuget package?


@paul1956 commented on Mon Apr 25 2016

If I knew how to submit a PR I would be happy to. Sorry.

BasicAnalyzers and CSharpAnalyzers are deploying to the wrong hive

@davkean commented on Sun Feb 21 2016

image

This should be 14.0RoslynDev, not 14.0Roslyn.


@davkean commented on Sun Feb 21 2016

Also, why do they have @mavasani's user name as company?


@jmarolf commented on Sun Feb 21 2016

Thats the default info that the SDK generates when you create a new project. We deploy to the Roslyn in the SDK and use your username.


@mavasani commented on Sun Feb 21 2016

Yes, just need to update it.


@DiryBoy commented on Tue Feb 23 2016

If users are writing analyzers themselves, things get deployed to the Roslyn suffix, isn't that samples are also expected to be deployed to the same suffix?


@davkean commented on Tue Feb 23 2016

Yeah, perhaps. Either way they should be deployed to "Roslyn" or all deployed to "RoslynDev" - not a mix.

VS integration nuget should specify its dependency on exact version of Immutable

@ljw1004 commented on Tue Jun 28 2016

Version Used: VS2015 Update2, and Update3

Steps to Reproduce:

  1. File > New > C# > Extensibility > Code Refactoring (VSIX)
  2. References > Manage NuGet packages > Installed > System.Collections.Immutable > upgrade to v1.2.0
  3. Add this code:
// Add this inside the start of ComputeRefactoringsAsync:
try { test(false); }
catch (System.Exception ex) {
    System.Diagnostics.Debug.WriteLine(ex.Message);
}

// This is the method "test":
void test(bool b)
{
    if (!b) return;
    Solution s = null;
    s.GetDocumentIdsWithFilePath("");
}

Expected Behavior:

It should either work at runtime, or give a build-time error.

Actual Behavior:

It builds okay. At runtime it never enters method test. Instead it hits the catch block with exception Could not load System.Collections.Immutable v1.2.0

Discussion:

I believe that the Visual Studio process already has a particular version of System.Collections.Immutable loaded into its address space. This seems to be version 1.1.37 in both Update2 and Update3.

Now my VSIX comes along and is loaded into the same address space. It had been compiled against v1.2.0 of System.Collections.Immutable, but only v1.1.37 is loaded.

When I attempt to invoke my method test() which contains calls to a Roslyn API which returns an immutable array (e.g. Solution.GetDocumentIdsWithFilePath) then upon first entry to this method, the JIT tries to load all types it needs to compile this method. But it's unable to load System.Collections.Immutable. It therefore fails to JIT my method test().

This is all really subtle and hard to discover, and easy to run into...

  • The File>New>Refactoring template happens to avoid it because File>New spits out a NuGet reference to System.Collections.Immutable v1.1.36. But NuGet users are likely to upgrade their packages just to get rid of the irritating NuGet "updates available" flag.
  • It's not even clear to the user why System.Collections.Immutable reference is even there. A tidy-minded user is likely to switch over to project.json, and then only use the minimum set of NuGet references (just Microsoft.CodeAnalysis.CSharp.Workspaces on its own will suffice).
    • Actually, when I did File>New>Refactoring, uninstalled all the nugets, created a new project.json, and installed solely the nuget Microsoft.CodeAnalysis.CSharp.Workspaces v1.2.2, then it brought in a dependency on System.Collections.Immutable 1.2.0. And I had expected this to fail like the above. But it succeeded! I don't know why!
    • When I tried to do a larger VSIX project with a few more Roslyn references - https://blogs.msdn.microsoft.com/lucian/2016/06/27/visual-studio-text-adornment-vsix-using-roslyn/ - then it did run into the System.Collections.Immutable 1.2.0 problem. I'm not sure why.

What I think should happen:

This is confusing...

  • Why does System.Collections.Immutable get updated so often?
  • Can there be a binding redirect so that VS is happy to pull in a newer version of it?
  • Should one of the nuget packages e.g. Microsoft.VisualStudio.LanguageService have a hard-coded dependency on the exact right version of System.Collections.Immutable so that NuGet doesn't silently pick a newer one?

I honestly don't know. But the status quo feels like dangerous -- it's a narrow golden path, and impossible to know that certain reasonable actions will lead you astray, and hard to debug what's gone wrong.


@ljw1004 commented on Tue Jun 28 2016

I know! Let's have a few different NuGet packages:

Microsoft.VisualStudio compatibility check for VS2015 Update 2 or higher
Microsoft.VisualStudio compatibility check for VS2015 Update 3 or higher
...

And the templates will add a reference to the appropriate one of these. These NuGet packages don't contain any libraries. All they do is have "exact version dependencies" on other NuGets, to make sure you don't pick a too-recent version of anything.

I figure the names of these packages will be self-documenting enough.

Samples from Samples.sln can't be debugged

@AmadeusW commented on Tue Nov 10 2015

This is a contributor pain regarding the samples.
The samples wiki doesn't walk through getting the provided samples to work. Debugging these doesn't work in neither /rootsuffix Exp, Roslyn nor RoslynDev. Ideally, Samples work out of the box. I'd like to contribute and either get these to work, or write documentation, if someone provides guidance.

Currently, to work with a sample, I'm copying all of the sample's code to a File>New>Project>Code Refactoring and it's smooth sailing from there. It's not an ideal way to contribute to this project, though.

Out of the box, the extension doesn't load in VS, so I set the second checkmark in project's properties:
img

The extension can't be debugged (screenshot taken when VS has a csharp document loaded)
img

Both ActivityLog and VS indicate that the extension is loaded:

  <entry>
    <record>525</record>
    <time>2015/11/10 21:58:33.279</time>
    <type>Information</type>
    <source>Extension Manager</source>
    <description>Extension is enabled...</description>
    <path>C:\USERS\AMADE\APPDATA\LOCAL\MICROSOFT\VISUALSTUDIO\14.0ROSLYNDEV\EXTENSIONS\MICROSOFT\CONVERT TO AUTO PROPERTY FOR C#\42.42.42.42\</path>
  </entry>

img

Are there some steps that I'm missing?

Samples.sln is cannot locate Microsoft.CodeAnalysis dll

@zanqi commented on Wed Mar 16 2016

Version Used: Code Pulled on Mar 16th, 2016

Steps to Reproduce:

  1. Clone https://github.com/dotnet/roslyn
  2. Run the "Developer Command Prompt for VS2015" from your start menu.
  3. Navigate to the directory of your Git clone.
  4. Run Restore.cmd in the command prompt to restore NuGet packages.
  5. Run msbuild /v:m /m Roslyn.sln
  6. Open src/Samples/Samples.sln

Expected Behavior:Samples.sln can be opened without reference warnings

Actual Behavior: Step 5 built fine, but when Samples.sln is opened, all references to Microsoft.CodeAnalysis have warnings stating the dll can not be located. If there's a step needed to install these dll, please provide it on Samples and Walkthroughs

Remove docs/samples folder and all contents from the repo

@AnthonyDGreen commented on Mon Oct 26 2015

All of the Word and PDF docs in the repo have been migrated to markdown files in the wiki. You can find them here:

Getting Started

  • Getting Started - Syntax Analysis (VB | C#)
  • Getting Started - Semantic Analysis (VB | C#)
  • Getting Started - Syntax Transformation (VB | C#)

Analyzers and Code Fixes

  • How To Write an Analyzer and Code Fix (VB | C#)

Since we don't want to maintain these binary files in the repo moving forward they should be deleted.


@davkean commented on Mon Oct 26 2015

Can you point out which files in particular so that anyone can pick up this? We've also stopped marking things like as this as infrastructure, and instead assign to a team to pick up.


@AnthonyDGreen commented on Mon Oct 26 2015

This entire folder: https://github.com/dotnet/roslyn/tree/master/docs/samples


@TheXenocide commented on Wed Dec 13 2017

I was going to open a separate ticket, but it seems like this may be related to the fact that the links don't work in this documentation (linked to from the main repository readme/front page of the roslyn repo github page): https://github.com/dotnet/roslyn/wiki/Samples-and-Walkthroughs

Samples and Walkthroughs->Getting Started->Semantic Analysis

@daking2014 commented on Thu May 28 2015

On the Samples and Walkthroughs page, the Getting Started: Semantic Analysis walkthrough, says to create a C# Roslyn Console Application project by going File-> New-> Project -> Visual C# -> Roslyn -> Console Application. However, I don’t have a Rosyln option under Visual C#.


@Pilchie commented on Fri May 29 2015

The templates have moved to the Extensibility node in the new project dialog. That one is now called "Standalone Code Analysis Project".

Tag @AnthonyDGreen and @jmarolf

Remove docs/samples folder and all contents from the repo

@AnthonyDGreen commented on Mon Oct 26 2015

All of the Word and PDF docs in the repo have been migrated to markdown files in the wiki. You can find them here:

Getting Started

  • Getting Started - Syntax Analysis (VB | C#)
  • Getting Started - Semantic Analysis (VB | C#)
  • Getting Started - Syntax Transformation (VB | C#)

Analyzers and Code Fixes

  • How To Write an Analyzer and Code Fix (VB | C#)

Since we don't want to maintain these binary files in the repo moving forward they should be deleted.


@davkean commented on Mon Oct 26 2015

Can you point out which files in particular so that anyone can pick up this? We've also stopped marking things like as this as infrastructure, and instead assign to a team to pick up.


@AnthonyDGreen commented on Mon Oct 26 2015

This entire folder: https://github.com/dotnet/roslyn/tree/master/docs/samples


@TheXenocide commented on Wed Dec 13 2017

I was going to open a separate ticket, but it seems like this may be related to the fact that the links don't work in this documentation (linked to from the main repository readme/front page of the roslyn repo github page): https://github.com/dotnet/roslyn/wiki/Samples-and-Walkthroughs

VS integration nuget should specify its dependency on exact version of Immutable

@ljw1004 commented on Tue Jun 28 2016

Version Used: VS2015 Update2, and Update3

Steps to Reproduce:

  1. File > New > C# > Extensibility > Code Refactoring (VSIX)
  2. References > Manage NuGet packages > Installed > System.Collections.Immutable > upgrade to v1.2.0
  3. Add this code:
// Add this inside the start of ComputeRefactoringsAsync:
try { test(false); }
catch (System.Exception ex) {
    System.Diagnostics.Debug.WriteLine(ex.Message);
}

// This is the method "test":
void test(bool b)
{
    if (!b) return;
    Solution s = null;
    s.GetDocumentIdsWithFilePath("");
}

Expected Behavior:

It should either work at runtime, or give a build-time error.

Actual Behavior:

It builds okay. At runtime it never enters method test. Instead it hits the catch block with exception Could not load System.Collections.Immutable v1.2.0

Discussion:

I believe that the Visual Studio process already has a particular version of System.Collections.Immutable loaded into its address space. This seems to be version 1.1.37 in both Update2 and Update3.

Now my VSIX comes along and is loaded into the same address space. It had been compiled against v1.2.0 of System.Collections.Immutable, but only v1.1.37 is loaded.

When I attempt to invoke my method test() which contains calls to a Roslyn API which returns an immutable array (e.g. Solution.GetDocumentIdsWithFilePath) then upon first entry to this method, the JIT tries to load all types it needs to compile this method. But it's unable to load System.Collections.Immutable. It therefore fails to JIT my method test().

This is all really subtle and hard to discover, and easy to run into...

  • The File>New>Refactoring template happens to avoid it because File>New spits out a NuGet reference to System.Collections.Immutable v1.1.36. But NuGet users are likely to upgrade their packages just to get rid of the irritating NuGet "updates available" flag.
  • It's not even clear to the user why System.Collections.Immutable reference is even there. A tidy-minded user is likely to switch over to project.json, and then only use the minimum set of NuGet references (just Microsoft.CodeAnalysis.CSharp.Workspaces on its own will suffice).
    • Actually, when I did File>New>Refactoring, uninstalled all the nugets, created a new project.json, and installed solely the nuget Microsoft.CodeAnalysis.CSharp.Workspaces v1.2.2, then it brought in a dependency on System.Collections.Immutable 1.2.0. And I had expected this to fail like the above. But it succeeded! I don't know why!
    • When I tried to do a larger VSIX project with a few more Roslyn references - https://blogs.msdn.microsoft.com/lucian/2016/06/27/visual-studio-text-adornment-vsix-using-roslyn/ - then it did run into the System.Collections.Immutable 1.2.0 problem. I'm not sure why.

What I think should happen:

This is confusing...

  • Why does System.Collections.Immutable get updated so often?
  • Can there be a binding redirect so that VS is happy to pull in a newer version of it?
  • Should one of the nuget packages e.g. Microsoft.VisualStudio.LanguageService have a hard-coded dependency on the exact right version of System.Collections.Immutable so that NuGet doesn't silently pick a newer one?

I honestly don't know. But the status quo feels like dangerous -- it's a narrow golden path, and impossible to know that certain reasonable actions will lead you astray, and hard to debug what's gone wrong.


@ljw1004 commented on Tue Jun 28 2016

I know! Let's have a few different NuGet packages:

Microsoft.VisualStudio compatibility check for VS2015 Update 2 or higher
Microsoft.VisualStudio compatibility check for VS2015 Update 3 or higher
...

And the templates will add a reference to the appropriate one of these. These NuGet packages don't contain any libraries. All they do is have "exact version dependencies" on other NuGets, to make sure you don't pick a too-recent version of anything.

I figure the names of these packages will be self-documenting enough.


@jmarolf commented on Fri Dec 15 2017

Issue moved to dotnet/roslyn-sdk #56 via ZenHub

Add binary redirects in nuget packages for Roslyn

@jmarolf commented on Mon Jan 11 2016

See dotnet/roslyn#7654

It can be difficult to add the correct binary redirects in a console app to load a workspace and get things done in roslyn. The roslyn SDK should generate all the necessary redirects so consumers do not need to think about this,


@Pilchie commented on Mon Jan 11 2016

We should also generate the msbuild binding redirects we need for tasks that were built against MSBuild 2.0. (cc @mattwar @jasonmalinowski)


@jasonmalinowski commented on Mon Jan 11 2016

Or we should just finally implement the AppDomain, since adding stuff in the SDK doesn't help people adding Roslyn to an existing app, or upgrading their apps to newer versions of Roslyn.


@jasonmalinowski commented on Mon Jan 11 2016

Although an interesting thought: we could update our NuGet packages to include .targets which would let the MSBuild automatic app.config generation include the redirects. Was this what you were thinking of, @jmarolf?


@jmarolf commented on Mon Jan 11 2016

@jasonmalinowski Yes, we could do more in the SDK itself, but the nuget packages should know how to do this. Changing the title...

VS integration nuget should specify its dependency on exact version of Immutable

@ljw1004 commented on Tue Jun 28 2016

Version Used: VS2015 Update2, and Update3

Steps to Reproduce:

  1. File > New > C# > Extensibility > Code Refactoring (VSIX)
  2. References > Manage NuGet packages > Installed > System.Collections.Immutable > upgrade to v1.2.0
  3. Add this code:
// Add this inside the start of ComputeRefactoringsAsync:
try { test(false); }
catch (System.Exception ex) {
    System.Diagnostics.Debug.WriteLine(ex.Message);
}

// This is the method "test":
void test(bool b)
{
    if (!b) return;
    Solution s = null;
    s.GetDocumentIdsWithFilePath("");
}

Expected Behavior:

It should either work at runtime, or give a build-time error.

Actual Behavior:

It builds okay. At runtime it never enters method test. Instead it hits the catch block with exception Could not load System.Collections.Immutable v1.2.0

Discussion:

I believe that the Visual Studio process already has a particular version of System.Collections.Immutable loaded into its address space. This seems to be version 1.1.37 in both Update2 and Update3.

Now my VSIX comes along and is loaded into the same address space. It had been compiled against v1.2.0 of System.Collections.Immutable, but only v1.1.37 is loaded.

When I attempt to invoke my method test() which contains calls to a Roslyn API which returns an immutable array (e.g. Solution.GetDocumentIdsWithFilePath) then upon first entry to this method, the JIT tries to load all types it needs to compile this method. But it's unable to load System.Collections.Immutable. It therefore fails to JIT my method test().

This is all really subtle and hard to discover, and easy to run into...

  • The File>New>Refactoring template happens to avoid it because File>New spits out a NuGet reference to System.Collections.Immutable v1.1.36. But NuGet users are likely to upgrade their packages just to get rid of the irritating NuGet "updates available" flag.
  • It's not even clear to the user why System.Collections.Immutable reference is even there. A tidy-minded user is likely to switch over to project.json, and then only use the minimum set of NuGet references (just Microsoft.CodeAnalysis.CSharp.Workspaces on its own will suffice).
    • Actually, when I did File>New>Refactoring, uninstalled all the nugets, created a new project.json, and installed solely the nuget Microsoft.CodeAnalysis.CSharp.Workspaces v1.2.2, then it brought in a dependency on System.Collections.Immutable 1.2.0. And I had expected this to fail like the above. But it succeeded! I don't know why!
    • When I tried to do a larger VSIX project with a few more Roslyn references - https://blogs.msdn.microsoft.com/lucian/2016/06/27/visual-studio-text-adornment-vsix-using-roslyn/ - then it did run into the System.Collections.Immutable 1.2.0 problem. I'm not sure why.

What I think should happen:

This is confusing...

  • Why does System.Collections.Immutable get updated so often?
  • Can there be a binding redirect so that VS is happy to pull in a newer version of it?
  • Should one of the nuget packages e.g. Microsoft.VisualStudio.LanguageService have a hard-coded dependency on the exact right version of System.Collections.Immutable so that NuGet doesn't silently pick a newer one?

I honestly don't know. But the status quo feels like dangerous -- it's a narrow golden path, and impossible to know that certain reasonable actions will lead you astray, and hard to debug what's gone wrong.


@ljw1004 commented on Tue Jun 28 2016

I know! Let's have a few different NuGet packages:

Microsoft.VisualStudio compatibility check for VS2015 Update 2 or higher
Microsoft.VisualStudio compatibility check for VS2015 Update 3 or higher
...

And the templates will add a reference to the appropriate one of these. These NuGet packages don't contain any libraries. All they do is have "exact version dependencies" on other NuGets, to make sure you don't pick a too-recent version of anything.

I figure the names of these packages will be self-documenting enough.

Localization for "Download the .NET Compiler Platform SDK" template project

@mavasani commented on Mon Jun 29 2015

See attached snapshots, the messages, name of the template project and the index.html contents all seem to be non-localized in a localized VS drop.

loc_new_project_dialog
loc_download_roslyn_sdk
loc_analyzer_with_codefix_project


@mavasani commented on Mon Jun 29 2015

Additionally, the ReadMe.txt created for the Analyzer with fix project is also non-localized. Should the contents of this file also be localized?


@mavasani commented on Mon Jun 29 2015

One more observation: the comments added to the default analyzer + fix project are also in ENU. Probably they should be localized too?


@jmarolf commented on Fri Feb 19 2016

After talking to @jinujoseph I am moving this to 1.3 and hope to get the authoring in immediately after 1.2 ships

VSSDK1081 occurs on ConvertToConditional sample

@jmarolf commented on Sun Feb 26 2017

Occured in this run:

C:\Users\dotnet-bot\.nuget\packages\Microsoft.VSSDK.BuildTools\15.0.26124-RC3\tools\VSSDK\Microsoft.VsSDK.targets(680,5): error VSSDK1081: Problem occurred while extracting the vsix to the experimental extensions path. [D:\j\workspace\windows_relea---8a39a417\src\Samples\CSharp\ConvertToConditional\Impl\ConvertToConditionalCS.csproj]

@Pilchie commented on Mon Feb 27 2017

@AlexEyler Looks like another case of the build targets running into problems in our CI runs.


@Pilchie commented on Mon Feb 27 2017

Tagging @jaredpar, @jasonmalinowski, @tannergooding too.


@jaredpar commented on Mon Feb 27 2017

Is there a need to deploy samples as a part of the CI runs?


@Pilchie commented on Mon Feb 27 2017

Good point, and no, I don't think they should ever be deployed in CI runs.


@AlexEyler commented on Mon Feb 27 2017

I have a bug on my plate to improve this error message (so it includes the exception message at least) - usually it comes as a result of a file being in use while we're trying to overwrite it via the Unzip method, but I'm not sure in this case.

Localize Roslyn SDK

Currently we generate the xlf files but do not have translations and do not ship the resource files

Template analyzer test are inconsistent multiple occurrences if multiple fixes

@KathleenDollard commented on Sat Mar 14 2015

This issue arises in testing code fixes with the default template test infrastructure.

Definitions:
"Multiple occurrences" for a test is a single string that has multiple triggering occurrences.
"Multiple fixes" is a code fix that offers more than one option

If the file is being tested for a single fix (null is passed for the codeFixIndex), then multiple occurrences are applied to the file before comparison.

If there are multiple fixes and a specific fix is being tested (a value is passed for codeFixIndex), then only the first occurrence is applied.

This occurs because of the conditional and break around line 92-96 of CodeFixVerifier.cs (the codeFixIndex is explicitly compared to null, and the break results in the inconsistent behavior).

All code occurrences of the requested code fix should be tested prior to comparing the document.

Samples should use reference assemblies, not runtime assemblies as references

@tmat commented on Mon Jun 08 2015

Currently Roslyn samples are using runtime assemblies such as mscorlib and System for metadata references passed to compilation. That limits their usage to Desktop CLR only. If someone copies the sample to Project K (or Core CLR in general) it won’t work.

Most of the samples might just work with portable reference assemblies, of if not they could still target Desktop FX reference assemblies even when running on Core CLR. But they should certainly use reference assemblies.

Sample(s) of C# editor extensibility leveraging Roslyn semantic analysis

@dsaf commented on Mon Feb 16 2015

It seems that compiler and editor extensions are separate worlds at the moment:

http://www.visualstudio.com/integrate/explore/explore-vside-vsi

It would be great to have some documentation on how to bridge them.

For example:

  1. Basic: extend the C# editor to show a tooltip on class name displaying the full inheritance chain; bonus point: make the chain navigatable.

  2. Medium: extend the C# editor to show an adorner on every method call giving details of every exception it might throw; bonus point: make details actionable - generate try-catch blocks.

  3. Advanced: create a basic custom DSL with C#-powered intellisense and simple rename refactoring; bonus point: jump-to C# implementation navigation.

Roslyn could be a great boost to extensions gallery not just analyzers. Look at JetBrains - they are reluctant to update their SDK samples, and there are much less extensions for R# then there should be.

PS: 2012/2013 would be great, 2015 is also OK.


@dsaf commented on Tue Feb 17 2015

To be more practical: is there any way I can get the whole solution's semantic model in an editor extension? What are the performance implications of doing this in many extensions?


@SLaks commented on Tue Feb 17 2015

To answer your specific question:

If you have a TextBuffer, use http://source.roslyn.io/#Microsoft.CodeAnalysis.EditorFeatures.Text/Extensions.cs,66.

If you don't, MEF-import http://source.roslyn.io/#Microsoft.VisualStudio.LanguageServices/Implementation/ProjectSystem/VisualStudioWorkspace.cs,17


@SLaks commented on Tue Feb 17 2015

For less-specific information, see http://blog.slaks.net/2014-04-07/exploring-roslyn-part-1-introduction/.
I still need to update this for the more-recent changes (the desktop/portable split, and the fact that everything is now open-source)


@Pilchie commented on Tue Feb 24 2015

This is not something the team is likely to work on, however, we'd be happy to incorporate or link to samples others want to write.

FAQ is useless (2/12/2015)

@GitUID commented on Thu Feb 12 2015

SDK Preview that is vital to FAQ answers is no longer available, making the the majority of the answers useless at the moment.


@JoshVarty commented on Fri Feb 13 2015

I started writing the markdown to inline the answers within the FAQ, but having the code for both C# and VB .Net made the page absolutely enormous. That being said, I strongly believe the code samples should accompany the questions they answer. Even when the SDK Preview was available, it was a huge pain to navigate back and forth.

I tried to figure out if you could create collapsible sections within GitHub markdown, but it doesn't appear that you can.

I'm thinking about hosting the FAQ independently on my Learn Roslyn Now series, but I'm not convinced that this will do much good for the project here. (But it does help people who search for keywords within the FAQ)


@ilmax commented on Tue Mar 03 2015

Any news on this?


@JoshVarty commented on Sat Mar 07 2015

The referenced samples are available on GitHub.

C#: https://github.com/dotnet/roslyn/blob/b6484300dfafb43af0c27e542ec457a7583e1aa8/src/Samples/CSharp/APISampleUnitTests/FAQ.cs

VB: https://github.com/dotnet/roslyn/blob/da4dbf98e894a20fc4234eede11d7c78e559cea1/src/Samples/VisualBasic/APISampleUnitTests/FAQ.vb

However, the formatting has taken a hit as these have been copied from at least three prior homes. The answers are also a little dated and reference IWorkspace and Roslyn.Services.dll. One question "How do I compile some code into a collectible type or DynamicMethod" is missing completely.

I've rehosted the questions alongside the code at: https://joshvarty.wordpress.com/roslynfaq/csharp/

I'll continue to clean up the formatting this weekend and then begin correcting individual answers.


@davkean commented on Tue Oct 20 2015

@AnthonyDGreen What's the plan around this

Samples won't compile with nuget packages

@philippe-lavoie commented on Tue Dec 15 2015

I can't do OpenSolutionAsync on my code. I thought I'd have a better chance with the code in samples, but to no avail.

I started by using nuget microsoft.codeanalysis.csharp.workspaces.
Then fakesign was missing for an unknown reason, I installed that nuget too
Then immutable collections where missing, I isntalled that too

and now it won't compile... I get

1> C:\Program Files (x86)\MSBuild\14.0\bin\csc.exe /noconfig /checked- /nowarn:1591,1701,1702,2008 /nostdlib+ /platform:anycpu32bitpreferred /errorreport:prompt /warn:4 /doc:C:\projects\roslyn\Binaries\Debug\FormatSolution.xml /define:DEBUG;TRACE /errorendlocation /preferreduilang:en-US /highentropyva+ /reference:C:\projects\packages\Microsoft.CodeAnalysis.CSharp.1.0.0\lib\net45\Microsoft.CodeAnalysis.CSharp.dll /reference:C:\projects\packages\Microsoft.CodeAnalysis.CSharp.Workspaces.1.0.0\lib\net45\Microsoft.CodeAnalysis.CSharp.Workspaces.dll /reference:C:\projects\packages\Microsoft.CodeAnalysis.Common.1.0.0\lib\net45\Microsoft.CodeAnalysis.dll /reference:C:\projects\packages\Microsoft.CodeAnalysis.Workspaces.Common.1.0.0\lib\net45\Microsoft.CodeAnalysis.Workspaces.Desktop.dll /reference:C:\projects\packages\Microsoft.CodeAnalysis.Workspaces.Common.1.0.0\lib\net45\Microsoft.CodeAnalysis.Workspaces.dll /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.2\mscorlib.dll" /reference:C:\projects\packages\System.Collections.Immutable.1.1.36\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll /reference:C:\projects\packages\Microsoft.Composition.1.0.27\lib\portable-net45+win8+wp8+wpa81\System.Composition.AttributedModel.dll /reference:C:\projects\packages\Microsoft.Composition.1.0.27\lib\portable-net45+win8+wp8+wpa81\System.Composition.Convention.dll /reference:C:\projects\packages\Microsoft.Composition.1.0.27\lib\portable-net45+win8+wp8+wpa81\System.Composition.Hosting.dll /reference:C:\projects\packages\Microsoft.Composition.1.0.27\lib\portable-net45+win8+wp8+wpa81\System.Composition.Runtime.dll /reference:C:\projects\packages\Microsoft.Composition.1.0.27\lib\portable-net45+win8+wp8+wpa81\System.Composition.TypedParts.dll /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.2\System.Core.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.2\System.dll" /reference:C:\projects\packages\System.Reflection.Metadata.1.0.21\lib\portable-net45+win8\System.Reflection.Metadata.dll /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.2\Facades\System.Collections.Concurrent.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.2\Facades\System.Collections.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.2\Facades\System.ComponentModel.Annotations.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.2\Facades\System.ComponentModel.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.2\Facades\System.ComponentModel.EventBasedAsync.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.2\Facades\System.Diagnostics.Contracts.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.2\Facades\System.Diagnostics.Debug.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.2\Facades\System.Diagnostics.Tools.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.2\Facades\System.Diagnostics.Tracing.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.2\Facades\System.Dynamic.Runtime.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.2\Facades\System.Globalization.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.2\Facades\System.IO.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.2\Facades\System.Linq.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.2\Facades\System.Linq.Expressions.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.2\Facades\System.Linq.Parallel.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.2\Facades\System.Linq.Queryable.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.2\Facades\System.Net.NetworkInformation.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.2\Facades\System.Net.Primitives.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.2\Facades\System.Net.Requests.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.2\Facades\System.ObjectModel.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.2\Facades\System.Reflection.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.2\Facades\System.Reflection.Emit.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.2\Facades\System.Reflection.Emit.ILGeneration.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.2\Facades\System.Reflection.Emit.Lightweight.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.2\Facades\System.Reflection.Extensions.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.2\Facades\System.Reflection.Primitives.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.2\Facades\System.Resources.ResourceManager.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.2\Facades\System.Runtime.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.2\Facades\System.Runtime.Extensions.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.2\Facades\System.Runtime.InteropServices.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.2\Facades\System.Runtime.InteropServices.WindowsRuntime.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.2\Facades\System.Runtime.Numerics.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.2\Facades\System.Runtime.Serialization.Json.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.2\Facades\System.Runtime.Serialization.Primitives.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.2\Facades\System.Runtime.Serialization.Xml.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.2\Facades\System.Security.Principal.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.2\Facades\System.ServiceModel.Duplex.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.2\Facades\System.ServiceModel.Http.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.2\Facades\System.ServiceModel.NetTcp.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.2\Facades\System.ServiceModel.Primitives.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.2\Facades\System.ServiceModel.Security.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.2\Facades\System.Text.Encoding.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.2\Facades\System.Text.Encoding.Extensions.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.2\Facades\System.Text.RegularExpressions.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.2\Facades\System.Threading.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.2\Facades\System.Threading.Tasks.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.2\Facades\System.Threading.Tasks.Parallel.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.2\Facades\System.Threading.Timer.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.2\Facades\System.Xml.ReaderWriter.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.2\Facades\System.Xml.XDocument.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.2\Facades\System.Xml.XmlSerializer.dll" /debug+ /debug:full /delaysign+ /filealign:512 /keyfile:"C:\projects\roslyn\build\Strong Name Keys\35MSSharedLib1024.snk" /optimize- /out:C:\projects\roslyn\Binaries\Obj\FormatSolutionCS\Debug\FormatSolution.exe /ruleset:C:\projects\roslyn\build\Rulesets\Roslyn.ruleset /subsystemversion:6.00 /target:exe /utf8output /analyzer:..........\packages\Microsoft.CodeAnalysis.Analyzers.1.0.0\analyzers\dotnet\cs\Microsoft.CodeAnalysis.Analyzers.dll /analyzer:..........\packages\Microsoft.CodeAnalysis.Analyzers.1.0.0\analyzers\dotnet\cs\Microsoft.CodeAnalysis.CSharp.Analyzers.dll Program.cs Properties\AssemblyInfo.cs "C:\Users\plavoie\AppData\Local\Temp\2.NETFramework,Version=v4.5.2.AssemblyAttributes.cs" C:\projects\roslyn\Binaries\Obj\FormatSolutionCS\Debug\GeneratedAssemblyInfo_42.42.42.42.cs C:\projects\roslyn\Binaries\Obj\FormatSolutionCS\Debug\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs C:\projects\roslyn\Binaries\Obj\FormatSolutionCS\Debug\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs C:\projects\roslyn\Binaries\Obj\FormatSolutionCS\Debug\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
1>CSC : error AD0001: The Compiler Analyzer 'Microsoft.CodeAnalysis.CSharp.Analyzers.FixAnalyzers.CSharpFixerWithFixAllAnalyzer' threw an exception of type 'System.TypeInitializationException' with message 'The type initializer for 'Microsoft.CodeAnalysis.Analyzers.FixAnalyzers.FixerWithFixAllAnalyzer`1' threw an exception.'.

That's when I decide to give up... I don't even want to analyze anything, why can't it just compile?


@Linchy commented on Tue Dec 15 2015

I too have/had problems with nuget. What I had to do was download these packages manually:
https://www.nuget.org/packages/System.Collections.Immutable
https://www.nuget.org/packages/System.Reflection.Metadata

Then, in the complaining projects:

  1. Edit the project.json to remove the nuget references to those packages
  2. Close solution, and re-open
  3. Add references to those downloaded DLLs via the reference manager for the project.

This isn't ideal, but the only thing I found that worked! If you get problems with Composition still afterwards too, then you may have to do the same with that (although I think that's a collection of DLLs)

VB Sample ConvertToAutoPropertyVB doesn't execute

@paul1956 commented on Fri Jun 26 2015

The VB Sample ConvertToAutoPropertyVB and a Refactoring I wrong also fail to execute with identical errors. They load in a new instance of VS 2015 RC, you get the lightbulb but you don't get any options,

You get to
context.RegisterRefactoring(
New ConvertToAutopropertyCodeAction("Convert to auto property",
Function(c) ConvertToAutoAsync(document, propertyBlock, c)))
but never get to ConvertToAutoAsync

Problem signature:
Problem Event Name: CLR20r3
Problem Signature 01: devenv.exe
Problem Signature 02: 14.0.22823.1
Problem Signature 03: 5538ad9e
Problem Signature 04: Microsoft.CodeAnalysis.VisualBasic
Problem Signature 05: 1.0.0.50411
Problem Signature 06: 55295a76
Problem Signature 07: 550d
Problem Signature 08: 0
Problem Signature 09: System.AggregateException
OS Version: 6.3.9600.2.0.0.400.8
Locale ID: 1033
Additional Information 1: 5861
Additional Information 2: 5861822e1919d7c014bbb064c64908b2
Additional Information 3: a10f
Additional Information 4: a10ff7d2bb2516fdc753f9c34fc3b069

Failed to Loading “Samples.sln” with VS2015 upDate3

@longmarchw commented on Sun Mar 12 2017

Version Used:
#17762
Steps to Reproduce:

  1. Loading “Samples.sln” with VS2015 Professional upDate3
  2. notic:need VS2015 upDate1
  3. Loading failed

Expected Behavior:
Loading OK
Actual Behavior:
Loading failed
default

------------Why ? Plz。


@Pilchie commented on Tue Mar 14 2017

That error message likely means that you don't have the Visual Studio SDK installed. However, in general Roslyn requires VS2017 to build now.


@longmarchw commented on Tue Mar 14 2017

Thanks for your reply!
I open it and rebuliding it in vs2017 pro , but got many error,like:

“error MSB4062: 未能从程序集 C:\Users\longm.nuget\packages\Roslyn.Build.Util\0.9.4-portable\lib\dotnet\Roslyn.MSBuild.Util.dll 加载任务“Roslyn.MSBuild.Util.WriteCodeFragmentEx”。未能加载文件或程序集“file:///C:\Users\longm.nuget\packages\Roslyn.Build.Util\0.9.4-portable\lib\dotnet\Roslyn.MSBuild.Util.dll”或它的某一个依赖项。系统找不到指定的文件。 请确认 声明正确,该程序集及其所有依赖项都可用,并且该任务包含实现 Microsoft.Build.Framework.ITask 的公共类。”

How should I to do ?

发送自 Windows 10 版邮件https://go.microsoft.com/fwlink/?LinkId=550986应用

发件人: Kevin Pilchmailto:[email protected]
发送时间: 2017年3月15日 5:42
收件人: dotnet/roslynmailto:[email protected]
抄送: longmarchwmailto:[email protected]; Authormailto:[email protected]
主题: Re: [dotnet/roslyn] Failed to Loading “Samples.sln” with VS2015 upDate3 (#17771)

That error message likely means that you don't have the Visual Studio SDK installed. However, in general Roslyn requires VS2017 to build now.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubdotnet/roslyn#17771 (comment), or mute the threadhttps://github.com/notifications/unsubscribe-auth/AF5ZqvDGT-w8LTaBkhYf7rwvJwc8md9iks5rlwm2gaJpZM4MayEh.


@Pilchie commented on Thu Mar 16 2017

I'm afraid I don't recognize enough about that error message to help. Would it be possible to post the English version?

Also tagging @agocke generally for Roslyn.MSBuild.Util.WriteCodeFragmentEx.


@agocke commented on Thu Mar 16 2017

@longmarchw Did you run Restore.cmd before opening the solution?

Visual Studio 2017 "Stand-Alone Code Analysis Tool" missing Microsoft.Build, Version=14.0.0.

@aodendaal commented on Fri Mar 24 2017

Version Used:

Steps to Reproduce:

  1. Install Visual Studio Enterprise 2017 and include Visual Studio extension development workload with optional VC++ 2017 v141 toolset (x86,x64)
  2. Run VS and go to Tools -> Extensions and Updates
  3. Find .NET Compiler Platform SDK and click Download
  4. Restart VS
  5. Create a new Stand-Alone Code Analysis Tool project found under Templates -> Visual C# -> Extensibility (.NET Framework 4.6 or greater)
  6. In the Main function write
    var workspace = Microsoft.CodeAnalysis.MSBuild.MSBuildWorkspace.Create();
  7. Run Debug

Expected Behavior:
Code executes without exceptions

Actual Behavior:
System.Reflection.ReflectionTypeLoadException raised with multiple of the same LoaderExceptions:
Could not load file or assembly 'Microsoft.Build, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
Could not load file or assembly 'Microsoft.Build.Tasks.Core, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

I tried adding a reference to Microsoft.Build and Microsoft.Build.Tasks.Core but I only have versions 4.0.0.0 and 15.1.0.0

How do I get the correct references because either the template is using old references or I'm missing the older versions


@jmarolf commented on Fri Mar 24 2017

@aodendaal a workaround here would be:

  1. Add an App.config file to your console project with the following contents
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="Microsoft.Build"
                          publicKeyToken="b03f5f7f11d50a3a"
                          culture="neutral" />
        <bindingRedirect oldVersion="14.0.0.0"
                         newVersion="15.1.0.0"/>
      </dependentAssembly>
    </assemblyBinding>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="Microsoft.Build.Framework"
                          publicKeyToken="b03f5f7f11d50a3a"
                          culture="neutral" />
        <bindingRedirect oldVersion="14.0.0.0"
                         newVersion="15.1.0.0"/>
      </dependentAssembly>
    </assemblyBinding>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="Microsoft.Build.Tasks.Core"
                          publicKeyToken="b03f5f7f11d50a3a"
                          culture="neutral" />
        <bindingRedirect oldVersion="14.0.0.0"
                         newVersion="15.1.0.0"/>
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>
  1. Add 15.1 references to Microsoft.Build, Microsoft.Build.Framework, and Microsoft.Build.Tasks.Core

@aodendaal commented on Fri Mar 24 2017

Thanks! That works.

I also had to apply a bindingRedirect for System.Collections.Immutable

    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="System.Collections.Immutable"
                          publicKeyToken="b03f5f7f11d50a3a"
                          culture="neutral" />
        <bindingRedirect oldVersion="1.1.36.0"
                         newVersion="1.2.1.0"/>
      </dependentAssembly>
    </assemblyBinding>

---

@jmarolf commented on [Fri Mar 24 2017](https://github.com/dotnet/roslyn/issues/18140#issuecomment-289049094)

@asecchia I think the fix here is to have the templates add the redirects and msbuild references automatically for you.  Thanks for reporting this bug.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.