We have our projects set to build documentation files, but the Add Service Reference tool in Visual Studio creates files with no XML docs. This results in a ton of build warnings, which we'd like to avoid.
Is there a way to get Add Service Reference to generate XML docs? Or, if not, is there a way to modify a T4 template that generates service references?
I don't believe adding a service reference can generate the xml comments for you. See XML Comments not appearing in WCF Service for more information on that.
Your best bet is to turn the warning level down or off for the xml comment missing. In visual studio I think this will help (Visual Studio Disabling Missing XML Comment Warning).
If you are using a tool such as resharper you can ignore the entire file (http://blogs.jetbrains.com/dotnet/2011/06/preventing-items-from-being-analyzed-in-resharper/) or just ignore the xml comment warnings (How to switch off Resharper check for XML commets?).
Related
I have added a user defined assembly to query properties.
Now when using a function I don't see its documentation in Intellisense although I have specified <summary> and <remarks> tags.
Does LinqPad support this?
To view XML documentation from a custom assembly in LinqPad you need to ensure the following are in place:
You have a licensed version of LinqPad - IntelliSense is a paid for option.
Your custom assembly has an XML documentation file. To ensure this is created during your build process, open the project properties, select the Build tab and tick "XML Documentation File"
I want to update service references in a Visual Studio 2010 solution by using SVCUtil because this solution has several projects and it's not good to get references refreshed one by one.
I'd like to know your point, because I've to be sure I'm going to execute exactly same command than one done by Visual Studio 2010, or even if Visual Studio 2010 doesn't use SVCUtil, an equivalent command to IDE's behavior.
Thank you very much.
The easiest way to refresh a lot of service references is to put all those in a dedicated project. Reference this project from all the projects that need to use them.
If a service reference needs to be updated, you will do it in one place only.
Some googling here and here shows the settings on VS 2008, although this will depend of course on your options in the Advanced options in the Add Service Reference wizard.
From : http://geekswithblogs.net, Dave Barrett, 30 June 2008:
Contrary to Visual Studio 2005, the Add service reference command in Visual Studio 2008 does not use svcutil.exe, but rather it's own built-in functionality.
Using a comparison reference between the two and my own analysis of the results, I came up with the following command to mimic what the command does in VS 2008 (keep in mind a few of these options, such as the /ct and the /l switches, were specific to my situation):
svcutil *.wsdl *.xsd /l:C# /out:Reference.cs /noconfig /s
/ct:System.Collections.Generic.List`1 /ser:Auto /tcv:Version30
/n:*,<NameOfYourNamespaceHere> /edb
I ran this in the folder where the schema files (WSDL, XSD) were located from a VS2008 command line.
Edit : Agreed - Never be afraid to drop and recreate service references from scratch. When working with version control like TFS, "update" service references there is often quite a mess as it figures which wsdl, xsd and disco files etc have been changed, added or deleted etc (and get filenames like SomeXSD92.xsd). Generally it is quicker to just drop and recreate them.
Johan's post is makes a good point (and can be used as part of a standard design pattern called Service Agent which handles the implementation of the client proxy).
I'm not quite sure what you mean when you say two tiers would need to reference the same assembly? If you are sharing type of the entities called in the service you would need to reference the entity assembly in most tiers anyway. For your Service Agent assembly project (which has all the service references) you can either re-expose the same Service Contract used by the WCF server or wrap it in a new interface.
I am updating our CruiseControl.NET continuous integration environment from using the old Visual Studio 2008 Web Deployment projects to Visual Studio 2010.
I do not want to use the Beta 2010 Web Deployment projects as I think I can make use of the updated Publishing/Packaging in 2010.
Currently I have managed to configure the CruiseControl script to call MSBuild twice. First to Build the solution in the Release configuration and then to Package the MVC project.
I then copy out the correct files from the Package from a hideous file path (which makes me suspect I am not doing this right but heh) and the Transformed web.configs to the Test server.
This is finally working but unlike when I used the 2008 Deployment Projects this code returns the ExecutingAssembly as App_web_xxxxx.dll and not Company.Product.Web.dll which is what I'm after.
Dim CurrentAssembly As Reflection.Assembly = System.Reflection.Assembly.GetExecutingAssembly
Dim version As String = CurrentAssembly.GetName.Version.ToString
I know GetName returns the a longer string than just the name but I'm debugging it to see what it contains. I understand that is is the compiled/cached dll but why isn't it the one in the MVC bin.
Cheers
I figured this out - basically when I was calling Assembly.GetExecutingAssembly inside the footer.ascx. This meant that the code was in a dynamically compiled dll for the footer.
What I wanted was the DLL for the MVC website. So I used an extension property on the controller that set ViewStates with the Assembly information.
In my case I will want to use this code again so the extension property is in a different Assemmly that I can include in various MVC projects. This meant I had to change the code to use Assembly.GetCallingAssembly but it now works exactly how I wanted.
How do I change process template to MSF for Agile on an already existing team project in TFS 2010?
We have upgraded our TFS 2008 to 2010, and now I would also like to change the process template to MSF for Agile (currently CMMI).
We haven't used the workitem functionality much so if some information gets lost in the conversion doesn't matter.
Once you've created a Team Project, you unfortunately can't just upload a new process template. As Robaticus says, you'll have to download the XML for the template and modify it, then re-upload it. The power tool lets you create NEW templates for NEW team projects, but it won't modify an existing one.
Instead, you can use the witadmin.exe tool (on any computer with Team Explorer installed, under \Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE, or just from a Visual Studio Command Prompt) to export the current workitem definitions and re-import them once you've made your changes.
Luckily, if you're not using workitem tracking much, then this might not be too difficult. You might be able to just delete all the existing workitem types and then re-upload the new types.
If this is too much trouble, consider how much you want to retain your source control history. It might be worth creating a new Team Project with the Agile template and then just moving all your source code into it.
You can't change the process template, however you can change the work item types. So for bugs, tasks you can swap to the Agile definitions.
You can do this in 2010 with witadmin, in 2008 it's importwit, by first downloading the template to disk (you'll need the TFS power tools for this). Then point the console app at bug.xml, task.xml etc..
Usage: witadmin importwitd /collection:collectionurl [/p:project] /f:filename [/e:encoding] [/v]
/collection Specifies the Team Foundation project collection. Use a fully specified URL such as
http://servername:8080/tfs/Collection0.
/p Specifies the team project in which the new work item type is imported. This is required, except when
the validation-only option is used.
/f Specifies the work item type XML definition file to import.
/e Specifies the name of the .NET Framework 2.0 encoding used to import the XML file. For example,
/e:utf-7 will use Unicode (UTF-7) encoding. Encoding is automatically detected whenever possible. If
the encoding cannot be detected, UTF-8 is used.
/v Validates the XML definitions for the work item type, link type, or global workflow without importing
them.
You can export the agile process template to disk, then import the work items into your existing project. You may need the TFS Power Tools to do this.
I may be too late for this question, but the TFS Integration Platform tools could really help here.
See this question on server fault that details on how to move from Scrum For Team System V2 to Microsoft Visual Studio Scrum 1.0.
You would need to setup your own mappings to move from your templates to the target template, but the process is the same.
Please note witadmin.exe could help in some scenarios but TFS Integration Platform is your ultimate choice to achieve this task. There is a user voice item still pending. Please check this SO thread.
I think the best way to accomplish this is to create a new Team Project with "the new" process template and use the TFS Integration tool to migrate your existing WorkItems and choose create a new branch from Source Control, so you'll have new work Items (with the new workflow) and the source control history (as well). You'd even do this across versions of TFS!! (On the case interested on migrate TFS 2005/2008/2010)
Another way might be to use the WorkItem Templates, but I think this is more a kind-of visual style (I've not much experience) applied to the Work Item. To do so, just right click on your project, import the WITDefinition and apply the template by selecting Apply template on desired WorkITems.
When in VS 2008 if a developer hits the ''' it generates the XML comment tags for you, but this only works when the project setting for "Generate XML documentation file" is checked.
Is there a way to tell VS to generate the XML Comment tags, regardless of the project setting?
I think it is possible that someone may want comments but not create a XML documentation file.
In this case I am exceeding the current Team Settings, yet other developers don't want me to change this project setting. This forces me to flip this back before checking in the project.
I have the same problem with other Project settings like "code Analysis".
This is only a problem for VB.NET projects.
I know this is an old post however I have found a work around that may work for you depending if you team members just want the XML comments functionality and not the XML files.
1) In your project properties ensure that Generate XML documention file is checked.
2) Click the Build Events button
3) Into the Post-build event command line box enter the command
Del "$(OutDir)$(ProjectName).xml"
Now after each build it will remove the XML comment file.
Note: For some reason if it exists from a previous build it will not delete it so manually delete it the first time.
As far as I know, it will always create the xml comments....the Generate XML documentation I think only affects whether those comments are then compiled into an xml file.
Is it behaving like this on everyone's machine?
http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=477562
but obviously you already know that since you opened up the Connect issue.
No for VB.NET and VS2008.
http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=477562