I know this sounds stupid, But i never had to create an interface file in visual studio as worked in support projects mostly.I thought it must have a template but cant see one.
Create an example and use the option in the file menu option to create as a template.
Look at http://msdn.microsoft.com/en-us/library/ms247121.aspx for more options.
Related
I'm using premake5 for visual studio C# projects and could not find a way to set the UICulture settings in Visual studio project files. In my project file I have something like:
<UICulture>culture</UICulture>
Is this possible to set in premake?
No, it doesn't look like there is an API for that right now. Or rather, there is one (see locale()) but it is only implemented for C++ projects currently.
Probably not a hard thing to add since the API is already there, maybe open a new issue or better yet, submit a pull request?
I am trying to generate a Visual Studio 2010 solution and add VS 2010 projects from custom templates!
My requirement:
1. Generate a VisualStudio Solution 2010, Save it to a folder, add VisualSTudio Project from my own templates (I have 3 different templates: ClassLibrary,WinForms ,WCFService)
My issue:
I implemented something that is working half a way!
Solution is created correctly but the content of the ".sln" file is very poor! No project reference is added >
In the root folder, it creates a Solution also for the C# Project, which I do not want. I want only the MainSolution file. (In my case "TestSolution.sln"). How can I stop creating a solutionfile for each project created?
Below the source code I use:
//for The solution:
//adding a project
Am I using the wrong interfaces?
Why the vs2010Solution.AddFromTemplate(..) returns null after the call, but no exception is thrown? Also the Project is created correctly in the folderstructure! But at runtime I can't check the list of projects "vs2010Solution.Projects" as it is null! (After correctly adding a project). I need the Project added because I need to add some references programmatically, which I try to do in the next line, but it doesn't work because vs2010Project is null).
So I am trying to wrap the VisualStudio 2010 automation model, to create a solution and add projects! But is not really working! Do I need to cast EnvDTE.Project to "VSLangProj.Project" at some point? I want to create a clean wrapper for VS2010, after that one for VS 2012!
Any help is much appreciated.
See the several articles of the section "Articles about automating project creation" on my web site:
http://www.visualstudioextensibility.com/articles/add-ins/
They explain why AddFromTemplate method returns null, how to create a solution, a project, a project inside a solution folder, a project item, etc.
Silly question: I am looking through the options in VS for something that will allow me to prevent VS from automatically creating (or at least automatically naming) the starting files when you create a new project. When I create a new Windows Form application, for example, and I name both the project and the solution "ExampleForm," VS will create the project but add a default Form1.cs file. I would think it would at least name the first file after the project/solution.
Is there any setting for this?
I think you will have to define your own Visual studio template
I found something related here but did not give me a good start
Since recently I do a lot of webPart development I want to automate the none-code part of the process, I want to develop a small console app that creates SharePoint solution as the pic, i'll use it as a template for the upcoming webParts
assume the webpart name is a var
string webPartName = "usefulLinks";
Create Empty SharePoint Project
Add Visual WebPart webPartName
Create Classes Folder WebPartName
Create an empty class inside the folder
add the Layouts mapped folder
add css and img folders to the layouts folder
Change part of the .webpart content to custom values
Same to the Elements.xml file
add the Resources mapped folder and add two resources files for Arabic and English
and finally change the feature name to be like webPartName + Feature
any good starting points? or online resources
thank you.
What you are really describing is a custom SharePoint Solution Project, not a Visual Studio solution.
Project templates provide the files that are required for a particular project type, include standard assembly references, and set default project properties and compiler options.
This section in MSDN covers how to create project templates for Visual Studio. In particular, it sounds like the best option for you is the "Export Template Wizard", which will create a template based on an existing project you have created.
I have a project which adds a reference to a class library project. Within this class library is a file of enums. What I wanted to do is add a couple of enums to this file and then from my main project, go to Properties->Settings and add a user setting which has a type of this enum. On the Type combo box I select Browse and from there the class library project. However, only the previous enums show up in this list. They are all declared as public. I have rebuilt everything and deleted the reference and re-added it but it makes no difference.
Why are the new enums not showing up in the list?
Update:
As the comment below, I have now fixed this. The solution was to close Visual Studio and reopen it. A bug in Visual Studio by the looks of things.
Update: As stated, I have now fixed this. The solution was to close Visual Studio and reopen it. A bug in Visual Studio by the looks of things.