List files and paths in a VB poject - vb.net

I have several VB.Net projects each with containing many files/forms. Several of the forms are shared/linked between more than one project and saved in a shared folder. Recently I discovered one file that should have been shared was not, meaning that there were two files with the same name in two different folders. Obviously any change of a file in one project was not shown in the other poject. Is there any way of listing all the files and paths in a project - either to screen or spreadsheet?

you should take a look at the projectname.vbproj file, it is a xml file and in the node called <ItemGroup> you are going to find what you are looking for, you can tell if a file is a linked one if inside the <Compile> node there is a <Link> tag.

Related

Programmatically set default column values based on folder in SharePoint Online

I'm working on enhancing metadata in our SharePoint online (O365) environment. Since a portion of my user base is used to foldering (explorer style), I've started using default column values to automatically set values on any files added to that specific folder (we have content organized categorically by folder currently). An example is our HR documents library - we have separate folders for recruiting, payroll, personnel files, etc. that automatically categorize files added to that folder with the same categories (recruiting, payroll, personnel, etc.). This supports both "search" and "click" users and makes adoption WAY easier while getting important metadata.
I want to implement this in a larger, more dynamic fashion, so manually setting default column values on each folder is not going to be scalable.
How can I reference the top level folder within the library (or even the current folder) for each newly added file and populate the "category" field for that new file with that folder name? I can do some very basic C# or Java code copy/paste, but bonus points for non-coding solutions =)
This problem can be solved through no coding.You can use the workflow to implement this by SharePoint Designer.
Create different view for different function team, and then use the view filter to show the document.
If you upload a file, use the workflow to set the metadata of the file. There are some known limitations: if you upload multiple files at the same time, the metadata for the file maybe does not work well; or if you upload a folder, the meta will not work for it and the file in the folder may not be set to right metadata.
I was actually able to use MS Flow to accomplish this in a pretty simple and straightforward fashion without managing custom views per team. The concept at a high level was:
(Trigger) When a new document is created in a folder in the library
Get the link of the parent folder of the newly added document
Create a variable (or just code it out in the Flow step) to parse out the name of the parent folder from the parent folder link (should be all text to the right of the last "/")
Set the category field as the variable
I'm sure that you could do the same right in a SharePoint designer workflow, but I prefer flow due to the visual aspect of it and being far easier to troubleshoot.

How to make files accessible to all users on Visual Basic app

I am attempting to make an instructional app for the call canter that I work at. Part of the code allows users to display information through the use of several files in our directory with drop down combo boxes.
For instance, a small portion of the code is similar to this (I did not save the app and bring it home so I am going off memory):
If cboGlossaryTerm.SelectedItem("MSN")Then
Process.Start("S:\MSN.pdf")
End If
I put the pdf files in My Resources and the Word files are added under the Solution folder.
I am using filepaths in the code as well.
(I attempted to save the pdf files in the Solutions folder but the pdf was not compatible.
With me adding the files this way, will users who do not have access to the S drive folder be able to display the files? Also, will the files remain accessible in the program if they are deleted from the S drive? If not, how should I be referencing the files in my project? Do I have to reference the pdf files from My Resources? If so, how do I do that in an If-Then statement similar to the one above?
from what you have there it doesn't look like the pdfs in the S:\ would be available to anyone who doesn't have the drive mapped on their local machine.
as for if the files are deleted, if they are being loaded from the S:\ then when they are deleted from there the program will not be able to find them to load them.
if the program is being installed on the local machines you might want to look at just including the pdfs in the installer and accessing them through the program files path.

How to find all references to a specific file in source control within Team Foundation Server

I am trying to find the simplest best way to find all the programs in our source control that use a particular .vb file. Is there an easy way to do this or do I just need to go through each program and search for my particular file?
Ok thanks to some of my colleagues here is how to do it. To find any files within your project you can search the .vbproj file. If you download grepWin you can search a directory for a specified file based on its ext. (.vbproj), then you can put in the file you are looking for and search. It will return a listing of all the programs/.vbproj files that contain the text you searched for.

How to Get a File Path in a Specific Project in a Web Application Solution?

I'm writing a Visual Studio Macro and need to read a XML file in my project and write something. i can't get the correct file path!
in my web application solution i have to projects for business and UI files. and my xml file named fa.xml located on UI project in a separate folder. i want to use this macro for many solutions. but the structure is the same.
How can I get the Path of a file in a specific project in my solution?
OK, I'm just going to check for the file. You should get the general idea:
If my.computer.filesystem.fileexists(application.startuppath + "\blabla\fa.xml") then
...
end if

Create MSBuild task that recursively copies a folder to several projects in my solution

I'm new to MSBuild and I tried reading up on several sources on the net but I'm missing somet things..
Here's what I want:
A build task that on execution recursively copies a directory structure from a (hardcoded/configured) path on my machine to a set of projects in the solution
Then compiles (release/debug, I guess I can make two sets of them)
Preferably this process would be called when I press f5 in VS and is selectable from the release/debug dropdown (with a different name off course).
What I don't get yet:
Where do I place my .proj file? In my root (where my sln file is)?
How can I make VS pick it up (bind it to f5).
Look at the Copy Task examples on how to copy a file structure recursively.