Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a trailing slash to $env:VSINSTALLDIR #13406

Merged
merged 1 commit into from
May 3, 2023

Conversation

eerhardt
Copy link
Member

@eerhardt eerhardt commented May 3, 2023

Without a trailing slash publishing NativeAOT projects no longer works.

See dotnet/runtime#85737

cc @wtgodbe @missymessa @riarenas @agocke

@@ -399,7 +399,8 @@ function InitializeVisualStudioMSBuild([bool]$install, [object]$vsRequirements =
# Locate Visual Studio installation or download x-copy msbuild.
$vsInfo = LocateVisualStudio $vsRequirements
if ($vsInfo -ne $null) {
$vsInstallDir = $vsInfo.installationPath
# Ensure vsInstallDir has a trailing slash
$vsInstallDir = Join-path $vsInfo.installationPath "\"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does Join-Path take care of the duplicate trailing slash?

[nit]

Suggested change
$vsInstallDir = Join-path $vsInfo.installationPath "\"
$vsInstallDir = Join-Path $vsInfo.installationPath "\"

Copy link
Member Author

@eerhardt eerhardt May 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes.
image
and
image

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without a trailing slash publishing NativeAOT projects no longer works.

See dotnet/runtime#85737
@eerhardt eerhardt force-pushed the FixVSInstallDir branch from acfd47f to 029d983 Compare May 3, 2023 22:25
eerhardt added a commit to eerhardt/aspnetcore that referenced this pull request May 3, 2023
@jkotas jkotas merged commit 39d795a into dotnet:main May 3, 2023
@eerhardt eerhardt deleted the FixVSInstallDir branch May 3, 2023 23:35
eerhardt added a commit to dotnet/aspnetcore that referenced this pull request May 4, 2023
* Add infrastructure for trimming and NativeAOT test apps.

This infrastructure was taken from https://github.com/dotnet/runtime/tree/c62f69be1405a8e41b56ffc05f22d791bf4c7d2d/eng/testing/linker and modified to work in dotnet/aspnetcore.

Added the first test:
- Generic host + value type container builder (verify that error is thrown)

Contributes to #45860

* Skip IsPublishedAppTestProject projects when SkipTestBuild=true.

Use `Sdk="Microsoft.NET.Sdk"` in order to skip the build correctly. Only run the AOT tests during Test. Skip "Build" and skip publishing for Helix.

Ensure the IsPublishedAppTestProject projects aren't built until the shared fx is built using RequiresDelayedBuild.

* Add workaround for dotnet/arcade#13406
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants