Skip to content

Commit

Permalink
Update dashboard discovery to use .dll instead of executable (#2018)
Browse files Browse the repository at this point in the history
* Update dashboard discovery to use .dll

* Only override for Mac
  • Loading branch information
danegsta committed Jan 31, 2024
1 parent eb62805 commit 7807b9f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions eng/dashboardpack/Sdk.targets
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<AspireDashboardDir>$([MSBuild]::EnsureTrailingSlash('$(AspireDashboardDir)'))</AspireDashboardDir>
<AspireDashboardPath Condition=" '$(AspireDashboardPath)' == '' ">$([MSBuild]::NormalizePath($(AspireDashboardDir), 'Aspire.Dashboard'))</AspireDashboardPath>
<AspireDashboardPath Condition=" '$(OS)' == 'Windows_NT' and !$(AspireDashboardPath.EndsWith('.exe')) ">$(AspireDashboardPath).exe</AspireDashboardPath>
<AspireDashboardPath Condition="$([MSBuild]::IsOsPlatform('OSX')) and !$(AspireDashboardPath.EndsWith('.dll'))">$(AspireDashboardPath).dll</AspireDashboardPath>
</PropertyGroup>

<ItemGroup>
Expand Down
7 changes: 4 additions & 3 deletions src/Aspire.Hosting/build/Aspire.Hosting.targets
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</ItemGroup>

</Target>

<!-- Generate the data structures for doing the codegen for project resources -->
<Target Name="CreateAspireProjectMetadataSources"
DependsOnTargets="_CreateAspireProjectResources">
Expand Down Expand Up @@ -111,7 +111,7 @@ internal static class ]]>%(ClassName)<![CDATA[
<Code Type="Fragment" Language="cs">
<![CDATA[
HashSet<ITaskItem> nonExecutableReferences = new HashSet<ITaskItem>();
foreach (var appProject in AppProjectTargetFramework)
{
var additionalProperties = appProject.GetMetadata("AdditionalPropertiesFromProject");
Expand All @@ -120,7 +120,7 @@ internal static class ]]>%(ClassName)<![CDATA[
// Skip any projects that don't contain the right metadata
continue;
}
var additionalPropertiesXml = XElement.Parse(additionalProperties);
foreach (var targetFrameworkElement in additionalPropertiesXml.Elements())
{
Expand Down Expand Up @@ -211,6 +211,7 @@ internal static class ]]>%(ClassName)<![CDATA[
<AspireDashboardDir>$([MSBuild]::EnsureTrailingSlash('$(AspireDashboardDir)'))</AspireDashboardDir>
<AspireDashboardPath Condition=" '$(AspireDashboardPath)' == '' ">$([MSBuild]::NormalizePath($(AspireDashboardDir), 'Aspire.Dashboard'))</AspireDashboardPath>
<AspireDashboardPath Condition=" '$(OS)' == 'Windows_NT' and !$(AspireDashboardPath.EndsWith('.exe')) ">$(AspireDashboardPath).exe</AspireDashboardPath>
<AspireDashboardPath Condition="$([MSBuild]::IsOsPlatform('OSX')) and !$(AspireDashboardPath.EndsWith('.dll'))">$(AspireDashboardPath).dll</AspireDashboardPath>
</PropertyGroup>

<ItemGroup>
Expand Down

0 comments on commit 7807b9f

Please sign in to comment.