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

Fix msalruntime.dll missing issue #414

Merged
merged 7 commits into from
Jan 24, 2025
Merged
Show file tree
Hide file tree
Changes from 5 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
1 change: 1 addition & 0 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
<PackageReference Update="Microsoft.Identity.Client.Extensions.Msal" GeneratePathProperty="true" />
<PackageReference Update="Microsoft.Identity.Client" GeneratePathProperty="true" />
<PackageReference Update="Microsoft.Identity.Client.Broker" GeneratePathProperty="true" />
<PackageReference Update="Microsoft.Identity.Client.NativeInterop" GeneratePathProperty="true" />
<PackageReference Update="SlnGen" PrivateAssets="all"/>
</ItemGroup>
</Project>
1 change: 1 addition & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
<PackageVersion Include="Microsoft.Identity.Client.Extensions.Msal" Version="4.64.0" />
<PackageVersion Include="Microsoft.Identity.Client" Version="4.64.0" />
<PackageVersion Include="Microsoft.Identity.Client.Broker" Version="4.64.0" />
<PackageVersion Include="Microsoft.Identity.Client.NativeInterop" Version="0.16.2" />
<PackageVersion Include="Microsoft.PowerBI.Api" Version="2.14.0" />
<PackageVersion Include="System.Runtime.Serialization.Json" Version="4.3.0" />
<PackageVersion Include="Moq" Version="4.8.2" />
Expand Down
11 changes: 11 additions & 0 deletions build/Microsoft.PowerBI.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Licensed under the MIT License.
<MSALKnownPackageReferences Include="Microsoft.Identity.Client.Extensions.Msal" />
<MSALKnownPackageReferences Include="Microsoft.Identity.Client" />
<MSALKnownPackageReferences Include="Microsoft.Identity.Client.Broker" />
<MSALKnownPackageReferences Include="Microsoft.Identity.Client.NativeInterop" />
</ItemGroup>

<FindInList CaseSensitive="false" List="@(PackageDependencies)" ItemSpecToFind="%(MSALKnownPackageReferences.Identity)">
Expand All @@ -29,12 +30,22 @@ Licensed under the MIT License.
<MsalPackageDefinitions Include="@(PackageDefinitions)" Condition="'%(Name)' == 'Microsoft.Identity.Client.Extensions.Msal'" />
<MsalPackageDefinitions Include="@(PackageDefinitions)" Condition="'%(Name)' == 'Microsoft.Identity.Client'" />
<MsalPackageDefinitions Include="@(PackageDefinitions)" Condition="'%(Name)' == 'Microsoft.Identity.Client.Broker'" />
<MsalPackageDefinitions Include="@(PackageDefinitions)" Condition="'%(Name)' == 'Microsoft.Identity.Client.NativeInterop'" />
</ItemGroup>

<ItemGroup Condition="'@(MsalPackageDefinitions)' != ''">
<MSALItemsToCopy Include="%(MsalPackageDefinitions.ResolvedPath)\lib\netstandard2.0\*.dll">
<Destination>$(OutputPath)\MSAL\netstandard2.0</Destination>
</MSALItemsToCopy>
<MSALItemsToCopy Include="%(MsalPackageDefinitions.ResolvedPath)\runtimes\win-arm64\native\*.dll">
<Destination>$(OutputPath)\MSAL\netstandard2.0</Destination>
</MSALItemsToCopy>
<MSALItemsToCopy Include="%(MsalPackageDefinitions.ResolvedPath)\runtimes\win-x64\native\*.dll">
<Destination>$(OutputPath)\MSAL\netstandard2.0</Destination>
</MSALItemsToCopy>
<MSALItemsToCopy Include="%(MsalPackageDefinitions.ResolvedPath)\runtimes\win-x86\native\*.dll">
<Destination>$(OutputPath)\MSAL\netstandard2.0</Destination>
</MSALItemsToCopy>
</ItemGroup>

