提交 8d9b037b 编写于 作者: J joj 提交者: Kevin Ransom (msft)

Only show retargeting dialog for .NetFramework projects (#3206)

There's several reasons for this, the most important being that only .NetFramework projects will provide a useful download. Also, not doing this resulted in a bug for Xamarin projects (Issue 2992). This fix is identical to what other projects do in Visual Studio.
上级 e7f7e5fe
......@@ -6442,10 +6442,14 @@ internal ExtensibilityEventsHelper ExtensibilityEventsHelper
private bool IsTargetFrameworkInstalled()
{
var targetFrameworkMoniker = new System.Runtime.Versioning.FrameworkName(GetTargetFrameworkMoniker());
//Only check for .NetFramework. The expectation is that other frameworks will perform any checks themselves.
if (targetFrameworkMoniker.Identifier != ".NetFramework")
return true;
var multiTargeting = this.site.GetService(typeof(SVsFrameworkMultiTargeting)) as IVsFrameworkMultiTargeting;
Array frameworks;
Marshal.ThrowExceptionForHR(multiTargeting.GetSupportedFrameworks(out frameworks));
var targetFrameworkMoniker = new System.Runtime.Versioning.FrameworkName(GetTargetFrameworkMoniker());
foreach (string fx in frameworks)
{
uint compat;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册