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

Running LayoutViewer problem #109

Closed
kenjiuno opened this issue May 23, 2020 · 1 comment · Fixed by #110
Closed

Running LayoutViewer problem #109

kenjiuno opened this issue May 23, 2020 · 1 comment · Fixed by #110

Comments

@kenjiuno
Copy link
Collaborator

kenjiuno commented May 23, 2020

When launch LayoutViewer from Visual Studio 2019, there is a System.NullReferenceException: 'Object reference not set to an instance of an object.' thrown.

2020-05-23_11h29_09

Some ways to run from command line:

  • Run dotnet run at OpenKh\OpenKh.Tools.LayoutViewer folder.
    For example: H:\Proj\OpenKh\OpenKh.Tools.LayoutViewer>dotnet run
  • Run dotnet OpenKh.Tools.LayoutViewer.dll at bin\Debug\netcoreapp3.1
    For example: H:\Proj\OpenKh\OpenKh.Tools.LayoutViewer\bin\Debug\netcoreapp3.1>dotnet OpenKh.Tools.LayoutViewer.dll
  • Copy OpenKh.Tools.LayoutViewer.dll.config to OpenKh.Tools.LayoutViewer.exe.config done at bin\Debug\netcoreapp3.1 folder,
    For example: H:\Proj\OpenKh\OpenKh.Tools.LayoutViewer\bin\Debug\netcoreapp3.1>copy OpenKh.Tools.LayoutViewer.dll.config OpenKh.Tools.LayoutViewer.exe.config
@kenjiuno
Copy link
Collaborator Author

Putting DefaultSettingValue also works...

        [global::System.Configuration.DefaultSettingValue("Magenta")]
        public global::System.Drawing.Color BackgroundColor {

The default value of BackgroundColor is filled at App.config: https://github.com/Xeeynamo/OpenKh/blob/a8de1e5cbc847b7ee87a16e29182f806d5b34e07/OpenKh.Tools.LayoutViewer/App.config#L14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant