I have got source code from the site and want to run that small application.
What are the steps and what should I do to run that application?
I have shown the attachment pics showing the files of that application that are:
MRG.Controls.UI
MRG.WinForm.Test
MRG.Controls.sln
MRG.Controls.suo
now the folder MRG.Controls.UI have the following files,
Properties
LoadingCircle.cs
LoadingCircle.Designer.cs
LoadingCircleToolStripMenuItem.cs
MRG.Controls.UI.csproj
and the folder MRG.WinForm.Test have the following ones:
Properties
frmMain.cs
frmMain.Designer.cs
frmMain.resx
MRG.WinForm.Test.csproj
MRG.WinForm.Test.csproj.user
Program.cs
If visual studio is installed double click on MRG.Controls.sln file
then press F5 key or Debug->Start debugging from menu item in visual studio application
You need to double-click on the MRG.Controls.sln file which will then open it in Visual Studio. If you don't have the right version of VS.Net installed, you will need to install that, of course.
Once loaded, ensure that the top-level node in Solution Explorer is selected and then press F5.
Related
I have developed an C#, ASP.NET web application in a Windows 7 machine using Visual Studio 2012. Now i had imported the entire project into VS 2017 running on windows 10 machine, and when i try to enter the debugging mode to analyze my code it shows the following error:
I guess the project configurations are conflicting hence it throws this error.
Any suggestions??
The same error happens when Visual Studio solution has selected the wrong Startup Project. The bold project is the designated startup project.
Go to the Solution Explorer > Right click on the correct project and select "Set as StartUp Project" in the context menu.
I also got this error. I ultimately got to know that I was not selecting .sln file.
In VS, you should select .sln file and it automatically loads the complete project structrue is what I learnt.
Selecting .sln file worked for me
These errors are mostly because you are not selecting the .sln or solution file. In your solution explorer tree, double click the solution file and then build and run.
This runs contrary to a users intuition that simply opening a file and running it would work. Consider it a poor user interface. Jet Brains Rider, for instance, does not have this issue.
Change Targeting Platforms with the Configuration Manager and Build the project then try to debug it.I hope this will help you.
Don't export the project folder. upload the .sln file.
It will work.
DLLs cannot be ran/debugged directly. You have to specify host application in the
Configuration Properties>Debugging>Command and then let it load the DLL by itself.
You will most likely need to copy the DLL to the directory searchable by the host application e.g. its root or ./plugins folder.
In the Configuration Properties>Build Events>Post-Build Event>Command Line simply enter something like:
copy "$(TargetPath)" "$(HOST_APP)\plugins"
The Startup Item needs to be a .exe file. It's looking at BusinessLayer.dll because BusinessLayer is currently the Startup Project.
First, build the solution. Then, set the Solution Explorer to folder view and find the .exe in one of you project's /bin folders. Right click on it and set it to the Startup Item.
Finally, click the play button in Visual Studio top bar.
EDIT: Basically the same as Thomas' answer, but I'm pointing out that the "correct project" is the one with the .exe file. I would have commented on his answer, but I have less than 50 rep right now.
ok, let me give you an example of what problem i'm currently facing in my Visual Studio 2013.
I open my solution (MVC 4).
I double-click on a source file in the solution explorer and I put a break point somewhere in the code.
I run the debugger and I navigate in my web application till the visual studio stops on my breakpoint.
I press F5 to continue.
remark: the VS editor has closed my source file where the break point resides.
I press "stop debugging" and I double click on the source file in my solution explorer to open it.
=> nothing happens, the source file is not displayed!
I decide to start again the debugger and make the necessary navigation in my app in order to reach the break point.
=> this time, a tabbed window is displayed (Tab title=source not found).
It invites me to find my source file.
The functionality to "Browse and find" the file does not work neither.
Now, if i want to be able to display my source file again, i must go to the Visual Studio menu -> Window -> Close all documents.
After that, a double-click on the source file in the solution explorer opens and displays the source file
remark: In this menu Window option, i can see that my source file is listed in the opened documents(?!).
So it means that, for the editor, the document is displayed correctly.
Somebody knows what is happening?
I tried to re-install Visual Studio and all updates (Update 4)... but nothing has changed.
Thank you.
Fred
I have a WPF project that I am ready to deploy using Visual Studio 2012 but I'm running into a missing folder issue.
If I Start the project in VS it runs fine and my test button works as expected.
When I Publish the project, the publish succeeds, running setup.exe installs successfully and program starts to main window fine.
Clicking the test button crashes the application.
Line that causes crash:
string[] reportFileNames = System.IO.Directory.GetFiles("Reports");
"Could not find a part of the path 'C:\Users\dirt\AppData\Local\Apps\2.0\GEDD6PQW.N72\8M9ONPGG.TVB\prof..tion_40c30d08e677b188_0001.0000_9a5540d4bfbe5aff\ Reports'."
Confirmed Exists:
C:\MyProject\bin\MyMode\Reports\
C:\MyProject\bin\MyMode\Reports\MyReport.rdlc
Confirmed Does Not Exist: C:\Users\dirt\AppData\Local\Apps\2.0\GEDD6PQW.N72\8M9ONPGG.TVB\prof..tion_40c30d08e677b188_0001.0000_9a5540d4bfbe5aff\Reports\
The Reports\MyReport.rdlc files have a Build Action of Resource and Copy to Output Directory of Copy always.
What am I missing?
Ok, was able to figure this one out rather quickly after typing that last sentence in the question...
In my case the Reports\MyReport.rdlc file had a build action of Resource and all I had to do was change it to Content (and make sure Copy always is set).
Solution:
Right click File in Solution Explorer -> Properties -> Build Action -> Content
I have accidentally removed part of my project thinking that I was in a temp folder.
It is an asp.net-mvc 4 application.
I don´t have tfs or any other program monitoring my filesystem.
I had just publish my application. All I have left is a bunch of compiled files, js, css and images.
Is there any tool from Microsoft that I could perform a reverse engineering with or does VS2012 keep track of files so I could restore it.
Files you delete in Visual Studio go to Windows recycle bin. Unless you cleared it, your files should still be there. Just restore them and than add them to your project as existing items. You can also drag and drop them through Solution Explorer.
EDIT:
You can also click the "Show All Files" button in solution explorer.
The file will appear there, grayed out (if it was only removed from your project - not your disk drive). Then you can right-click it, and add it back to the ptoject. If it's not there try the first approach.
Open folder/solution of the deleted items in 'Windows File Explorer'
Press Ctrl+z (undo). This will instruct windows to undo the last actions on the folder
Go to the Visual Studio solution again
Click 'Show All files' icon on Solutions explorer
Click Refresh
Include the files again
PS. Its always safer to use a version control system, to make sure you can retrieve not just the file itself but any previously checked-in state. http://www.incredible-web.com/blog/revision-control-systems/
Try this:
Right click in your project;
click on "Open Folder in File Explorer";
open your project folder;
once the project folder is open just do a "ctrl + z".
Deleted files in visual studio should end up in the recycle bin if you have it enabled. If it has not been cleared out, you can restore it.
No file is really "deleted" when you delete it. It is usually marked as deleted but still can easily be restored by tools. One such tool is made by a company called AccessData that makes forensic investigation software called Forensic Toolkit. They have a program called FTK Imager which can create an image of a drive or folder and even show you deleted files which you can restore. This portion of their software is free. FTK Imager Download Maybe give it a try.
Lastly, learn to use subversion or other version control software (git, tfs) so this doesn't happen to you in the future and backup your stuff
Sorry i'm explaining in Visual Studio 2015, but options are same, just go through my steps.
Step 1: Open solution Explorer, right click on your project then Click on Open Folder In File Explorer.
Step 2: After open file Explorer Press "Ctrl+z" keys, this will have undo your deleted files.
Step 3: come back to visual studio, press refresh icon in solution explorer, you would have find your deleted files within dotted box.
enter image description here
Step 4: Right click on the Dotted file and select Option include in project.
enter image description here
that's it. now your deleted files are included in project.
Windows OS creates restore points when Windows Updates are applied. If you damaged a code module, like I did today, you might be able to right click on it from Windows Explorer and choose "Restore previous versions". The same option is available at the folder level.
Go to the Visual Studio solution
Click 'Show All files' icon on Solutions explorer
Click Refresh
Include the files again
and you can visit: Remove git mapping in Visual Studio 2015
There was only one project in the solution & I accidentally removed it. Good thing was I realized it on earlier stage & when I tried to close the solution, visual studio asked me to save the solution file. I said no & when i reloaded that solution, project was there.
Yeah, it is easy to restore.
Step 1: Go to recycle bin and restore the deleted items.
Step 2: In Visual Studio ,right click on the project and click add > Existing Items (Here you can add the deleted items)
On the top bar menu, select file then on the drop-down select Revert file
The deleted file will be restored.
Go to Source Contror in the left side of visual studio code editor and click on it , you will see the deleted files , mouse hover on file and click on Discard Change.
Your file will restore .
Just go to Recycle Bin and press the restore.you will find the deleted file in the file explorer in the software file.
i got a problem with my site with my app_code files and a lot of question ive read people say you need to change the proprties of the .cs files to Build Action.
by right clicking the .cs files and press proprties.
but...
when i right clicking the files i cant see any option called proprties so i press F4 and it open a proprties window and i just click on the .cs file and still cant see any option i can change somthing to Build Action.
any idea why i cant see this options?
EDIT:
my problem is that when i get in the file proprties i have only 2 options...
thay are called:
1.Full Name
2.Full Path
EDIT2:
here what i see in visual studio 2010 when i try access the protrtie menu/window
http://img338.imageshack.us/img338/2359/blac.png
As Microsoft points out in the article "Web Application Projects versus Web Site Projects":
Web application projects use Visual Studio project files (.csproj or
.vbproj) to keep track of information about the project. Among other
tasks, this makes it possible to specify which files are included in
or excluded from the project, and therefore which files are compiled
during a build.
An answer to a similiar question at CodeProject's forums reveals a hint. Abstract:
[...] Looks like you are working on a web application that is actually a
Website as per Visual Studio. You would need to create a new Web Application
and probably copy over the source files there. [...]
http://www.codeproject.com/Questions/173637/Setting-Build-Action-for-Files-in-App_Data
Have you tried this:
You say you haven't got the option being suggested by other posters.
If this is the case, than it is quite possible that your Visual Studio settings are corrupt; this can give rise to all sorts of odd behaviour.
I would suggest you reset your settings, but please be aware you will lose any custom IDE settings that you've previously applied.
Try this:
In Visual Studio, go to Tools->Import and Export Settings
Choose "Reset All Settings" and click Next
Choose to save your current settings if you wish, or select "no" and then click next.
Choose the collection of settings( he IDE preset) you want, probably "Visual C# Development Settings"
Visual Studio will now revert all settings. Hopefully this will make the Build Action reappear.
[EDIT]
It might be worth trying safe mode too.
To do this, start up a "Visual Studio Command Prompt" from your start menu/programs list in Windows, and start Visual Studio with
devenv.exe /SafeMode
Does this make the options appear?
You can copy the file from Windows Explorer and paste it in the Solution Explorer. It will replace (or do nothing but incorporating it in the proj file) the file and recognize it as C#.
Normally you should see a Property named "Build Action" in the first line of the Property Window. This property should be set to "Compile".
Please select file and right click on it so that you will get following screen
Than click on the Properties you will get following screen
You can find build option in as a first option.