How to exclude .vs folder from template
See original GitHub issueI tried to exclude .vs folder from template following instructions at https://github.com/dotnet/templating/wiki/"Runnable-Project"-Templates#sourcesexclude-optional but it does not work.
If I enter “exclude”: “.vs/**/*” I got following error:
Illegal characters in path.
Parameter name: path
at System.IO.Path.GetFullPath(String path)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
at System.IO.File.Open(String path, FileMode mode, FileAccess access, FileShare share)
at Microsoft.TemplateEngine.Utils.PhysicalFileSystem.OpenRead(String path)
at Microsoft.TemplateEngine.Edge.Mount.FileSystem.FileSystemFile.OpenRead()
at Microsoft.TemplateEngine.Orchestrator.RunnableProjects.SimpleConfigModel.JTokenToCollection(JToken token, IFile sourceFile, String[] defaultSet)
at Microsoft.TemplateEngine.Orchestrator.RunnableProjects.SimpleConfigModel.Evaluate(IParameterSet parameters, IVariableCollection rootVariableCollection, IFileSystemInfo configFile)
at Microsoft.TemplateEngine.Orchestrator.RunnableProjects.RunnableProjectGenerator.CreateAsync(IEngineEnvironmentSettings environmentSettings, ITemplate templateData, IParameterSet parameters, IComponentManager componentManager, String targetDirectory)
at Microsoft.TemplateEngine.Edge.Template.TemplateCreator.<InstantiateAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
at Microsoft.TemplateEngine.Cli.New3Command.<CreateTemplateAsync>d__59.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
at Microsoft.TemplateEngine.Cli.New3Command.<EnterSingularTemplateManipulationFlowAsync>d__64.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
at Microsoft.TemplateEngine.Cli.New3Command.<EnterTemplateManipulationFlowAsync>d__65.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
at Microsoft.TemplateEngine.Cli.New3Command.<ExecuteAsync>d__66.MoveNext()
SDK is 1.0.4
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
DotNet Templating: How to exclude directories without ...
In my template.json I have: ... Is there a way I can exclude directories/folders having a name at any level? templates .net-core.
Read more >Excluding Files and Folders from Deployment
Excluding Files and Folders from a Web Package · Open your solution in Visual Studio 2010. · In the Solution Explorer window, right-click...
Read more >Excluding files from projects | PhpStorm Documentation
Exclude files and folders by name patterns · In the Settings dialog ( Ctrl Alt 0S ), click Directories. · In the Exclude...
Read more >template.json exclude [Contnet_Types].xml : r/dotnet
I'm creating a solution template using template.json engine and when it all builds (using nuspec) it creates [Content_Types].xml file in ...
Read more >Exclude files from layers (Advanced feature) | App Layering
In the C:\Program Files\Unidesk\Uniservice\UserExclusions\ folder, create one or more .txt files that specify paths to be excluded.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@neman I believe I see the problem now. The modifiers needs to be an array, like this:
Please let us know if that works for you, or if it’s still causing problems. Thanks!
I forgot to mention that this is a multiproject template.
I also tried to exclude Logs folder, which resides within some project in src folder like this
with no effect at all.