<Copy Condition="'@(FoundMSALReferences)' != ''" DestinationFiles="@(MSALItemsToCopy -> '%(Destination)\%(Filename)%(Extension)')" SourceFiles="@(MSALItemsToCopy)" />
Expand Down
10 changes: 5 additions & 5 deletions build/Microsoft.PowerBI.Packaging.targets
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ Licensed under the MIT License.
<Message Text="Locating netstandard assembly" Importance="high" />
<Exec ConsoleToMSBuild="true" Command="&quot;$(PowerShellExe)&quot; $(PowerShellCommonArgs) -Command &quot;&amp; { &amp; &apos;$(ScriptsRoot)GetNetstandardAssembly.ps1&apos; } &quot;">
<Output TaskParameter="ConsoleOutput" PropertyName="NetStandardDllPath" />
</Exec>
</Exec>

<ItemGroup>

<_PackageFiles Include="$(OutputPath)\settings.json" Condition="Exists('$(OutputPath)\settings.json') AND '$(NoDependentAssemblies)' != 'true'">
Expand All @@ -66,11 +66,11 @@ Licensed under the MIT License.
<Pack>true</Pack>
<PackagePath>lib\$(TargetFramework)</PackagePath>
</_PackageFiles>
<_PackageFiles Include="$(OutputPath)\MSAL\**\*.*" Condition="Exists('$(OutputPath)\MSAL')">

<_PackageFiles Include="$(OutputPath)\MSAL\netstandard2.0\*.*" Condition="Exists('$(OutputPath)\MSAL')">
d2xiaomicrosoft marked this conversation as resolved.
Show resolved Hide resolved
<BuildAction>Content</BuildAction>
<Pack>true</Pack>
<PackagePath>lib\$(TargetFramework)\MSAL\%(RecursiveDir)</PackagePath>
<PackagePath>lib\$(TargetFramework)</PackagePath>
d2xiaomicrosoft marked this conversation as resolved.
Show resolved Hide resolved
</_PackageFiles>

<_PackageFiles Include="$(OutputPath)\$(LangName)\**\*.*" Condition="'$(NoHelpGen)' != 'true'">
Expand Down
5 changes: 4 additions & 1 deletion scripts/Build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ param

# MSBuild properties to execute build with. Default is @{'GenerateFullPaths'='true'}.
[ValidateNotNull()]
[Hashtable] $MSBuildProperties = @{'GenerateFullPaths' = 'true' },
[Hashtable] $MSBuildProperties = @{
'GenerateFullPaths' = 'true'
'EmitLegacyAssetsFileItems' = 'true'
},

# Build Configuration. Default is to use the MSBuild project defaults which is likely Debug.
[ValidateSet($null, 'Debug', 'Release')]
Expand Down
5 changes: 4 additions & 1 deletion src/Common/Commands.Common/PowerBICmdlet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@ private static Assembly RedirectAssemblyLoad(object sender, ResolveEventArgs arg

// Handle MSAL assemblies
string assemblyFilePath;
if (requestedAssembly.Name == "Microsoft.Identity.Client" || requestedAssembly.Name == "Microsoft.Identity.Client.Extensions.Msal" || requestedAssembly.Name == "Microsoft.Identity.Client.Broker")
if (requestedAssembly.Name == "Microsoft.Identity.Client"
|| requestedAssembly.Name == "Microsoft.Identity.Client.Extensions.Msal"
|| requestedAssembly.Name == "Microsoft.Identity.Client.Broker"
|| requestedAssembly.Name == "Microsoft.Identity.Client.NativeInterop")
{
var libType = "netstandard2.0";
assemblyFilePath = Path.Combine(executingDirectory, "MSAL", libType, requestedAssembly.Name + ".dll");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<PackageReference Include="Microsoft.Identity.Client.Extensions.Msal" />
<PackageReference Include="Microsoft.Identity.Client" />
<PackageReference Include="Microsoft.Identity.Client.Broker" />
<PackageReference Include="Microsoft.Identity.Client.NativeInterop" />
<PackageReference Include="System.Net.Http" />
</ItemGroup>

Expand Down
Loading