简体   繁体   中英

Cannot create a sub project when using the Diagnostics solution template

I installed

  • Visual Studio 2015 RC
  • Visual Studio 2015 RC SDK
  • .NET Compiler Platform SDK Templates
  • .NET Compiler Platform Syntax Visualizer

However when I now try to create a "Diagnostic with Code Fix" I receive this error:

A problem was encountered creating the sub project. The imported project " C:\\Program Files (x86)\\MSBuild\\Microsoft\\Portable\\v4.5.2\\Microsoft.Portable.CSharp.targets " was not found.

Afterwards I receive two more error messages which seem to stem from this. These error messages occur as VS is trying to create the other projects in the solution template.

在此处输入图片说明

在此处输入图片说明

在此处输入图片说明

When I look at the folder in question, I see this structure:

在此处输入图片说明

I copied the contents of v4.6 and put it in a folder named v4.5.2 which indeed resolved the problem when creating the projects, but this causes build errors: System.Runtime isn't added to the projects and manually adding it causes Visual Studio to crash and the projects to become invalid.

I already repaired the entire installation, which didn't make a difference. Visual Studio 2013 runs alongside 2015.

I assume I must be missing a vital component but I can't find any indication as to what that might be. Any suggestions?

在创建项目之前,请尝试将新项目对话框顶部的目标框架版本更改为4.5。

You say you are using these templates

  • .NET Compiler Platform SDK Templates
  • .NET Compiler Platform Syntax Visualize

Are they the RC templates

Or the Preview templates from November?

I ask because there was a bug that caused you to reference the wrong portable targets in the Preview templates, but that should be fixed for RC.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM