How to include DLL files in a specific folder with TFS2012 - tfs

I saw on a Microsoft forum that I can create a .tfignore file and place it in the root folder.
I have a folder named Libs and it contains DLL files that I want to keep under source control. How can I use the .tfignore file to include my Libs folder in source coutrol?

You can negate inherited rules in a .tfignore file. In your case, try adding a .tfignore file to your Libs subdirectory with the following content:
\# Do not ignore .dll files in this folder nor in any of its sub-folders
!*.dll
The not (!) operator essentially reverses the rule and says "do indeed include these files types."
For more details see http://msdn.microsoft.com/en-us/library/vstudio/ms245454.aspx. Look at the sections titled ".tfignore file rules" and ".tfignore file example"

Related

Changing file path in .dpr file in delphi

We are using Delphi 6. Currently, we have kept all the different application folders under one main folder.
We have below folder path for one of the applications:
C:\dev_GIT\MyApplications\Delphi\Sales_Applications\Member_Joining
For some reason, we would like to move this folder to below folder path:
C:\dev_GIT\Member_Joining
Issue we are getting is that we have some common files which are kept in separate folders and which are used in so many other applications as well.
Since we are moving this folder outside of the current folder path, we are getting compile error, which is expected.
The real issue is, as there are so many files which are in common folder path, we need to change their path in .DPR file one by one. Is there any better way by which we need not to change path for all the files in the .DPR file?

tfignore exclude file path containing a space not working

In my project I have a WCF service reference. The service reference generates some metadata files that have an extension .datasource. I want to ignore/exclude in the tfignore all those files that end with this extension (.datasource) in the folder that contains the service reference.
For some reason VS2017 still shows in my pending changes all the excluded files with the extension .datasource. However, what is strange is that all other files other than this extension do get ignored/excluded. There is one thing of interest though that for the .datasource exclude rule that I have in tfignore, the path consists of a folder/directory that has a space in its name.
Here is that rule in tfignore:
My FolderName/Web.datasource
Is the space in the rule causing the issues? or is it something else?
This .tfignore file will not affect with those files already in source control. You need to remove them from source control first.
Besides if those files already in the pending changes before you add your .tfigonre file in source control. You can try below solution:
If the changes are "still" in pending changes, first create a backup
copy, then make an Undo on them. Close VS, restore the backup copies
and then it should work.
Since .tfignore is similar to .gitignore, if there are space in the middle of folder name, such as My FolderName/Web.datasource, give a try with below format:
My\ FolderName/Web.datasource
For more detail info of .tfignore file rules please refer the official tutorial.

Delphi .proj file missing .dpk file

I recently got project in delphi which I need to rearange, I'm totally new in delphi so I'm searching my way in environment and language. Question, in my project group I have two files with .dproj extension, no corresponding .dpr file so when I try to load them I got msg:
"Canot open file xxxx.dpk, system cannot find the file specified"
Did the old programmer forgot to copy all files so I'm missing this, or is this some kind of file (.dproj) that I only add as a reference so I don't need to have corresponding .dpk or .dpr file??
The .dpk file is the top level Pascal source file for a package. It is the package equivalent of an application project's .dpr file.
The original developer should have supplied it to you. Ask them to do so.

Adding components to a component folder

I'm working on a Delphi project and I want to add a parser to it. The parser comes with components that should be added to the project
So it works great if I add the files to the same folder that my project is in, but I would like it to be in a separate components folder (to keep it cleaner, since I'm not going to be modifying those files anyway).
However, when I add create a components folder and add the files there, when I add it to the project through delphi, it has trouble finding the files. So it adds the .psu files to the right folder, but it says it can't find the unit 'Calculator', for example, until I copy the Calculator.dcu file from the component directory to the source directory.
How do I tell Delphi to look for those files where I put them?
Thanks
You have some options:
Add the units folder to the Projects' Search Path (Menu: Project\Options...) - only affects the project you're working now.
Add the units folder to the Environment's Library Path (Menu: Tools\Options...\Environment Options\Delphi Options\Library - Win32) if you want all projects in this ide install to find that units (not only the project you are working).
Just to complement: if, in the near future, you add components to your pallete and the compilation fail not finding the units; you'll have to update your system path as well. For details give a search on SO on this, as this is a common source of questions on the delphi tag... ;-)
Take a look at the Search Path for the project in the project options. Make sure your .pas and/or .dcu files are in that search path, i.e. add the folder in which the units are to your project's search path.

Configuration files from referenced class libraries in ASP.NET MVC

I have several class libraries within my MVC application which each have a Settings file with its own configuration file. With each configuration file being App.config, how are these aggregated into one configuration file? Should the settings be placed in web.config? Suggested best practice?
When you build each class library you'll notice that the app.config file is copied to the bin\output folder with a name like "myclasslibrary.dll.config". This means that each DLL will have it's own config file each with a unique name. You can just include the *.dll.config files in your website's bin folder along with the DLLs and your settings will be picked up.
You can also combine settings from a library's app.config into the web.config file by adding new <section> declarations inside <configSections>.
This MSDN walkthrough has an example: http://msdn.microsoft.com/en-us/library/ms246220%28VS.80%29.aspx
Then you wont need separate config files.

Resources