Open mm98 opened 8 years ago
@mm98 does it work if you exclude it? I thought it would fail because the file wouldn't go into the vsix.
Yes i works. I'm using it in my pecan template without any problems.
I am having the same issue, it is not excluding the _project.vstemplate. I also want to exclude an folder and it is not excluding from the template. It seen like there is a cache issue... i comment out the section where it replace the project name and it still replacing the project name, when i debug.
$templateInfo | replace (
#('App.', {"$ProjectName."}, {"$DefaultProjectName"}),
('7A783C15-C46B-4935-A6A5-9B3952AC57E9', {"$ProjectId"}, {[System.Guid]::NewGuid()},@("*.*proj")),
('03C7975D-1C1F-456A-876C-599EA12D90DA', {"$ProjectId"}, {[System.Guid]::NewGuid()},@("*.*proj")),
('73F3AEE9-E7AB-4090-8EFA-38A0278E39D1', {"$ProjectId"}, {[System.Guid]::NewGuid()},@("*.*proj")),
('6AAF6641-4877-42C6-80DB-D6EB0F04E5AE', {"$ProjectId"}, {[System.Guid]::NewGuid()},@("*.*proj"))
)
# when the template is run any filename with the given string will be updated
#$templateInfo | update-filename (
# ,('App.', {"$ProjectName."}<#,$null,@('.csproj','.bak','.projitems','.shproj','.cs')#>)
#)
# excludes files from the template
$templateInfo | exclude-file 'pw-*.*','*.user','*.suo','*.userosscache','project.lock.json','*.vs*scc','*.sln','*.vstemplate'
# excludes folders from the template
$templateInfo | exclude-folder '.vs','artifacts','packages','bin','obj','App.Common'
I've noticed that there are issues when using the Visual Studio experimental instance. I'd suggest that you get your template working well from the command line first and then move to testing in VS. When you're testing in VS you can try the experimental instance (default when you CTRL + F5/F5). If you run into any "caching" issues then use the Reset Experimental Instance tool in the Start menu. You may still run into some issues with that, so if you do I'd suggest the following.
Hopefully that will work for you.
I just re-installed the template and it worked fine. You are right there are issues with Visual Studio experimental instance
Yeah that's the issue I'm referring to, glad you got it working.
When creating a new Project from pecan-wafffle VSIX the "_project.vstemplate" file is also copied.
Include *.vstemplate to the exclude list:
$templateInfo | exclude-file 'pw-*.*','*.user','*.suo','*.userosscache','project.lock.json','*.vs*scc', '*.vstemplate', '*.sln'