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

Invalid Chars on Path after update 0.8.1 #112

Closed
HClausing opened this issue Jun 3, 2022 · 3 comments
Closed

Invalid Chars on Path after update 0.8.1 #112

HClausing opened this issue Jun 3, 2022 · 3 comments

Comments

@HClausing
Copy link

HClausing commented Jun 3, 2022

Hi,

I've updated the package to version 0.8.1 and now I'm getting this exception:

MSB4018	Falha inesperada da tarefa "DefaultDocumentationTask".
System.Exception: Error while writing documentation for EficazFramework.ViewModels.ViewModel<T>.Arguments ---> System.ArgumentException: Caracteres inválidos no caminho.
   em System.IO.Path.CheckInvalidPathChars(String path, Boolean checkAdditional)
   em System.IO.Path.Combine(String path1, String path2)
   em DefaultDocumentation.Generator.WritePage(DocItem item, StringBuilder builder) na D:\a\DefaultDocumentation\DefaultDocumentation\source\DefaultDocumentation.Common\Generator.cs:linha 141
   em DefaultDocumentation.Generator.Execute() na D:\a\DefaultDocumentation\DefaultDocumentation\source\DefaultDocumentation.Common\Generator.cs:linha 181
   --- Fim do rastreamento de pilha de exceções internas ---
   em DefaultDocumentation.Generator.Execute() na D:\a\DefaultDocumentation\DefaultDocumentation\source\DefaultDocumentation.Common\Generator.cs:linha 185
   em DefaultDocumentation.Generator.Execute(Target loggerTarget, IRawSettings settings) na D:\a\DefaultDocumentation\DefaultDocumentation\source\DefaultDocumentation.Common\Generator.cs:linha 207
   em DefaultDocumentation.DefaultDocumentationTask.Execute() na D:\a\DefaultDocumentation\DefaultDocumentation\source\DefaultDocumentation\DefaultDocumentationTask.cs:linha 59
   em Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
   em Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()	EficazFramework.Data	C:\Users\hclau\.nuget\packages\defaultdocumentation\0.8.1\build\DefaultDocumentation.targets	45	

If I add "exclude" on Arguments property, the error goes to the next member (IsLoading, LoadingMessage, etc) on the same class. I believe the problem's source is on the class. There's a little fragment of it for help:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Threading.Tasks;

namespace EficazFramework.ViewModels;

/// <summary>
/// Provê a estrutura básica de ViewModel em leitura tabular.
/// Adicione funções, como operações CRUD e Registro de Repositório utilizando as extensões disponíveis
/// </summary>
public class ViewModel<T> : INotifyPropertyChanged, IDisposable where T : class
{

    public ViewModel()
    {
        SectionID = Application.IApplicationManager.Instance?.SectionManager.CurrentSection?.ID ?? 0;
        Commands.Add("Get", new EficazFramework.Commands.CommandBase(Get_Execute));
    }

    public ViewModel(long sectionId)
    {
        SectionID = sectionId;
        Commands.Add("Get", new EficazFramework.Commands.CommandBase(Get_Execute));
    }

    private System.Threading.CancellationTokenSource _CancelationTokenSource = null;

    public object[] Arguments { get; set; }

    public bool IsLoading { get; private set; } = false;
    public string LoadingMessage { get; private set; }

    ...
}

Log on output window:

