I have a different problem nowadays. As I am developing a program that contains lots of plug-ins, When I debug my program, I see that some of my plugins are not loaded . I have controlled all .dlls and I can see the not installed plugin's .dll in the folder.
Tha problem occurs just on Debug, when I make a Relase I can see all non-existing plugins.
What might be the problem ?
Thank you all
You have put them in the wrong folder (which is used for release build).
Debug build folder is usually different than Release, so put your dlls there also.
Related
I'm a bit of a noob on that topic so I'm searching for help. I need to install this library (https://github.com/twcclegg/libphonenumber-csharp) for a unity project where I need to check phone numbers.
But as I always made simple games in unity I really don't know how to do that and I don't really know either what to search to find an answer.
If anyone of you knows how to do it, it will really make my day.
Thank you
Once do a build on a project you want to use in Unity, then find the DLL output from the build. I recommend you do Release Builds, but for now if you are not familiar with Visual Studio just use what you were able to build. If there are multiple directories then you only need one - the best one to use would be any labelled ".NET Standard" which it seems you have a .net standard 2.0 directory.
Go to your Unity project in the Assets folder, and if there isn't already a Plugins folder create one. Then in Assets/Plugins create a folder named whatever you want for the library - in this case PhoneNumber would be fine. So you would have Assets/Plugins/PhoneNumber and you would copy/paste the contents of your NetStandard2 folder there.
In the end you should have Assets/Plugins/PhoneNumber/PhoneNumber.dll
As soon as you have that dll, you can switch back to Unity and see if it worked by checking the Unity Console for any Errors. You might receive errors saying it could not load the DLL. Almost always if it can not load the DLL it is because of missing dependent DLLs - which is why I said to copy the entire folder contents inside the "NetStandard2" folder since it may contain more than just PhoneNumber.dll - it may have it's necessary dependent dlls also.
If not, you can read the error output and hopefully get a clue as to what dependent dlls are missing. You can also expand the Dependencies in Visual Studio.
Typically the DLL failing to be loaded in Unity is because of missing dependent DLLs. Expanding the Dependencies, which is found under the project name in the Solution Explorer window on the right side of Visual Studio, will show you what libraries it requires. Most of what you see under dependencies (if not all) will require a similarly named dll. Under the netstandard2.0 dependency I see System.Collections.Immutable - so you may need a System.Collections.Immutable.dll which should (usually) be in the output folder when you build the project. You would also need that dll in Unity in your PhoneNumber folder along with PhoneNumber.dll
I have a (mostly C#) solution that needs to build in x64 because I integrate with a C++ project, so I had to choose a platform.
I noticed that my code changes don't always show up at runtime and I found out that when Solution is Debug x64 it compiles the changed project but does not copy the dll to the bin of the startup project, so the debug session uses an older version of that dll.
I tried most variations of building, and the dll-copy never happens, except when I rebuild the startup project, or the solution, obviously...
When on AnyCpu, all works perfectly all the time. So, alternate solution: maybe I can use the C++ project and keep my C# projects on anycpu?
All projects are enabled in the solution config for both anycpu and x64.
Any suggestions I could look out for?
Because the problematic project was a dependency of a dependency of the startup assembly, I tried adding a direct reference to it from the startup project. The issue disappeared...
Of course, I prefer not having refs that aren't really necessary, so when I removed that new reference again, it kept working. So, now I cannot simulate the issue anymore.
Using git the only change I can see is that the ProjectReference is now a lowercase guid, and it was uppercase... This probably happened when I gave re-referenced the project a try earlier... odd stuff shrug
I am using VS 2010 professional [64bit - Windows 7] and in my solutions, i have 3 class library project and 1 wcf service projects are there. All these dll's are refereneced in my WPF applications. For the last 1 year, it was working fine and i was able to debug the all the referenced projects. But from yesterday itself, debug is not working all of a sudden.
When I put a break point on a class in the wcf project, it says breakpoints cannot hit as the source file is different from....etc.
When I checked in the Debug --> Windows ---> Modules window, all those projects dlls are not seen there and says no pdb files are available ???
But in the WPF bin\Debug folder, i have all the referenced dlls and their pdb are ther.
What could be the problem ?
Even I am not able to debugg the wpf project as well. For getting break point or debug, each time i have to clean the solution or project then rebuild it again. Then i will be able to debug the WPF project.
In the case of referenced dlls, I removed the dlls and added the new compiled dll again and copied that pdb files to the wpf project exe folder. Still no use !!!!
I have changed the options in the Debug and Options [disabling and enabling the Just my code options etc]. But still it is not working.
This is not only my problem. One of my colleague also have this problem we took the whole latest solution code from TFS. SO I changed the Local code path to a new folder and took the latest code from TFS again. Still the problem exists !!
I am able to run the application. But debug is not working. In the WPF project, all those dlls are referenced properly.
Can anyone help us ???
I guess I don't have enough points to comment to ask specifics, so this may or may not solve your problem but I'll take a crack at it. Also, there appear to be other questions about this. So I would check those out first to see if they will help.
This question was solved by adding configuration to tell the program which version of the framework to use during debugging.
Why doesn't VS2010 debugger stop at my breakpoints?
Why does Visual Studio 2008 skip over my break points?
If those don't help, I'll give it a go.
When I put a break point on a class in the wcf project, it says breakpoints cannot hit as the source file is different from....etc.
This sounds like it could be one of the following issues:
Remote debugging and Visual Studio does not know where to load the symbols from or they are out-of-date
Need to clean and rebuild (which you seem to be doing)
The server you are running your WCF service on is not getting the updated DLLs and PDB files. If it's IIS Express, try killing the process between builds.
Also, make sure you are building in Debug mode and not Release mode. While building Release mode will generate the PDB files if it's set to do so which will allow you to debug an application, the code may be optimized as well which can cause breakpoints to be missed.
I've build a project with opencv, when I share my .exe on other pc they can't find some dlls, this happens in release and debug mode, I searched on the web and I know I must configure the properties of the project, I tried configure MFC but with all the configuration the problem persist.
thank you!
Are they SystemFramework libraries? Or are they libraries that your app specifically uses, ones that you have imported into the project?
If they are your custom/imported libraries, make sure you copy them to output, and send them with the exe. The point of an installer is to bring the client your executable will of the the files it need to reference, compiled into a single file.
It seems the runtime librarie of opencv are missing. I'm not familiar with opencv, but VS provides a way to find all dependencies: http://msdn.microsoft.com/en-us/library/vstudio/dd293568.aspx. You can build an installation package for your application.
Another way to find all dependencies is using depends.exe, details are in:http://msdn.microsoft.com/en-us/library/ms235265.aspx
We have a common compiled code library that is only accessible to a number of advanced developers within our company. We build releases for it periodically, releasing a 'release' version for our dev, test environments and a debug release for developers to use.
Oddly, when I build the Debug release, references to the path of my project on my PC show up when another developer tries to use the Debug version of the DLL on their PC. I haven't worked extensively with compiling these DLLs, but I should be able to build a Debug release and give it to other developers to use within their projects, correct? Or is that not how it works?
references to the path of my project on my PC show up when another developer tries to use the Debug version of the DLL on their PC. I haven't worked extensively with compiling these DLLs, but I should be able to build a Debug release and give it to other developers to use within their projects, correct? Or is that not how it works?
When you build a debug version, you're also building the .pdb, which contains the symbols required for debugging. This is going to include the file paths, line numbers, etc, and be based on the system where this library is built. That's why they see these paths.
That being said, this won't hurt anything - they can use the assemblies to debug, but won't be able to see the code itself when something happens, as they won't have the projects.