fix framework assembly resolution for net35 (#2557)
This commit is contained in:
parent
e8eaebdaeb
commit
7c688eea7f
3 changed files with 33 additions and 11 deletions
|
@ -1,4 +1,5 @@
|
||||||
using System;
|
using System;
|
||||||
|
using System.Xml;
|
||||||
|
|
||||||
namespace ConsoleApplication
|
namespace ConsoleApplication
|
||||||
{
|
{
|
||||||
|
@ -7,6 +8,10 @@ namespace ConsoleApplication
|
||||||
public static void Main()
|
public static void Main()
|
||||||
{
|
{
|
||||||
Console.WriteLine("Hello World!");
|
Console.WriteLine("Hello World!");
|
||||||
|
#if NET20 || NET35 || NET45 || NET461
|
||||||
|
// Force XmlDocument to be used
|
||||||
|
var doc = new XmlDocument();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,11 +5,28 @@
|
||||||
},
|
},
|
||||||
"dependencies": {},
|
"dependencies": {},
|
||||||
"frameworks": {
|
"frameworks": {
|
||||||
"net20": {},
|
"net20": {
|
||||||
"net35": {},
|
"frameworkAssemblies": {
|
||||||
"net40": {},
|
"System.Xml": {}
|
||||||
"net461": {},
|
}
|
||||||
|
},
|
||||||
|
"net35": {
|
||||||
|
"frameworkAssemblies": {
|
||||||
|
"System.Xml": {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"net40": {
|
||||||
|
"frameworkAssemblies": {
|
||||||
|
"System.Xml": {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"net461": {
|
||||||
|
"frameworkAssemblies": {
|
||||||
|
"System.Xml": {}
|
||||||
|
}
|
||||||
|
},
|
||||||
"netstandard1.5": {
|
"netstandard1.5": {
|
||||||
|
"imports": "dnxcore50",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"NETStandard.Library": "1.5.0-rc2-24018"
|
"NETStandard.Library": "1.5.0-rc2-24018"
|
||||||
}
|
}
|
||||||
|
|
|
@ -210,7 +210,7 @@ namespace Microsoft.DotNet.ProjectModel.Resolution
|
||||||
// Check for legacy frameworks
|
// Check for legacy frameworks
|
||||||
if (PlatformServices.Default.Runtime.OperatingSystemPlatform == Platform.Windows &&
|
if (PlatformServices.Default.Runtime.OperatingSystemPlatform == Platform.Windows &&
|
||||||
targetFramework.IsDesktop() &&
|
targetFramework.IsDesktop() &&
|
||||||
targetFramework.Version <= new Version(3, 5))
|
targetFramework.Version <= new Version(3, 5, 0, 0))
|
||||||
{
|
{
|
||||||
return GetLegacyFrameworkInformation(targetFramework, referenceAssembliesPath);
|
return GetLegacyFrameworkInformation(targetFramework, referenceAssembliesPath);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue