-1
我在使用Clipr nuget包的Windows上構建了一個演示項目。我得到一個運行時異常,我不知道如何解決。我在哪裏開始調試? POC的代碼是如此簡單:.NET Core控制檯應用程序在使用Clipr包時拋出MissingManifestResourceException
來源
using System;
using clipr;
namespace CliprTest
{
public class Program
{
public static void Main(string[] args)
{
var parsed = CliParser.StrictParse<Options>(args);
Console.WriteLine("Ran without params first");
}
}
[ApplicationInfo(Description = "Test")]
public class Options
{
}
}
輸出繼電器
[email protected] MINGW64 /c/GitHub/CliprTest/src/CliprTest
$ dotnet build && dotnet run bin/Debug/netcoreapp1.0/CliprTest.dll
Project CliprTest (.NETCoreApp,Version=v1.0) will be compiled because inputs were modified
Compiling CliprTest for .NETCoreApp,Version=v1.0
Compilation succeeded.
0 Warning(s)
0 Error(s)
Time elapsed 00:00:02.2712506
Project CliprTest (.NETCoreApp,Version=v1.0) was previously compiled. Skipping compilation.
Unhandled Exception: System.Resources.MissingManifestResourceException:
Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "clipr.Properties.Resources.resources" was correctly embedded or linked into assembly "clipr.NetCore" at compile time, or that all the satellite assemblies required are loadable and fully signed.
at System.Resources.ManifestBasedResourceGroveler.HandleResourceStreamMissing(String fileName)
at System.Resources.ManifestBasedResourceGroveler.GrovelForResourceSet(CultureInfo culture, Dictionary`2 localResourceSets, Boolean tryParents, Boolean createIfNotExists, StackCrawlMark& stackMark)
at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo requestedCulture, Boolean createIfNotExists, Boolean tryParents, StackCrawlMark& stackMark)
at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents)
at System.Resources.ResourceManager.GetString(String name, CultureInfo culture)
at clipr.Usage.AutomaticHelpGenerator`1.get_UsageTitle()
at clipr.Usage.AutomaticHelpGenerator`1.GetUsage(IParserConfig config)
at clipr.CliParser`1.StrictParse(String[] args)
at clipr.CliParser.StrictParse[TS](String[] args)
at CliprTest.Program.Main(String[] args)
我沒有開放的issue on Clipr's github repo,但不知道如何將很快得到答案以及問題是否在我身邊
既然你在GitHub上得到了答案,你會考慮在這裏發佈它作爲答案,然後接受它嗎? – svick
@svick剛剛做到了 –