Working with TFS 2010 Power Tools, and able to edit template Fields via Process Editor.
However the Fields tab in the editor does not show "all" fields in that Project Collection.
For example if you create a field CompanyName.FooField in Team-Project-A, you will not see it when opening the Process Editor for Team-Project-B within the same collection.
Yet, you are not allowed to create a new field with the same Name or RefName. TFS insists on Name & RefName to be unique in the Project Collection.
You are allowed to create a New field in Team-Project-B using the same Name & RefName for FooField - I'm assuming field is somehow re-used across 2 Team-Projects.
After doing some research, TFS allows for fields to be re-used as long as they are within the same Project Collection (can be in dif. team projects).
Work Item Field Explorer (Tools/ProcessEditor) shows a READ-ONLY view of all fields.
Its obvious that TFS maintains a "Global" Field definition on the Project Collection Level, yet there seem to be additional association with individual Team Project.
It would be extremely helpful if there was a similar way to EDIT all fields at once within a Project Collection as opposed to bouncing between Process Editor windows for each Team Project.
Is there anyway to do that or has anyone faced a similar problem?
It is impossible because two collection projects are necessarily created on two different data bases, so the difficulty of achieving what you want, but betweentwo projects it is possible because they are on the same database instance.
link : http://msdn.microsoft.com/en-us/library/vstudio/dd236915.aspx
Related
I'm developing in BizTalk 2013R2 using Visual Studio 2013, trying to create a property schema based on a large, lengthy source schema using Quick Promotion, however I'm having difficulty getting the created property schema generated properly.
Essentially we are trying to adhere to cleaner development standards that mean BizTalk solution artefacts are nested within their own relevant folders, but some of the automated functionality of the VS SDK for BizTalk is making this seemingly impossible.
Is it possible to create a Property Schema in a specific directory within your solution root?
I don't seem to be able to enter a full filepath into the 'Default Property Schema' option on the source schema properties, as it errors with an 'illegal characters' warning for spaces and backslashes in the filepaths string.
I've tried using HTML encoding, escape characters and encapsulating it as a string, but they just return the same error each time.
I've also tried generating the schema in the root source, and then moving it manually into my target folder, changing the namespace accordingly to reflect its new location, but this loses it's connection within the source property schema and causes the link to break.
Yes, it is possible
After you have done your quick promotion, go into the Promote Properties and remove the Promoted Properties (1) and then the schema (2)
After that move and change the namespace of the Promoted Properties schema.
And then browse for the property schema (1) in the Promote Properties dialog and then select the item to promoted (2), click Add (3) and if you have more than one promoted property assign it to the correct one (4).
Is there a way to Link a WorkItem to a Label. Under "All Links" when I create a new WorkItem in Visual Studio I can select many diffrent Link Types, like Changeset, VersionedItem, etc, but theres no type for Label.
The reason why I want to do it is, that I label my releases (like Version 1.0, Version 1.1) and I want to associate a Bug to a specific version of my software.
Isn´t it support to link a WorkItem to a Label or how should I associate a Bug to a version of my software?
Update:
I´m following the Single Team Branching Model (one Dev and one Main branch) documented in the Visual Studio TFS Branching Guide 2010.
You cannot link to a label. However you can achieve your goal in other ways.
First of all, I suggest to use branching instead of labelling to keep track of multiple released versions. In my opninion using branches is a better mechanism then labelling. See also the branching guidance on codeplex
To link your bug to a version of your software, use the Iteration Path in the work item. This field is exactly for that purpose.
Using iteration path field is one option and it gives you the ability to track a work item between versions.
But if you want higher resolution, there is another way:
Team Build marks source code with a label before every build. The bug item type in CMMI project template contains fields called "Found In" and "Fixed In". In these fields you can select from build labels.
Use of these fields allow you to mark any work item with two specific builds. One for when it was found and one for when it was fixed.
Additionally Team Build updates "Fixed In" field of every work item with the label of the build, after the build completes successfully and all tests are ran without a problem.
If you don't have these fields on your work item type, you can always add them using the work item template editor that comes with TFS Power Tools.
I have been following the examples from Chapter 2 in an early access edition of Entity Framework 4 in Action whereby one creates a database schema, generates an entity model from the database schema, and then performs some entity customizations with regards to object inheritance, adding complex properties, etc. Everything was great until I closed and then restarted Visual Studio 2010 SP1. After restarting, I can no longer open the EDMX file with the designer. I get a dialog box stating "Cannot load 'C:\Projects\Test\Test.MyModel\Model.edmx': An item with the same key has already been added.". There is no further information in the Output window.
How might one might recover the file?
How might one debug the model loading process to find a little more information on what "item" is attempting to load or even what type of "item" it is?
It's an XML file so you can open it up in text mode and see what the problem is. Sounds like there could be items with duplicate names somehow.
How do I update a Linq to SQL .dbml file?
There are three ways to keep the model in sync.
Delete the modified tables from the designer, and drag them back onto the designer surface from the Database Explorer. I have found that, for this to work reliably, you have to:
a. Refresh the database schema in the Database Explorer (right-click, refresh)
b. Save the designer after deleting the tables
c. Save again after dragging the tables back.
Note though that if you have modified any properties (for instance, turning off the child property of an association), this will obviously lose those modifications — you'll have to make them again.
Use SQLMetal to regenerate the schema from your database. I have seen a number of blog posts that show how to script this.
Make changes directly in the Properties pane of the DBML. This works for simple changes, like allowing nulls on a field.
The DBML designer is not installed by default in Visual Studio 2015, 2017 or 2019. You will have to close VS, start the VS installer and modify your installation. The LINQ to SQL tools is the feature you must install. For VS 2017/2019, you can find it under Individual Components > Code Tools.
To update a table in your .dbml-diagram with, for example, added columns, do this:
Update your SQL Server Explorer window.
Drag the "new" version of your table into the .dbml-diagram (report1 in the picture below).
Mark the added columns in the new version of the table, press Ctrl+C to copy the added columns.
Click the "old" version of your table and press Ctrl+V to paste the added columns into the already present version of the table.
Delete the dragged table from step 2 and save the .dbml file.
You could also check out the PLINQO set of code generation templates, based on CodeSmith, which allow you to do a lot of neat things for and with Linq-to-SQL:
generate one file per class (instead of a single, huge file)
update your model as needed
many more features
Check out the PLINQO site at http://www.plinqo.com and have a look at the intro videos.
The second tool I know of are the Huagati DBML/EDMX tools, which allow update of DBML (Linq-to-SQL) and EDMX (Entity Framework) mapping files, and more (like naming conventions etc.).
Marc
We use a custom written T4 template that dynamically queries the information_schema model for each table in all of our .DBML files, and then overwrites parts of the .DBML file with fresh schema info from the database. I highly recommend implementing a solution like this - it has saved me oodles of time, and unlike deleting and re-adding your tables to your model you get to keep your associations. With this solution, you'll get compile-time errors when your schema changes. You want to make sure that you're using a version control system though, because diffing is really handy. This is a great solution that works well if you're developing with a DB schema first approach. Of course, I can't share my company's code so you're on your own for writing this yourself. But if you know some Linq-to-XML and can go to school on this project, you can get to where you want to be.
I would recommend using the visual designer built into VS2008, as updating the dbml also updates the code that is generated for you. Modifying the dbml outside of the visual designer would result in the underlying code being out of sync.
There is a nuance to updating tables then updating the DBML... Foreign key relationships are not immediately always brought over if changes are made to existing tables. The work around is to do a build of the project and then re-add the tables again. I reported this to MS and its being fixed for VS2010.
DBML display does not show new foreign key constraints
Note that the instructions given in the main answer are not clear. To update the table
Open up the dbml design surface
Select all tables with Right->Click->Select All or CTRLa
CTRLx (Cut)
CTRLv (Paste)
Save and rebuild solution.
In the case of stored procedure update, you should delete it from the .dbml file and reinsert it again. But if the stored procedure have two paths (ex: if something; display some columns; else display some other columns), make sure the two paths have the same columns aliases!!! Otherwise only the first path columns will exist.
Here is the complete step-by-step method that worked for me in order to update the LINQ to SQL dbml and associated files to include a new column that I added to one of the database tables.
You need to make the changes to your design surface as suggested by other above; however, you need to do some extra steps. These are the complete steps:
Drag your updated table from Server Explorer onto the design surface
Copy the new column from this "new" table to the "old" table (see M463 answer for details on this step)
Delete the "new" table that you just dragged over
Click and highlight the stored procedure, then delete it
Drag the new stored procedure and drop into place.
Delete the .designer.vb file in the code-behind of the .dbml
(if you do not delete this, your code-behind containing the schema will
not update even if you rebuild and the new table field will not be included)
Clean and Rebuild the solution (this will rebuild the .designer.vb file to include all the new changes!).
Use Visual Studio 2019 open DBML files in graphic designer to update DBML files.
when not working:https://developercommunity.visualstudio.com/t/dbml-files-not-opening-in-graphic-designer-in-vs-2/1659675
Just for the record
Greetings!
I am going through Brad Abrams' SL4 + RIA Services series. Right now I am here:
http://blogs.msdn.com/brada/archive/2010/03/15/silverlight-4-ria-services-ready-for-business-exposing-data-from-entity-framework.aspx.
When I get to the "add domain service" step and the wizard asks you what entities you want to expose, the list is empty. The dropdown that let's me choose my Entity data context is there and the "DishViewEntities" is selected but it is not showing the "Restaurant" and "Plate" entities in the list below like it does in the picture.
I found this thread here:
http://forums.silverlight.net/forums/t/168724.aspx.
The poster has the same problem as me. I have restarted VS, rebooted, regenerated the EDMX, tried creating it in different folders. Still the list is empty. When it is empty, it will not allow me to select individual entities or generate the class.
Any ideas from the community? Thanks!
I had the same problem. I looked for answers on web, they all seemed to relate to installing the RiaServicesToolkit, or other packages, or the dbml confirguration string. But I noticed that when I was opening my Linq2Sql (dbml) in visual studio that I was getting a message about the configuration string missing or incorrect.
It turns out that the configuration string problem was the result of my SQL Server Agent being set to Manual instead of Automatic in my Services (Control Panel). Once I corrected this, the configurations string problem went away.
I don't know if that is also what was causing my RIA (Linq2SQL) problem (although I do see how it could), but after fixing this, and cleaning & rebuilding the solution, my Linq2SQL context appeared on the drop down list of the DomainService wizard and all was golden.
Hope this helps.
This happens from time to time in my project. I don't really have to create a new project (which would be very unfeasable.) I usually make sure the project builds (clean/rebuild) and right-click on edmx file and do run custom tool. And make sure that no errors are being reported on Error and/or Output windows.
We solved our problem. Sometimes EDMX designer can't map Entities and tables. Right click each entity and select table mapping then ensure if all of your entities are mapped correctly.
When you want to add Domain Service Class an exception occur but (I don't know why) the exception message doesn't display. Than the list is seen empty.
If all of your mappings and web.config settings are right after rebuild progress domain service class addition works fine!