How do I check out a file in tfs? - c#

I have a Setup/Deployment project for my C# and attempting to delete a file from the 'File System on Target Machine' -> Application Folder -> ConverterModule. But I get this error:
The command you are attempting cannot
be completed because the file
'AS_renderingServer.vdproj' is under
source code control and is not checked
out.
How do I check out a vdproj-file? According to Microsoft I should:
In Solution Explorer, select the
referenced file. On the File menu,
choose Check Out.
That sounds pretty easy, except that the vdproj-file doesn't seem to appear anywhere in the Solution Explorer. How can I select it?

Open the Team Explorer, double click on "Source Control" inside your team project and locate the file in the source control browser.
Alternatively, simple right click on the setup project in the solution explorer and select "Check Out for edit...", because that project represents the project file.

If the file you wish to check out isn't in your solution, you can also check out files by browsing to the file in question in Team Explorer \ Source Control .. right click the file to Check Out for Edit

Related

File not found: mtbs/builds/z.iOS/yyy/Resources/Images.xcassets/LaunchImages.launchimage/Contents.json

I get an error when I try to build a xamarin forms project for ios. it says:
File not found: /Users/xxx/Library/Caches/Xamarin/mtbs/builds/yyy.iOS/75685cd3b44330ec65532060f5af8281/Resources/Images.xcassets/LaunchImages.launchimage/Contents.json
even though the Contents.json file exists in the specified location.
Sometimes I add a new file to Resources, but forget to include it to my VS project. Then the same error appears.
Check if the file is included in your project in the Solution Explorer. If not, click on the folder and then there is a button in the Solution Explorer called “Show All Files”.
Then find your file, right click on it and press “Include in Project”.

User manual text file not available in the exe version

I've just made my program an exe via publish in visual studio. In that i included a usermanual.txt and a aboutus.txt file which are in bin>debug folder. After i published the program and run it. Those files are not viewing saying cannot find the file. How can i fix this
Make sure your files are included in Solution Explorer. If not, add them (Right click on project -> Add -> Existing item... then select them from disk).
This way your manuals will be part of your project.
Then, you should setup that those files are copied to same folder as your exe (bin\debug or bin\release). To to that right click on them, select Properties and notice Copy to output directory setting. It has to have "Always" or "Copy if newer" option selected.
In your code, to open file, use path like this:
string userManualPath = Path.Combine(Application.StartupPath, "usermanual.txt");
that will open file in same directory as application's .exe.
When editing your manual (adding some new text), edit the one in solution, and the changes will reflect to either debug or release or published version.

Checkedin a New Folder to the Solution , But when Changeset is Downloaded it wont show in Solution Explorer

Added a New Folder(with a User Control and a WPF Window) and my friend checkedin. So I downloaded that changeset via TFS , but it wont show the Newly added folder in the solution explorer. But it will show that folder in the local location where the solution exists.
So , is there anyway I can add back the folder to the Solution ?
is this normal ?
If you see the folder in the Windows Explorer and not in Solution Explorer you can click on the "Show all Files" button in top of the Solutions Explorer and add the folder in your solution.
If you just downloaded the project from the TFS and the folder is not visible, then may be your friend did not committed the .csproj file. Please check this with him.
Sounds like the sln file wasn't checked in with the changeset. Get your friend to check it in.

Can't "save as" or copy a C# project

I want to copy a C# project so I can make some changes to it while keeping the old one.
When I copy its whole folder, the solution file does not open on Visual Studio 2008. Visual Studio starts and it does not open anything.
There is no "built-in" tool for this.
In Solution Explorer, Right-Click your solution and select "Open Folder in Windows Explorer":
In Windows Explorer, select one folder up:
Right-Click your Project's folder, then Copy it to the Clipboard:
Now, simply Paste your Clipboard contents in the same directory or in another directory.
NOTE: If your project uses relative path names and you paste your project into a different directory, you will need to go in and fix any broken link references.
If you are opening the solution file, you will need to open the solution explorer pane in Visual Studio and then select the project/file you want to open.
Do you right click the folder, select copy, and then paste the copy? You can copy the whole folder and simply rename the folder to something else. There shouldn't be any problems with that. I have done this many times and always was able to open the copy.
Visual Studio 2013 Express is free and out right now. Try it if everything else fails.

Link to config file in .Net setup project

I am creating an installer for my C# application, and I want to put a link to the configuration file into the start menu, so that users can open it for editing in notepad from the program folder in the start menu.
I seem not to be able to put a link to it however - does anyone know how to do this? (Really, I would just love to put "[targetdir]\myapp.exe.config but VS doesn't let me edit the field, only select from a file browser).
Many thanks,
Rob
I found the solution and it's pretty easy:
Add Project Output for your project in the setup project
Select Project Output from File System in left pane and go to the properties of the project output. Then add a filter *.config to remove the .config file from your project output.
Rename the app.config from your actual project to the output name that your App exe ([ProductName]) will have along with the config extension ofcourse.
Add the [ProductName].config to your setup project as a File.
Create a Shortcut to that file and add it in any setup folder desktop or program folder.
Voila.
You're all set.
Isn't the config file added in your installer? You should be able to select it when prompted for the shortcut target (the "Select Item in Project" dialog). Please note that in this prompt dialog you first need to browse to the folder which contains it (for example double-click "Application Folder").
If the config file is not added, you need to manually add it in "Application Folder". Only then you can create a shortcut to it.
Please note that Visual Studio doesn't support shortcuts to a specific file from a project output which generates multiple files. In this case you can try using a custom action which creates the shortcut through custom code.
I remember doing it in Vs2005 using as below:
File System Editor > Users Programs Menu
Add> Folder
Add file (Say Config file) point it to the its location

Categories