-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Description
I created a hosted PowerShell application in c# with .NET core 3.0
This application executes a PowerShell script using the "powershell-yaml" module. It apparently needs access to the .NET Core assemblies.
I get the files published with this in my project file:
<CopyRefAssembliesToPublishDirectory>true</CopyRefAssembliesToPublishDirectory>
This property ensures that a "refs" directory is published containing all reference assemblies.
PowerShell though, looks for a "ref" directory:
PowerShell/src/Microsoft.PowerShell.Commands.Utility/commands/utility/AddType.cs
Line 614 in 3923ca1
| "ref"); |
Steps to reproduce
Publish a c# application referencing System.Management.Automation.dll and have it execute a PowerShell script using the powershell-yaml module.
Expected behavior
I would expect it to look for the "refs" folder with is published when enabling the CopyRefAssembliesToPublishDirectory property.
Actual behavior
It looks for the reference assemblies in "ref", which does not exist.
Environment data
{
"PSVersion": {
"Major": 6,
"Minor": 2,
"Patch": 3,
"PreReleaseLabel": null,
"BuildLabel": null
},
"PSRemotingProtocolVersion": {
"Major": 2,
"Minor": 3,
"Build": -1,
"Revision": -1,
"MajorRevision": -1,
"MinorRevision": -1
},
"SerializationVersion": {
"Major": 1,
"Minor": 1,
"Build": 0,
"Revision": 1,
"MajorRevision": 0,
"MinorRevision": 1
},
"WSManStackVersion": {
"Major": 3,
"Minor": 0,
"Build": -1,
"Revision": -1,
"MajorRevision": -1,
"MinorRevision": -1
},
"Platform": "Win32NT",
"OS": "Microsoft Windows 10.0.17763",
"GitCommitId": "6.2.3",
"PSCompatibleVersions": [
"1.0",
"2.0",
"3.0",
"4.0",
"5.0",
"5.1.10032.0",
"6.2.3"
],
"PSEdition": "Core"
}