I created a powershell script that gets all the pdb files from the drop location after the build is set to release and copies them to a folder that is shared on the network.
I also created a sample application and I added the nuget packages that contain the assemblies that I need (without the pdb files).
I found some references on the net, but I was unable to debug my assemblies using the pdb files. I am using a VPN connection to connect to the shared folder that contains the pdb files and Visual Studio 2010.
What are the exact steps that I need to make in order to use the pdb files that are shared on the network to be able to debug the assemblies that I get using nuget package manager?
Thanks !
If you are looking for a good overview of symbols, Symbol Server, and more importantly Source Server indexing, check out http://bit.ly/SymbolServerTFS which is a blog post I wrote a while back talking about all of them. I specifically talked about it in terms of using Team Foundation Server but it's good information even if you aren't using TFS.
Also, if you want to make this experience better, please vote for my feature request on Uservoice: http://bit.ly/AtLSjl We definitely would appreciate the added voices & votes!
You could try, as a simple solution, VS/Tools/Options/Debugging/Symbols - and try set your symbols cache to your network share (haven't tried this before but might work, map drive etc. if needed).
At least that could get you running temporarily - and make sure you have automatically load for 'all modules' or specify yours.
hope this helps some.
Just define it at Options->Debugging->Symbols->Symbol file (.pdb) locations
Detailed instructions on MSDN
Related
I have students in high school who have created some programs using Visual Studio C#. They created some games and would like to now upload them to the web. I am pretty new to Visual Studio C#. I thought after a program was "built" that you could go into the bin/debug folder and get the exe file for the program and be able to play the game without having to have Visual Studio on the actual computer you are playing it on. It works with some of their games but some of them, there are graphical files that are missing in the exe file if all the other files aren't stored in the same place. How can I get a clean exe of their game? Can that exe be loaded up onto a web server so they can play it from there or at least download it from there?
Microsoft wrote a guide on how to do exactly this. It's on their MSDN website, which is sort of like the developer back-bone for a lot of Microsoft software and documentation.
Old guide: Adding and Editing Resources (Visual C#)
Newer guide: How to: Add or Remove Resources
The gist is that the program needs to know where the files are, relative to the location of the compiled binary (in this case, an .EXE); There's several different ways to do this, depending on your level of expertise. I would suggest that you take a look at the guides above to start that journey.
there's a few ways of doing this. (Also, make sure you're creating a 'release' build when you compile).
You can include resources in your game by creating a resources file. This is something I usually do only on winforms applications etc.
If you have on-disk files you need to distribute those on-disk files along side your game. You could do this by zipping up your game.exe and the /files/images.img folder (or what ever your resources content folder is named).
If you're feeling adventurous you could create a 'deployment project' which is a project that allows you to create an installer file. This is a bit more work however you will have fine grained control over what files go where etc.
Good luck!
EXE files generally aren't self contained for video games with many resources, just add resources in an external folder and make sure the paths to the resources in their games are not absolute but relative in the local directory.
So for example:
get rid of paths like C:/Users/Bob/Desktop/Game/Images/player.png and replace with /Images/Player.png.
Also, an EXE generally doesn't run client side on webpages, it is possible but difficult. Things such as Flash are made for this sort of issue. I'd say make the webpage a place where they can download their games. Github has a nice way to do free websites called gh-pages. OFC, you could host one yourself but that would require a lot of setup work.
Like Monza said, you can zip up the files for download. Or, you could create an installer if you wanted to be really ambitious.
I thought after a program was "built" that you could go into the bin/debug folder and get the exe file for the program and be able to play the game without having to have Visual Studio on the actual computer you are playing it on.
That is correct, given that the other machine has the necessary .NET framework version installed AND any other resources like .dll files and config files are also present. When the application is ready for release, you can set the Build options in the project properties to Release, and then when you build all the files needed for distribution will be in the bin\Release folder.
It works with some of their games but some of them, there are graphical files that are missing in the exe file if all the other files aren't stored in the same place.
This may depend on how the application was written. If resources like pictures are embedded in the assembly then those files will not be needed to run on another machine. If the application is using hard coded paths for the image resources in the source code, then the application will likely break if the necessary files aren't present when the .exe is executed.
Can that exe be loaded up onto a web server so they can play it from there or at least download it from there?
Yes - you could upload the .exe to a file server to make available for a download, but you would not be able to run it within a browser over the web. I would recommend zipping up the .exe and other files needed and hosting the .zip file on the web server for download; browsers may give a warning or block downloading an .exe .
Hope this explains it a little bit for you.
I've trying to develop while also creating a COM .DLL for my shell icon overlay and context stuff, so i do some search on the tool to make this happens, then i found SharpShell, the shell extension helper tool.
I've been using sharpshell to create an example .DLL, once its generated, i used their "Server Manager" to automatically helps register my .DLL to the registry and the server is loaded properly.
On the Registry, I've seen them registered properly, but i don't see any change in my UI. So i tried to download "Shell Ext Viewer - Shexview - 64 Bit. "
After i opened my shell lists, i saw my Dll was registered there, but they are reading my .DLL files in C:\Windows\Assembly\GAC_MSIL\ folder.
So i tried browsing them in in my Explorer, but i find out that i dont have GAC Assembly.
I further checked articles for help, i found out that they're .nEt extensions, and i also checked my .NET, all of the .NETs from 4.0 are installed properly, but i dont have GAC_MSIL in my assembly. What should i do in order to tell my Shell to open my dll file into a correct file? is there any a way from visual studio where can i register my Dll and server to a specified folder, instead of GAC_MSIL folder, because i am missing it?
Thank you, and i would really appreciate your help !
There are some limitations for OverlayIcons. You have only 15 slots for OverlayIcons. If you have Dropbox or Google Drive installed (or Subversion) > you have already lost, because no slots are available anymore.
But there some way to make bigger Priority for your ShellExtensions. Read here more https://github.com/dwmkerr/sharpshell/issues/93
I've installed Stylecop via NuGet. I wish to disable some rules, and I know this can be done via a configuration file from what I've read. However, I can't find the file anywhere, and there seems to be little documentation describing where to create the file.
How do I go about making the file?
Edit: As this question still seems to be getting attention a couple of years later, I recommend using Roslyn Analyzer based StyleCop now.
This has a few advantages:
It's actually maintained and active.
Takes advantage of Roslyn, and can perform some changes for you.
It's a NuGet package so is installed as part of your projects, meaning you no longer need to install the seemingly unmaintained StyleCop Visual Studio extension (that's if you can even find the right place to download it from in the first place!). This way you can enforce code style/conventions much easier in for example OSS.
Automatically creates the .ruleset file for you, and as a result of using Roslyn Analyzers you get IDE support for enabling/disabling rules.
If you installed Stylecop via NuGet (the StyleCop.MSBuild package), then you will not have the folder detailed in the other answers.
You will find the file in your project folder here:
packages\StyleCop.MSBuild.{version}\tools\Settings.StyleCop
You should copy this file to the root of your project.
If you would rather not manually edit the file, there is also a nice gui tool called StyleCopSettingsEditor in the tools folder, which you can just drag your settings file onto.
If you copy the Settings.StyleCop file to the root of the solution, then it will be inherited by all projects. This means it can be kept in Source Control and accessed by any Continuous Integration server you are using.
If you reference and alter the file in C:\Program Files (x86)\StyleCop {{version}}\Settings.StyleCop this needs to be kept inline on each developer's PC. where as copying it to the root of the solution
The file Settings.StyleCop should be located in your install directory, on my machine it's here:
C:\Program Files (x86)\StyleCop 4.7\Settings.StyleCop
You can edit the rule settings by opening this file with StyleCopSettingsEditor.exe, located in the same directory (double-clicking the settings file will do the trick).
Sorry, a bit of a noobish question here...spent an hour on Google and in MSs help documents, my head appears to be in the wrong place, I can't figure this out.
I have a C# project set up in Visual Studio 2012 that has references to a few .dlls that I have on my own hard drive (NetOffice .dlls to be specific, for Excel Interop). I've been adding them by right clicking on my references folder, going to Add Reference and then going to Browse to find the files. At that point they are included and everything works as expected on my side.
The problem occurs when I share the project. I'm using Git to keep the project coordinated between myself and a couple team members. I'll run my commit and push it then have my teammate do his pull. Everything shows up on his computer correctly, but when we open up the project it tells me that the NetOffice .dlls are missing.
I'm guess that this is because the files are only linked locally on my computer, but I can't figure out, for the life of me, how to make the .dlls exist in the file structure so that they travel with the project when I push it.
We have a few NuGet packages we use as well, and they seem to work just fine after being transferred. I've also gone into the .dll properties for NetOffice and turned "Copy Local" to true, yet it's still not included.
All I want is to be able to link references and then send the whole thing (dlls included) to my teammate, what am I doing wrong? I figured I would want to simply include the .dlls in the project structure but... I'm just not understanding something. Any help please?
1 Create a folder in the file system at the same level as the solution file.
2 Copy the external dll's to that folder.
3 Add a Solution Folder tho the solution.
4 Add each dll to the the solution folder using add existing item
5 Reference the Dll's in the solution
The steps 3 and 4 aren't really necessary, but they help to keep things organized.
Lets assume your source control root folder is called SourceRoot
and your solution files are under a folder called JaySolutionFolder
I prefer:
Adding a new folder to your source control, under SourceRoot, called SharedDlls
Copy all external Dlls to this Folder.
Add this dll references form SharedDlls to your project.
Commit this folder
Now your teammates have to get JaySolutionFolder & SharedDlls to compile the sources.
Later this SharedDlls could be target directory of Build process (Using tools like TFS Bulid, NANT or else)
This will be a way to minimize team based development problems.
In release and software installation, you can use installers or software package builders like installshield or Visual Studio Setup Package or ... to solve external dlls problem
Hop this helps.
Although it's not good practise to include binaries in your git repository, doing so will solve your problem.
The quick fix could be to create lib directories in sensible locations within your repository (I'm not a C# developer but Gama Felix's suggestion seems correct).
Then commit these folders and push to the server.
I googled "Open Office C#" and found a commonly reoccurring tutorial: http://www.opendocument4all.com/download/OpenOffice.net.pdf
The trouble is this portion (snippet from pdf):
Change from the Visual Studio window to a Explorer window. Move to the
CLI assemblies folder. You will find them in your OpenOffice program
installation path in the folder named “assembly”. In this folder you
should see the following .net assemblies.
I do not have this "assembly" folder. I navigated to:
C:\Program Files (x86)\OpenOffice.org 3
It simply is not there. I have to create reports using C#.
As per comments above from the OP the goal is to create DOC or DOCX:
For creating DOCX there is a FREE option (OpenXML from MS) available...
For creating the older DOC format (among lots of other things there is for example Aspose.Words (commercial - just a happy customer, not affilliated).
EDIT - as per comment:
All above options work independently of Word (i.e. don't need Office present/installed on the machine).
I'm not sure Yahia understood what you were asking...
As, I had the same issue (I think), I thought I would share the solution I found:
In version(s) 3.x+ the cli_* dlls are placed in the GAC and (afak) inaccessible from a VisualStudio project. You have to extract them from the openofficeorg1.cab file (using RAR, WinZip, 7z, whatever).
Here is a link that goes into more detail covering the topic:
http://blog.nkadesign.com/2008/net-working-with-openoffice-3/
BTW, when I did this (successfully), I found 6 such cli_* dlls.
It's worth mentioning that when I came across this tidbit, I had already deleted the initial installation folder that was created during the setup, so I had to uninstal OpenOffice and then reinstall to get that folder back. After that it was easy.
Hope this was of some help.