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
3 changes: 3 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
all cases, rather than ordinarily where we build them during mobile or wasm
build legs. This makes the manifests available on source-only builds. -->
<ForceBuildMobileManifests Condition="'$(DotNetBuildSourceOnly)' == 'true'">true</ForceBuildMobileManifests>
<!-- Propagate the configuration and platform to project references. When building in VS, this defaults to true.
Explicitly setting it to false ensures projects are built in the corresponding configuration both in VS and on the command line. -->
<ShouldUnsetParentConfigurationAndPlatform>false</ShouldUnsetParentConfigurationAndPlatform>
</PropertyGroup>

<PropertyGroup Label="CalculateTargetOS">
Expand Down
5 changes: 5 additions & 0 deletions docs/workflow/testing/host/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@ The `category!=failing` is to respect the [filtering traits](../libraries/filter
### Visual Studio

The [Microsoft.DotNet.CoreSetup.sln](/src/installer/Microsoft.DotNet.CoreSetup.sln) can be used to run and debug host tests through Visual Studio. When using the solution, the product should have already been [built](#building-tests) and the [test context](#test-context) set up.
If you built the runtime or libraries with a different configuration from the host, you have to specify this when starting visual studio:

```console
build.cmd -vs Microsoft.DotNet.CoreSetup -rc Release -lc Release
```

### Preserving test artifacts

Expand Down
6 changes: 6 additions & 0 deletions eng/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,12 @@ if ($vs) {
$env:RUNTIMECONFIGURATION=$runtimeConfiguration
}

if ($librariesConfiguration)
{
# Respect the LibrariesConfiguration variable for building inside VS with different libraries configurations
$env:LIBRARIESCONFIGURATION=$librariesConfiguration
}

# Respect the RuntimeFlavor variable for building inside VS with a different CoreLib and runtime
if ($runtimeFlavor)
{
Expand Down
1 change: 0 additions & 1 deletion src/libraries/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

<PropertyGroup>
<BeforeTargetFrameworkInferenceTargets>$(RepositoryEngineeringDir)BeforeTargetFrameworkInference.targets</BeforeTargetFrameworkInferenceTargets>
<ShouldUnsetParentConfigurationAndPlatform>false</ShouldUnsetParentConfigurationAndPlatform>
<GeneratePlatformNotSupportedAssemblyHeaderFile>$(RepositoryEngineeringDir)LicenseHeader.txt</GeneratePlatformNotSupportedAssemblyHeaderFile>
</PropertyGroup>

Expand Down