Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion eng/restore-toolset.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function InitializeCustomSDKToolset {
InstallDotNetSharedFramework "1.0.5"
InstallDotNetSharedFramework "1.1.2"
InstallDotNetSharedFramework "2.1.0"
InstallDotNetSharedFramework "2.2.5"
InstallDotNetSharedFramework "2.2.6"

CreateBuildEnvScript
InstallNuget
Expand Down
2 changes: 1 addition & 1 deletion eng/restore-toolset.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function InitializeCustomSDKToolset {
InstallDotNetSharedFramework "1.0.5"
InstallDotNetSharedFramework "1.1.2"
InstallDotNetSharedFramework "2.1.0"
InstallDotNetSharedFramework "2.2.5"
InstallDotNetSharedFramework "2.2.6"
}

# Installs additional shared frameworks for testing purposes
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"tools": {
"dotnet": "3.0.100-preview8-012830",
"dotnet": "3.0.100-preview8-013410",
"vs-opt": {
"version": "15.9"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,14 @@ private void AddReferencesFromFrameworkList(string frameworkListPath, string tar
}
}

string referencedByDefaultAttributeValue = fileElement.Attribute("ReferencedByDefault")?.Value;
if (referencedByDefaultAttributeValue != null &&
referencedByDefaultAttributeValue.Equals("false", StringComparison.OrdinalIgnoreCase))
{
// Don't automatically reference this assembly if it has ReferencedByDefault="false"
continue;
}

var dllPath = Path.Combine(targetingPackDllFolder, assemblyName + ".dll");
var referenceItem = CreateReferenceItem(dllPath, targetingPack);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -792,7 +792,7 @@ public void WindowsFormsFrameworkReference(bool selfContained)
TestFrameworkReferenceProfiles(
frameworkReferences: new [] { "Microsoft.WindowsDesktop.App.WindowsForms" },
expectedReferenceNames: new[] { "Microsoft.Win32.Registry", "System.Windows.Forms" },
notExpectedReferenceNames: new[] { "System.Windows.Presentation", "WindowsFormsIntegration" },
notExpectedReferenceNames: new[] { "System.Windows.Presentation", "WindowsFormsIntegration", "PresentationFramework.Aero" },
selfContained);
}

Expand All @@ -804,7 +804,7 @@ public void WPFFrameworkReference(bool selfContained)
TestFrameworkReferenceProfiles(
frameworkReferences: new[] { "Microsoft.WindowsDesktop.App.WPF" },
expectedReferenceNames: new[] { "Microsoft.Win32.Registry", "System.Windows.Presentation" },
notExpectedReferenceNames: new[] { "System.Windows.Forms", "WindowsFormsIntegration" },
notExpectedReferenceNames: new[] { "System.Windows.Forms", "WindowsFormsIntegration", "PresentationFramework.Aero" },
selfContained);
}

Expand All @@ -816,7 +816,7 @@ public void WindowsFormAndWPFFrameworkReference(bool selfContained)
TestFrameworkReferenceProfiles(
frameworkReferences: new[] { "Microsoft.WindowsDesktop.App.WindowsForms", "Microsoft.WindowsDesktop.App.WPF" },
expectedReferenceNames: new[] { "Microsoft.Win32.Registry", "System.Windows.Forms", "System.Windows.Presentation" },
notExpectedReferenceNames: new[] { "WindowsFormsIntegration" },
notExpectedReferenceNames: new[] { "WindowsFormsIntegration", "PresentationFramework.Aero" },
selfContained);
}

Expand All @@ -829,7 +829,7 @@ public void WindowsDesktopFrameworkReference(bool selfContained)
frameworkReferences: new[] { "Microsoft.WindowsDesktop.App" },
expectedReferenceNames: new[] { "Microsoft.Win32.Registry", "System.Windows.Forms",
"System.Windows.Presentation", "WindowsFormsIntegration" },
notExpectedReferenceNames: Enumerable.Empty<string>(),
notExpectedReferenceNames: new[] { "PresentationFramework.Aero" },
selfContained);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@ public void It_publishes_the_project_with_a_refs_folder_and_correct_deps_file(st
testAsset.Restore(Log, "TestApp");

var appProjectDirectory = Path.Combine(testAsset.TestRoot, "TestApp");

var getValuesCommand = new GetValuesCommand(Log, appProjectDirectory, testProject.TargetFrameworks, "LangVersion");
getValuesCommand.Execute().Should().Pass();

var langVersion = getValuesCommand.GetValues().FirstOrDefault() ?? string.Empty;

var publishCommand = new PublishCommand(Log, appProjectDirectory);

publishCommand
Expand Down Expand Up @@ -114,7 +120,7 @@ public void It_publishes_the_project_with_a_refs_folder_and_correct_deps_file(st
}

dependencyContext.CompilationOptions.Defines.Should().BeEquivalentTo(expectedDefines);
dependencyContext.CompilationOptions.LanguageVersion.Should().BeOneOf("", "preview");
dependencyContext.CompilationOptions.LanguageVersion.Should().Be(langVersion);
dependencyContext.CompilationOptions.Platform.Should().Be("x86");
dependencyContext.CompilationOptions.Optimize.Should().Be(false);
dependencyContext.CompilationOptions.KeyFile.Should().Be("");
Expand Down