Comments (7)
@james1301 when you create files from the VS Add New Item Dialog, that file(s) should open in the editor without customizations. What behavior are you seeing? Please be specific.
from template-sample.
@sayedihashimi I right-click on my C# project, go to Add New Item, navigate to my item template and click Add. The new class gets added to my project but does not open up. If I do the standard class template it opens up as expected.
from template-sample.
Using latest non-preview Visual Studio 17.4.3.
from template-sample.
That link I sent, suggests that is how to do it for non-command line cases.
from template-sample.
@james1301 what version of Visual Studio are you using? FYI the whole team (me included) is on vacation so responses may be delayed.
Edit: I see your BS version in another comment.
@phenning is this a known issue?
from template-sample.
Actually, we do require the open post action to be present in the template.
@james1301 do you have the file generated by the template listed as a primary output?
If it is the only one, βfilesβ in the post action should be set to 0 since it is a zero based index.
As an aside, it would be interesting to have item templates which generate a single file to not require a post action to open the file in Visual Studio. I think weβd need to have a way to have authors opt out, and they would need to have it anyway for older versions of VS and VSMac, or if there were multiple files you may not want to have them all opened.
from template-sample.
Thanks @phenning and @sayedihashimi I have got this working with adding the Primary output section, Maybe should have noticed that bit π. Yeah would be more simple for item templates to not need this.
Thanks again for all of your help, I think my templates are all how I want them for the moment π. Replaced our old template process which was terrible to update anything and unclear from source control point of view.
from template-sample.
Related Issues (20)
- Doc update: how to add values to the dropdowns in VS
- Issue with package folder nesting HOT 1
- Create Blank Solution template HOT 3
- Create MSBuild task to run the analyzer
- Instantiating VS template with correct solution HOT 1
- How to ignore preprocessor configuration for dotnet template expanded code? HOT 3
- how to implement solution folders concept using templates HOT 1
- Warn when using guid format property
- dotnetnew.azurewebsites.net update schedule HOT 8
- HTTP Port not working correctly in Visual Studio for solution template HOT 14
- Remove source control configuration from generated projects HOT 4
- Item Templates Support HOT 5
- HostIdentifier symbol needs binding HOT 3
- Item Template replace Namespace with that from the Project and folder it is added HOT 3
- .net6 templates work from local folder, but the nuget package does not HOT 3
- VS is buggy when there is a problem with "framework" parameter HOT 7
- Visual Studio for Mac custom template Forms not showing HOT 17
- How to create the files conditionally using template.json HOT 3
- Renaming namespaces,Projects and namespaces with custom parameters. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from template-sample.