0

I have built a template project with a Template.json and this will generate the template fine ( no errors at all )

ive also managed to add some choices to the symbols that will add or hide code snippets as needed

what im now trying to achieve is removing classes and interfaces based on those same choices

I have added a sources block with the exclude and the condition but it appears to be simply ignored when i generate the project.

the files are in the project created in infrastructure/mongo

but i have also tried with the following

**/MongoRepository.cs

ive included the sources block below as it appears to be the issue as far as i can see ( the rest of the file works fine )

    "sources": [
     {
      "modifiers": [
        {
          "condition": "(!Mongo)",
          "exclude": [
            "**/Infrastructure/Mongo/**"
          ]
        }
      ]
    },
    {
      "exclude": [
        ".template.config/**"
      ]
    }
  ]

UPDATE after testing i have found it appears that maybe its the condition here thats causing the issue if i move the files to the exclude below it will work no matter what. but any condition that is placed in that field will not complete (i have set this field to (1==1) with the same failure)

3
  • 1
    Can you please share a full minimal reproducible example (for example @github) for lazy person like me? Commented 21 hours ago
  • 1
    ill start removing data to get a clean version i can post in the meantime .. its literally any nested files in a a project for example ./infrastructure/mongorepo.cs Commented 20 hours ago
  • @GuruStron github.com/Bithellio/Worker.Template this is a stripped down version Commented 20 hours ago

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.