sdk: Useless and incorrect message if a tool does not have "emitEntryPoint": true
Steps to reproduce
Create a tool but don’t put "emitEntryPoint": true in the project json.
Try to use the tool from a different project
Expected behavior
Either a warning/error during compilation or a helpful error when trying to run the tool
Actual behavior
PS C:\Users\XXXX\Documents\Visual Studio 2015\Projects\dotnet-scratch> dotnet list-tools
Expect required library hostpolicy.dll to be present in [C:\Users\XXXX\.nuget\packages\.tools\dotnet-list-tools\1.0.0-t2016050317041\netcoreapp1.0]
- This may be because of an invalid .NET Core FX configuration in the directory.
Note that the error is:
- incorrect - I don’t think we ever should expect hostpolicy.dll in ~.nuget\packages.tools subfolder
- useless - not really actionable
- misspelled (?) - shouldn’t it be
Expected required library...instead ofExpect required library?
Environment data
dotnet --info output:
.NET Command Line Tools (1.0.0-rc2-002655)
Product Information:
Version: 1.0.0-rc2-002655
Commit Sha: 3e96a05f9c
Runtime Environment:
OS Name: Windows
OS Version: 10.0.10586
OS Platform: Windows
RID: win10-x64
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 2
- Comments: 21 (8 by maintainers)
@schellap and team,
Interestingly, I see this issue still happening with
emitEntryPoint: truehowever if I dodotnet -v runit works just fine. What is it about the -verbose flag that causes it to run successfully?I am currently experiencing this issue, but I have
emitEntryPoint: truein my project.json.I just tested this for RC2. I see the same issue. Not having previously worked in this area, I would have liked to see a message like “Loaded matching assembly named
<assembly_name>from package<package_name>but that assembly does not contain an entry point. This link<fwlink>explains how to properly create a tool.” or some such thing. I.e. Help me identify where the problem is and then tell me the details I need to know to fix it.tools without entry point are not a thing. We can improve the experience here in two ways:
dotnet.exeshould provide a useful message when passed any dll that does not have an entry pointWhat @piotrpMSFT said. This is about experience - people will make mistakes and if they do they need to be able to understand the error messages enough to be able to fix the mistake.