I want to ask you, if it´s somehow possible, to add folder, to sort out Test´s a little bit.. When i am doing in C# parts, there is normally option
right click-> add ->new folder
In F# case, it looks like it´s missing.
I tried to add it even out of VS, via the Win. explorer, but its not working.
Edit: I have found quite poor solution and that´s actually, that you create new folder in C# part and then cut it out and paste to F# section but it´s a bit weird, so any ideas are welcome.
It is not implemented in VS2013 but you can use F# Power Tools extension (http://fsprojects.github.io/VisualFSharpPowerTools/) or create it manually (http://marcinjuraszek.com/2014/03/folders-in-f-projects-how-to-do-it-what-to-avoid.html)
You can either use F# Project Extender or edit the project file manually. Details are here.
Edit: This article explains how to keep your project organized without folders.
Related
We are automatically creating solution files (sln) and solution filters (slnf) during our CI.
Since we are not working inside Visual Studio we cannot use the DTE to work with Therefore we are using the Microsoft.Build nuget packages.
Everathing works fine, except that there is not possibility to create a solution file programmatically. It seems that I have to create it fully manually by stiching blocks of text.
Is there a better way to do this?
Since my comment helped, posting it as answer
There's MvsSln which is very powerful in editing. Also there's mine little project that has very simple API - bunch of immutable types and saveToFile function
In most .NET project I can use folder to organise the code files. In C++, I can't, but filters end up playing the same role. However, in F# with Visual Studio 2010, I can't. Every code file is shown directly in the project dir. Why is this feature not available?
And what is the optimal strategy for organizing a project with a lot of files?
Actually, you can add folders to F# projects but it's not supported directly through Visual Studio (you have to edit the project file yourself): http://fsprojectextender.codeplex.com/ (edit: old link was broken, updated to F# Project Extender home page which has links to the original blog posts which were moved) (which I found in this answer).
I do this myself, but it is cumbersome and you end up avoiding it until keeping sanity really demands it. I think the feature simply slipped, or perhaps there wasn't as much a culture for folder organization with the F# designers in the first place. You can see in the F# source code that they favor huge source files with no directories, with separate projects as an organization boundary.
I imagine the F# project template could be modified to support this, and it is certainly something I'd like to see happen. At the same time the linear compilation order F# enforces causes your code to be somewhat self-organized, and so folder grouping plays a less significant role.
Manually editing the .fsproj file as described in Stephen's answer is one option (and I used it when I wanted to organize one larger project).
However, you have to be a bit careful and I think you cannot add new files to the folders (creating a file by hand and then adding an existing file works). However, if you like to keep things organized (like I do), then it should work for you.
Additionally, there is also a tool called F# Project Extender that should make things a bit easier for you . I have not tried it yet, but it looks like it supports adding folders (and perhaps other useful things). See for example this blog post by the project author.
I've got a collection of HTML documentation that I'd like to add to my solution in Visual Studio. It's just a collection of files -- there are no build steps.
What's the best way to add this to my solution? In the past I've used a C# class library project and disabled it in Build Configuration, but this felt wrong.
A "Makefile project" doesn't work, because it doesn't support nested folders.
I don't really want to use Solution Folders, because they're not real filesystem folders. This makes them harder to work with. Solution Folders are great when your solution has a large number of projects in it, but I don't think they're great for managing more than a couple of loose files.
How do others do this?
You can put them in solution folder
Right click on solution and select Add->Add existing item - it will create solution folder automatically. You can add solution folder manually via Add->New solution folder
I would recommend simply adding them directly under the solution (or rather under a Documentation folder under the solution). The context menu for the solution title in Solution Explorer gives options to create solution folders and add references to solution files.
Given that you don't want to use solution folders, I see absolutely no point of including them in your solution then. Any method you could use would be rather contrived. It is quite common simply to have a Documentation folder in the root directory of your solution that is not referenced in any way by the solution/project files. (If you like, you can then mirror the directory structure of Documentation using Solution Files.)
I always put a .Documentation folder in each project that I am making the documentation for. It's not as elegant as having a single location for the solution, but it also makes it so that as I use different projects in different solutions and have the documents follow their projects. At compile time I have the build system put all the documentation together in one folder.
Pretty much what the title says. Is there a way to add files to a vsnet project from inside Vim? I work in a group of devs, and all of our code has solutions and projects as you would expect. I would like to use Vim, and was hoping for a way to maintain those project files when I added or removed files without having to go into vsnet.
The project and solution files are in xml and are hand-edittable. (I often have to during an SVN merge.) However, HUGE DISCLAIMER AHOY, adding stuff from scratch is a lot more dubious than an svn merge. I get to see the lines and just move them in (or not) here or there. To be confident that you're not destroying the proj and sln files, you would have to experiment with visual studio a little bit to make sure what has to be added.
There are more IDEs than visual studio... perhaps there's some clues in their guts.
The problem is that you're trying to fit Vim into the role of an IDE, which it is not and has never claimed to be. You can edit just about anything under the sun, but when you start asking it to manage files and relationships like I think you're wanting, you're asking for a major headache.
I'd like to create a script that will configure the Visual Studio IDE the way I like it. Nothing vastly complicated, just a few Tools/Options settings, adding some External Tools, that kind of thing.
I know that this can be done inside VS with Import/Export Settings, but I'd like to be able to automate it from outside of VS. Is this possible, and if so, how?
Edited to add: doing it from outside of VS is important to me -- I'm hoping to use this as part of a more general "configure this newly-Ghosted PC just the way I like it" script.
Edited again: the solution seems to be to hack CurrentSettings.vssettings, or use AutoIt. Details below.
Answering my own question, in two ways:
In VS2005/8, the things I mentioned (Tools/Options, External Tools) are all stored in the CurrentSettings.vssettings file, in the folder "Visual Studio 200{5|8}\Settings". This file is just XML, and it can be edited programmatically by anything that knows how to parse XML. You can also just paste a new vssettings file over the top of the default one (at least, this works for me).
The larger question of configuring a virgin PC. It turns out that not everything I want to change has an API, so I need some way of pretending to be a user who is actually sitting there clicking on things. The best approach to this seems to be AutoIt, whose scripting language I will now have to learn in my Copious Free Time.
An easy way is to use the macro recorder to do something simple, then look at the code it produces and edit it as you see fit.
On my machine Visual Studio stores it's local settings in a file called VCComponents.dat. Its a text file, so perhaps you could find a way of placing your settings directly in there.
The file is stored in my users local AppData\Local\Microsoft\VC folder