2>2022-06-03 11:21:24.6600|INFO|DefaultDocumentation|FileNameFactory that will be used: EficazFramework.DocsApiPlugin.FolderFileNameFactory, EficazFramework.DocsApiPlugin, Version=1.0.2.0, Culture=neutral, PublicKeyToken=null
2>2022-06-03 11:21:24.6600|INFO|DefaultDocumentation|UrlFactories that will be used:
2>  DefaultDocumentation.Markdown.UrlFactories.DocItemFactory, DefaultDocumentation.Markdown, Version=0.8.1.0, Culture=neutral, PublicKeyToken=0ab8f459261ccb3c
2>  DefaultDocumentation.Markdown.UrlFactories.DotnetApiFactory, DefaultDocumentation.Markdown, Version=0.8.1.0, Culture=neutral, PublicKeyToken=0ab8f459261ccb3c
2>2022-06-03 11:21:24.6600|INFO|DefaultDocumentation|Sections that will be used:
2>  DefaultDocumentation.Markdown.Sections.HeaderSection, DefaultDocumentation.Markdown, Version=0.8.1.0, Culture=neutral, PublicKeyToken=0ab8f459261ccb3c
2>  DefaultDocumentation.Markdown.Sections.DefaultSection, DefaultDocumentation.Markdown, Version=0.8.1.0, Culture=neutral, PublicKeyToken=0ab8f459261ccb3c
2>2022-06-03 11:21:24.6600|DEBUG|DefaultDocumentation|Cleaning output folder "E:\Henrique Clausing\Repositorios\Current\EficazFramework\Docs\Api\Data"
2>2022-06-03 11:21:24.6913|DEBUG|DefaultDocumentation|Writing DocItem "DefaultDocumentation.Models.AssemblyDocItem" with id "EficazFramework.Data"
2>2022-06-03 11:21:25.0050|DEBUG|DefaultDocumentation|Writing DocItem "DefaultDocumentation.Models.Members.PropertyDocItem" with id "P:EficazFramework.ViewModels.ViewModel`1.Arguments"
2>C:\Users\hclau\.nuget\packages\defaultdocumentation\0.8.1\build\DefaultDocumentation.targets(45,3): error MSB4018: Falha inesperada da tarefa "DefaultDocumentationTask".
2>C:\Users\hclau\.nuget\packages\defaultdocumentation\0.8.1\build\DefaultDocumentation.targets(45,3): error MSB4018: System.Exception: Error while writing documentation for EficazFramework.ViewModels.ViewModel<T>.Arguments ---> System.ArgumentException: Caracteres inválidos no caminho.
2>C:\Users\hclau\.nuget\packages\defaultdocumentation\0.8.1\build\DefaultDocumentation.targets(45,3): error MSB4018:    em System.IO.Path.CheckInvalidPathChars(String path, Boolean checkAdditional)
2>C:\Users\hclau\.nuget\packages\defaultdocumentation\0.8.1\build\DefaultDocumentation.targets(45,3): error MSB4018:    em System.IO.Path.Combine(String path1, String path2)
2>C:\Users\hclau\.nuget\packages\defaultdocumentation\0.8.1\build\DefaultDocumentation.targets(45,3): error MSB4018:    em DefaultDocumentation.Generator.WritePage(DocItem item, StringBuilder builder) na D:\a\DefaultDocumentation\DefaultDocumentation\source\DefaultDocumentation.Common\Generator.cs:linha 141
2>C:\Users\hclau\.nuget\packages\defaultdocumentation\0.8.1\build\DefaultDocumentation.targets(45,3): error MSB4018:    em DefaultDocumentation.Generator.Execute() na D:\a\DefaultDocumentation\DefaultDocumentation\source\DefaultDocumentation.Common\Generator.cs:linha 181
2>C:\Users\hclau\.nuget\packages\defaultdocumentation\0.8.1\build\DefaultDocumentation.targets(45,3): error MSB4018:    --- Fim do rastreamento de pilha de exceções internas ---
2>C:\Users\hclau\.nuget\packages\defaultdocumentation\0.8.1\build\DefaultDocumentation.targets(45,3): error MSB4018:    em DefaultDocumentation.Generator.Execute() na D:\a\DefaultDocumentation\DefaultDocumentation\source\DefaultDocumentation.Common\Generator.cs:linha 185
2>C:\Users\hclau\.nuget\packages\defaultdocumentation\0.8.1\build\DefaultDocumentation.targets(45,3): error MSB4018:    em DefaultDocumentation.Generator.Execute(Target loggerTarget, IRawSettings settings) na D:\a\DefaultDocumentation\DefaultDocumentation\source\DefaultDocumentation.Common\Generator.cs:linha 207
2>C:\Users\hclau\.nuget\packages\defaultdocumentation\0.8.1\build\DefaultDocumentation.targets(45,3): error MSB4018:    em DefaultDocumentation.DefaultDocumentationTask.Execute() na D:\a\DefaultDocumentation\DefaultDocumentation\source\DefaultDocumentation\DefaultDocumentationTask.cs:linha 59
2>C:\Users\hclau\.nuget\packages\defaultdocumentation\0.8.1\build\DefaultDocumentation.targets(45,3): error MSB4018:    em Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
2>C:\Users\hclau\.nuget\packages\defaultdocumentation\0.8.1\build\DefaultDocumentation.targets(45,3): error MSB4018:    em Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()

The plugin listed on the log is just a FolderFileNameFactory from this repo samples.

Thanks.

@HClausing
Copy link
Author

Fixed by 0.8.2 version, and modifing my FolderPlugin based on commit 427145a74c882f3cf793ab690374e637c20660b7.

Thank you.

@Doraku
Copy link
Owner

Doraku commented Jun 13, 2022

while the documentation generation is fixed with that, as I said in the commit the links are still invalid and need a little more work (#104) for a folder FileNameFactory to properly work :(

@HClausing
Copy link
Author

Yes, I'm following this issue.

Unfortunately I'm not able to help on solving it by the moment, but if I think on some ideia I will share on the issue's conversation.

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

No branches or pull requests

2 participants