-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
C# Project not working with Microsoft.PowerShell.SDK
#10266
Comments
It is not clear why you reference 6.1.1 version in Microsoft.PowerShell.Commands.Diagnostics" Version="6.1.1" line. |
@iSazonov The PublishSingleFile/PublishReadyToRun/PublishTrimmed still do not work when published the singleExe does not launch but the non-published version gives this error now, before the Microsoft.PowerShell.SDK was loaded and only the System.Management.Automation was loaded and it was giving this error:
And the publish option with only System.Management.Automation
|
@iSazonov |
@iSazonov
|
@SteveL-MSFT After moving to .Net Core 3.0 we probably need to review and update SDK documentation. Should we have a tracking issue? |
@SteveL-MSFT |
With regards to RIDs there are generic RIDs like |
@SteveL-MSFT @adityapatwardhan @iSazonov Note: The non-SingleExe file:
Windows Application Event Log Error:
|
@SteveL-MSFT @adityapatwardhan @iSazonov
|
Microsoft.PowerShell.SDK
With Net Core 3 Preview 8 all works except PowerShell for SingleExe. Without References and methods for powerShell the SingleExe works fine. Add PowerShell SDK, and PowerShell and you get the Windows Application Error listed below. Get error on running in Event Log. Microsoft Visual Studio Enterprise 2019 Preview Info.txt
|
@SFC-Sarge the challenge is that the Microsoft.PowerShell.Native package includes its pdb as part of its dependencies (which is highly unusual). By default we do not package pdbs in the single exe to help reduce the overall size. In this case, if you add '<IncludeSymbolsInSingleFile>true</IncludeSymbolsInSingleFile>' to your project file the project will launch. |
Thanks Jeff, That works great. |
Was the dependency on
|
The SDK is writing the entry for the PDB to the deps file. But that's because NuGet is interpreting the PDB as a native dependency. I think the NuGet conventions don't specify anything about the file extension for native files (because they are different for different operating systems), so PDBs should not be included in these folders. @nkolev92 What do you think? |
@adityapatwardhan we should get this fixed for next release: PowerShell/PowerShell-Native#26 |
Yeah, the selections for native libraries from the runtimes folder are looking for "any" file, no extension checking. For reference :) https://github.com/NuGet/NuGet.Client/blob/eab7f0366f74f30b7ceb9b23f63f1f23adfc45f9/src/NuGet.Core/NuGet.Packaging/ContentModel/ManagedCodeConventions.cs#L472 and
|
This issue has been marked as external and has not had any activity for 1 day. It has been be closed for housekeeping purposes. |
Trying to use PowerShell with WindowsForms Application (See attached sample) under .Net Core 3.0 Preview 7. Have issue open with .Net Core Team: dotnet/core#3075 (comment)
The below sample was update to include
Microsoft.PowerShell.SDK
and the System.Management.Automation.WindowsFormsApp18.zip
VSSolutionDebugTest_2019731_080800_pid20116.log
Error does not show and internal exception though:
The text was updated successfully, but these errors were encountered: