fix framework assembly resolution for net35 (#2557)

This commit is contained in:
Andrew Stanton-Nurse 2016-04-20 11:54:42 -07:00
parent e8eaebdaeb
commit 7c688eea7f
3 changed files with 33 additions and 11 deletions

View file

@ -1,4 +1,5 @@
using System;
using System.Xml;
namespace ConsoleApplication
{
@ -7,6 +8,10 @@ namespace ConsoleApplication
public static void Main()
{
Console.WriteLine("Hello World!");
#if NET20 || NET35 || NET45 || NET461
// Force XmlDocument to be used
var doc = new XmlDocument();
#endif
}
}
}

View file

@ -5,11 +5,28 @@
},
"dependencies": {},
"frameworks": {
"net20": {},
"net35": {},
"net40": {},
"net461": {},
"net20": {
"frameworkAssemblies": {
"System.Xml": {}
}
},
"net35": {
"frameworkAssemblies": {
"System.Xml": {}
}
},
"net40": {
"frameworkAssemblies": {
"System.Xml": {}
}
},
"net461": {
"frameworkAssemblies": {
"System.Xml": {}
}
},
"netstandard1.5": {
"imports": "dnxcore50",
"dependencies": {
"NETStandard.Library": "1.5.0-rc2-24018"
}

View file

@ -210,7 +210,7 @@ namespace Microsoft.DotNet.ProjectModel.Resolution
// Check for legacy frameworks
if (PlatformServices.Default.Runtime.OperatingSystemPlatform == Platform.Windows &&
targetFramework.IsDesktop() &&
targetFramework.Version <= new Version(3, 5))
targetFramework.Version <= new Version(3, 5, 0, 0))
{
return GetLegacyFrameworkInformation(targetFramework, referenceAssembliesPath);
}