Hi I currently have a uni course in f#, where i need to use a .dll file that my professor made, in my code. In this picture, the parser.dll file has a red circle around it, and the current f# file has a blue:
Now the parser.dll is a parser that i need to pass some strings to, and get some output in my f# program.
My professor is for some reason able to acces this file by simply putting the parser.dll file in the current directory. When i do this in visual studio, the .dll file is hidden in the file explorer, and i am not ablue to acces it in the code either.
Now i could read some places that it could be a good idea to create references to it in the solution explorer>add>Reference>Browse, and try to find it on my machine (tried a few different locations), it is still hidden to me in the browse tool.
What is the best thing for me to do? and why is my dll file hidden from me when I attempt to add it using the "browse feature"?
Thank you
Related
I have a project where the referenced assemblies have symbol files available. Both pdb, and the source files themselves. (they are all my own libraries). The symbols are all listed in the Tools / Options / Debugging / Symbol marking their locations. Thats all fine.
But it's working with them, i'd like to know:
Is there a way in Visual studio to set a breakpoint in a file of the symbol before having to debug line by line to get to the code in question.
To be clear, if i step line by line i can eventually hit the source (because of using the symbol files) code i'm after. But some times getting to that location is not easy, because it's so nested within multiple symbol files. BUT once i eventually step deep enough and find the code, i can set the breakpoint, and from there on stop and start the main application and get to that location without trouble. The file code and all is even listed in the open file pane, for easy view.
Is there any way, if i know the file and line of code i want to break at, open that file in VS and set the breakpoint directly?
Hopefully i was clear in the description. Let me know if i need to reword.
tx
I bet the code you want to put a breakpoint is in a function (;)) so I would use a New breakpoint option from Visual Studio. This allows you to put a method name that VS should break on when entering the method (so basically on the first { after the function name).
After pressing CTRL+B you will be presented with the dialog
Here you specify a function name you want to put a breakpoint on.
You can just specify just the name (like. AppendText) or fully qualified name (with namespace - System.Windows.Forms.TextBoxBase.AppendText). If you want to narrow it down to a specific module user module_name!function_name syntax. If needed you can specify on which of the overloaded function you want to break on.
All this info you can get by hovering over an (i) icon on this dialog.
OK. Knew there had to be a way. And it's very simple.
As stated, if you have the symbol and source available for the Nuget packages you are working with follow these steps:
open the main project in question in Visual Studio.
In VS, click File / Open File...
Under your PACKAGES Folder, locate the package for the reference you want to set breakpoint.
In that package locate the source code folder that was packaged along with the pdb file.
There you will find the source code. Now locate the file you want the breakpoint placed in. Click that file to OPEN the file in Visual Studio.
That file is now OPEN in your VS viewer, but it is not included as a new file in your project (good thing).
Place breakpoint where you want.
Run solution. Now you don't have to step through your entire solution to get to the code you wanted to review with that breakpoint!
what a relief!
I don't understand how it works. I'm new to Team Foundation Server and currently I have a small team. The co-worker can open my project file and run just fine (by double clicking the solution file right in the source control explorer window).
I can open my project file the same way but cannot open his project file. Clicking the solution file does load the solution but the files in there cannot be opened. It says something like this:
Cannot find the file "d:\....". It may have been moved or deleted.
The path "d:...." is actually the path on his machine. While in my machine it's mapped to a different path. But I don't understand why it cannot recognize it.
At first I thought the mapped path structure should be the same across all members' machines but if so my co-worker could have not opened my project file.
The status of the solution is Yes for Latest, meaning the files are loaded and copied to my local folder normally. Not sure if it matters but I'm using Visual Studio 2015 and my co-worker uses Visual Studio 2013.
I've tried searching around but could not find anything with the error message. It's so interesting that my co-worker does not have to do something special or self-aware so that he could tell me something to solve this. I hope you have some experience on this and give me some helpful suggestion. Thank you!
Edit:
To clarify it more, if I browse the file directly inside the source control explorer window, the file can be opened (but if it such as is some designer-supported file like .xaml - the designer then is not shown up). What I'm having trouble with is opening the file loaded in the solution (inside the Solution Explorer window). As I said clicking the solution file in Source Control Explorer window does load the solution, but because there is something wrong with the files path, I cannot open them as well as build and run the solution.
Right-clicking on the file in the loaded solution, select Properties, I can see that the Full Path is actually the path on his machine, so weird.
It sounds like your workspace is all messed up. Are you trying to share a workspace?
If so you should not. Each developer should have their own workspace local to their computer that is unique to them.
Try creating a new workspace and using that...
I am learning windows phone app.
This
is the tut used.
It asks to modify .cs file available in solution explorer. For me I can only see .vb file. Kindly tell me how to get .cs file ?
You can write your code in 2 different types of languages, the first one is c#, the second one is visual basic.net. You created a the Project from the type vb.net.
You can safely delete this Project and create a new one, this time with C#.
You may have to give the Project another name because the old one is still on the harddrive
I've run into a problem with VS2010 (it also exists in the latest version, SP1 (10.0.40219.1)):
Add an existing Word file to the "Solution Items" and check this new file in.
Check the file out for editing
Double click on the file and edit it in Word (just make some minor changes)
Save the file (CTRL-S)
Now the file is removed from the "Solution Items" in Visual Studio (you may have to repeat the editing and saving a couple of times)
Update: I'm using Visual SourceSafe 2005.
Despite my research efforts I haven't really found anything on this issue apart from this Microsoft page, and I'd like to know whether there is a way to prevent this problem from happening.
Any ideas are more than welcome, thanks in advance.
G.
After further investigation I think I found the reason behind this behaviour and a workaround.
Please also note that the behaviour described in the original question only occurs for files that are added directly underneath a solution or to a folder that is directly underneath a solution.
The reason
I'm not sure whether the following is 100% correct, but the main point is how Word (and probably other MS Office apps as well) saves an existing file:
Save the current version of the file to a temporary file
Rename the original file so it can be used later in case something goes wrong
Copy the temporary file to the location of the original file, using the original file's name
Delete the original file (that was renamed in step 2)
Visual Studio picks up that the file doesn't exist (for a very short time though) and removes it from its tree and the .sln file. This can also be reproduced by manually adding any kind of file, checking it out (if not checked out), renaming it to a different name and then back to its original name => file is no longer shown in Visual Studio.
The workaround
I've created an empty project template following the steps on Microsoft's site. I also set the output to "Class Library" so that the project would compile even if no static main method exists. This template can be used to add a "Documentation" project to an existing solution. Underneath this project you can add files and edit them as you wish, as Visual Studio behaves differently and does not remove the file when it is saved in this constellation.
Obviously this approach is still not very satisfying or elegant, but I hope that it may be helpful for others who might run into the same problem.
G.
I've run into the same issue. I simply undo changes for the solution after I've closed the document file and the solution files will be as they originally were before your document changes.
When exporting a Visual Studio project to a Template (File/Export Template...) I get the following error upon clicking the Finish button:
Unable to read an exported file for the following
reason: The file cannot be opened with the selected
editor. Please choose another editor.
Screenshot http://img687.yfrog.com/img687/1756/templateerror.png
A Google search for this error has only led to several dead ends. There aren't any unusual file types in this project. Any ideas what could be going on?
By laborious trial and error (start with an empty project, add a folder, try to export template) I was able to narrow this down to a single Javascript file. As it happens, it's one of the language definitions for prettify.js (which is used on this site for code coloring). The file in question is lang-hs.js, and for some reason Windows on my machine treats this file differently from other Javascript files: It opens in Notepad, when I have the .js extension mapped to Visual Studio.
I'm not sure what the underlying explanation is, but I've already wasted enough time on this and I believe I can live without Haskell code coloring (!) so I'm just deleting this file and moving on.
It seems ".cur" files are often a culprit in this error. I have removed them from my project and now the exportation works correctly.
Microsoft staff suggest looking at log files (../windows/system32/compmgmt.msc) but this error does not spawn an entry into the Application EventLog.