Every time I rebuild by DBML, I have to adjust settings for auto generated value etc. for individual fields.
Is there a built-in tool which I could use to automate my changes in the DBML when I build? I'm using Visual Studio 2008.
I've not found anything built-in. I just use a T4 template that reads my database on builds and updates the DBML file with new columns and datatype changes - nothing else. That way, once a table is place on the DBML file, you never need to worry about losing your customizations. It's a pain, but a simple workable solution. Though I'd love to know if someone has a better (and free-as-in-$$$) idea.
Related
So I am working on a solution with a lot of projects with multiple developers using SVN. There are some projects that are specific for me that I want loaded but for others they might not be relevant.
So my question is, where does Visual Studio store information about a project begin loaded and what is the proper way to commit project/solution settings with out ruining it for others?
An example could be that I just added a new project to the solution and I want to commit these changes, but I don't want to commit whether or not a project is loaded/reloaded (Since other developers have to reload them again).
EDIT: I found the answer here When I unload projects in visual studio, where does VS save this setting?
When you add projects to a solution, they will get loaded when the solution opens.
If using source control, if such a solution is updated and contains new projects, they will get loaded.
One way of dealing with this is to create multiple solutions - solutions that only have relevant projects. These solutions can be part of source control, but don't have to, though if you don't add them to source control you risk having projects in source control that only you have a solution reference to.
VS.NET 2010 removed the database project template that could be used for just script files
(that you right click on and execute on desired database).
I want to add a database project similar to the ones in VS.NET 2008? Can i do this?
I tried to use one of the new vs.net 2010 database projects however, in our environment we have multiple applications within the same database. We also have a lot of legacy stuff. In addition we have a lot of queries that cross databases (i.e. in the case of accessing data wharehouse tables). It sure seems that this scenario is hard to use with the new database projects. It seems this adds a lot of complexity to using the new db projects.
What sort of database project is best to be used for this scenario??
I'm building a set of T4 templates that gather their data from an XML file. Is there any way to force Visual Studio to regenerate the templates when the XML file is changed?
Presently, the developers must modify the XML file and then rebuild each template to get the changes. My goal is to hide the T4 templates from the developer altogether so they don't have to do any action other than updating the XML file.
Other information: We're using Visual Studio 2008 Visual Basic projects.
I was looking for a similar capability a few months ago but all I found indicated that you can't invalidate template output automatically when another file is changed. (E.g. There is no way to declare that a template "depends" on another file, Makefile style.)
I wound up actually just writing a custom MSBuild task that deletes all T4 output files, effectively forcing all of the templates to be re-run on every build. This may be overkill for your needs, especially if the templates take a long time to run, but maybe you can hack together something to check template dependencies.
If your goal is to hide them altogether, I make an extension called T4Awesome that lets you do that. Instead of your templates being part of the solution and visible in the solution explorer, my extension hides them in a single folder, then presents them to Visual Studio via custom tool windows. Its supports parameter prompting so you might be able to remove the need of your xml file.
Is there a way to integrate Visual Studio with VSS without doing source control binding?
The problem I have is that my team is opposing to add source control binding to the solution and project files, since they claim it adds more problems (restrictions) for them.
On the other hand, I really like to perform most of the source control operations from Visual Studio.
Is there any way to have the solution file and all the project files the way they are (without added binding to VSS) and still have VSS and VS integration without forcing other team members to use that integration.
I don't see a way to do it per project.
You can however you do it for IDE (all projects loaded).
It is under Tools\Options\Source Control
and then set Binding to None.
I see it in VS 2005 and 2008. I gave it a try in a project I wanted to convert from VS2005 to 2008 and appeared to work (I did not want to check in/out files for conversion).
The answer to your question is "no." Bindings and VS integration are one & the same with SourceSafe. I'm not even sure what it would mean for a solution to be integrated but not bound, or vice versa. What exactly are your teammates looking for?
You can adjust bindings per-project in the File -> Source Control -> Change Source Control dialog. You can also adjust them per-user (effectively; not a supported configuration) by excluding the *scc files from source control. However, you are likely to encounter problems down the road if you try to manage these files yourself instead of using the Add Solution To SCC wizard. More info:
http://alinconstantin.dtdns.net/WebDocs/Scc/_Bindings.htm
http://alinconstantin.dtdns.net/WebDocs/Scc/_WebEnlist.htm
The binding is stored in the .vssscc, .vspscc and MSSCCPRJ.SCC files.
If you don't add these files to Visual Source Safe every developer can configure his bindings like he wants.
Since we use Perforce, I'm not 100% sure if this works with VSS.
I'm trying to use Visual Studio 2005 with ClearCase eclipsed files (view private which "eclipse" a versioned file), but any time I save the file in VS, it becomes uneclipsed, and returns to the versioned file. In Linux, I use VIM instead of Visual Studio, and get around this problem by setting backupcopy=yes, thereby forcing it to save files by writing to a new file and then copying the new file over the existing one, instead of moving the original file out of the way (which undoes the eclipse) and then writing a new file, but in Windows, I'd like to use Visual Studio (since the tree also includes C# code compiled under VS). Is there any way to teach it to save files this way?
I do not think Visual Studio does save file in a particular way that may cause the file to be first removed, then written.
Considering that, with developer's environment as Windows with Visual Studio, eclipsed
files often happen just by writing a file case sensitive and later not case sensitive.
Hence, did you check the case of your file ?
Could you also check the config spec associated with your Windows view ? (and compare it to your Linux view).
I just spend 1/2h with a Visual Studio 2005 / ClearCase / dynamic view and... I do see the same thing!
The only workaround I can fathom is to add a non-selection rule:
element /my/private/file -none
That way, even though VS2005 remove then add the private file when saving it, ClearCase does not try to restore the versionned file, since it is not selected at all.
Si, the answer may not reside within VS2005 (I studied the options without seeing any obvious setting altering the saving process...), but rather within ClearCase.
Let me know if it helps.
As noted in the comment, the downside of this approach is "un-eclipse" can no longer be a matter of moving/removing the private file to let ClearCase dynamically restore the versionned file.
Now, that step must be complemented with another one, which is to comment the non-selection rule in the config spec.
If anyone is still reading this... I just discovered that Visual Studio 2008 appears to work just fine. Go figure...