Adding Excel File to Project in Solution Explorer - c#

Selenium WebDriver
Visual Studio 2015
I am trying to add an Excel File that I have existing on my computer to the Solution Explorer in my Project, but when I try to look for the existing item (or add a new item for that matter) looking for an excel file nothing related to a xlsx File exists, not sure if I am missing a nuget package I have tried to download everyting i know pertinent to the project. please help

You don't add the file using the Add Item dialogue.
You can right click on the project in the Solution Explorer and go to Add and then Existing Item and find the file in the project directory.
or
You can just put the file in the project's folder directory, check Show All Files in the Solution Explorer panel, and then find the file, wherever you put it in the directory, right click and then go to Include In Project.

Related

Import ASP.NET Page to Existing ASP.NET Project

I am new to ASP.NET and I was asked to create a portal program which will be just a part of the existing ASP.NET portal project. Meaning, it will be just like 2 web pages and will be going to be added to the existing project. The thing is I have to do it in a separate ASP.NET Project file. I have the source code of the existing main project but I am not allowed to modify this unless the pages that I will develop are completed. How can I do it? I know I just have to create a new project but what is the next step after that? How can I import the one that I made to the main project? They mention that I just have to export it as DLL but I have no idea how to do that. Please help me.
Open your new project in Visual Studio.
Open the old project in Visual Studio.
Right click the name of your new project on Solution Explorer, select Open Folder in File Explorer
Copy the 2 new pages you created
Go to the Visual Studio Instance of your old project. Click the name of the solution and CTRL + V or Right Click > Paste. (If there is a folder let's say Pages where ASPX files are located, click and paste there instead).
Your new files might not be included in the project and if its happens, click the 'Show all Files' option on the Solution Explorer.
Right click on the 2 new ASPX files and select 'Include In Project'.
I am not sure if I understood you right. If you just have to export the dll from the project that you created, right click on your solution, open the bin folder, you will see a file named yourprojectname.dll. Copy this to your target projects bin folder using the steps mentioned above.
If I understood it right, you are being asked to created a classlibrary or something and not an aspx page. Again, I might be wrong, but others can help you if you are lucid about your requirement.

Extracting a project as a separate project from the Visual Studio solution

I'm using Visual Studio 2013 and I have a solution that contains multiple projects.
I would like to extract one project from a solution to create a new, separate solution, that would only contain this one project.
Does anyone know how to do this?
If by "Extract", you mean "Duplicate" your project and start a new solution with this project, here is what you can do:
Create a new solution in Visual Studio
Copy your Project folder in the root of the new solution
Right click on the solution => Add existing Project and select
the project file (*.csproj in this case)
Copy the project folder into separate folder, open the .csproj file, press CTRL + S, it will open the save dialog and you will save the .sln file. That is it.
Right click on any project, then Exclude from Project. The excluded files will be in the project folder. Move those files to another folder, in the way you want it. Then you can create and add those files in new project by Add existing item

make VS2012 get the added files of a TFS solution

I am new in TFS, i have did GetLatestVersion but all newly added file in TFS was not getting in visual stdio but i can see those added file in TFS Server. Please suggest?
Click on the Show All Files in solution explorer to see the newly added file. It will be greyed out. Right click on the file and select Include to get it added to your project or soltion.
Common problem is that file will be present in source control but not included into the solution.
You can do it this way:
File > Source Control > Advanced > Open from Source Control
Find you Team Project
Open its .proj, .sln file, whichever is appropriate
Select 'Yes' / 'Overwrite' if it says you have the same files locally
This will ensure you get all the files from source control, rather than just those in your local project definition.

Set file to be opened automatically when opening a C# solution in Visual Studio

I changed the name of my folder which holds my project. Now when i open the project in Visual Studio, no files open automatically. It is important that i submit this project very professionally. Is there a way that i can make my Form.cs file show automatically in VS when the project is opened, as it does by default if you do not change the project folder name?
You will need to right click on the project in Solution Explorer, go to:
Add -> Existing Item
Then find your Form.cs file

.sln file lost, then how to run a project which has a database connection?

I have created a project of Online Book Shop like Flipkart but now I lost my .sln file of this project, it has a database connection so how can I create a new .sln file and run my project??
I tried to make blank .sln file and want to add all files of my project but failed to do that so anyone has a solution share.....
Go to file-> New Project in Visual Studio. Then go to "Other Project Types"-> "Visual Studio Solutions". You should see "Blank Solution". Just create a blank solution. Once you have that right click on the solution and go to "Add"->"Existing Project" and select your projects.
Solutions contains projects. So you have to add projects to a blank solution.
So, first create a new blank solution. Then right click on the solution icon and select Add existing project. Then browse to the project folder and select the .*proj file.
Finally check if any external reference is missing, and add it to the project references.
At this point you should be able to build the solution.

Categories

Resources