Where is the newly created build definition file? - c#

In Visual Studio 2013,
Team Explorer,
I created a new build definition called Release. Now I want to edit the XML build file associated with this file so I click on "Edit Build Definition..." which shows me to the editing form for this build but not the XML file. Where is this proj file located. The project is already on TFS. Should I Check-in something which I am not aware of to be able to edit the xml content? Can't find this build?

The default build templates in TFS are WF XAML files and are only the templates for the build process. There is no XML file there for you to edit, the build details are stored within TFS.
Depending on what you are tying to do, you can look at editing or creating new Workflow templates, note that changes made to a template will effect all builds associated with the template.

Related

Excluding files from Project Template C#

I'm creating a project template to make the development process here in the company smoother.
I've created the template and it works ok, I can create a new project based on the template.
The only issue is that some files are included in the new project that I don't want included for instance the .vstemplate file.
I've searched the web/here on how to do this, but I can't find the answer...
What am I missing?
Would excluding files from the template project achieve what you want? You can do that by right clicking on a file in the solution explorer and clicking Exclude From Project
Example:

Content file not building in dependent project

I have an XML file in ChildProject with Build Action set to Content and Copy to Output Directory set to Copy Always. When there are no changes and I then go in and edit the XML file, save, and then build the PrimaryProject (Console Application) the XML file that is built does not contain the change.
A workaround is including the XML file as a link in the PrimaryProject but this does not seem expected behavior? It seems that a change to only a content item does not trigger a build of the ChildProject.
Note that in Configuration Manager all projects are checked to build and the normaly build process works as expected. Currently using VS 2013 Professional.

T4 Code template trigger generation on: other file save / xml change (VS 2010)

I have a t4 template, that loops over an xml file in the project and genrate the code.
Is it possible to make the T4 to run when a certain file has bee saved, or when I build the project?
VS 2010
Thanks
Add the XML file to your project
Right Mouse button on your xml file in your project solution explorer and view properties
Excluded from Build should say No
Item Type should say Custom Build Tool
Setup Custom Build Tool Command line and Outputs.
Now whenever the xml file changes (ie newer that its output) it will trigger a build. Rebuilding the project will also trigger a build.
Dynamo.AutoTT will do what you need. You can configure it to watch files via a regex, and specify which T4 templates you want it to trigger.
You can download it from here : https://github.com/MartinF/Dynamo.AutoTT
Just build it, copy the dll and AddIn files into
C:\Users\\Documents\Visual Studio 2012\Addins\
and away you go.
If you want to get it going in VS2012 you will need to modify the a Dynamo.AutoTT.AddIn file and set the Version to 11.0 inside the AddIn file;

For a Silverlight 4 Visual Studio solution, what needs to be in version control?

I have a Silverlight 4 app that I'm building with Visual Studio 2010. I'm using Mercurial/TortoiseHG to do version control. Which files do I need to check in? By default, it checks in all sorts of .dlls in /bin/debug and stuff. Do I really need those? Or can I just grab code and content files? Do I need to version something to keep track of project properties and references, or is that contained within the .csproj file itself?
You don't need to include stuff in /bin or /obj. This is true of all VS solutions in source control. These are recreated upon every rebuild. Also, for Silverlight specifically, you don't need to check in the XAP file that is generated in the ClientBin of your web app.
From MSDN (via this social.msdn thread):
You can add the following files to Visual Studio source control:
Solution files (*.sln).
Project files, for example, *.csproj, *.vbproj files.
Application configuration files, based on XML, used to control run-time behavior of a Visual Studio project.
Files that you cannot add to source control include the following:
Solution user option files (*.suo).
Project user option files, for example, *.csproj.user, *.vbproj.user files.
Web information files, for example, *.csproj.webinfo, *.vbproj.webinfo, that control the virtual root location of a Web project.
Build output files, for example, *.dll and *.exe files.
It doesn't say anything specific about Silverlight projects though.
Is Mercurial/TortoiseHG integrated into Visual Studio? i.e. can you check out/submit from within VS?
If so, if you right click on the project name and select "Add Solution to Source Control" it should add those parts of the project that it needs ignoring everything else.

C# SLN file approach in Eclipse (Java)

How does Eclipse handle excluding Java files in the project??
In C# the list of files in the project is handled in the sln file - There seems nothing similar in Eclipse!!
Any ideas?
In Visual Studio files for C# projects are stored in the .csproj files. Solutions are just containers for projects (which can be C#/C++/VB/... projects).
The last time I worked with Eclipse all files beneath the project's root were automatically included. When one was excluded from the build the project's .classpath file was modified:
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry excluding="ExcludedFile.java" kind="src" path="src"/>
<!-- ... other entries ... -->
</classpath>
You can exclude a file in Eclipse by right-clicking it in the Package Explorer and then choosing Build Path -> Exclude.
Project specific meta information (like this) is stored in either the .project or the. .classpath files in the root of the project. These are hidden in the project view, but visible in the navigator view.
You shouldn't need to directly edit the .project and .classpath files mentioned in the other answers. As with Visual Studio, the IDE generates and owns these project meta data files for you.
For example, you can exclude an individual java file from the build path by right clicking on it in the project explorer and selecting "Build path / Exclude". That will make the required .classpath changes for you.

Categories