VS2015 class not building .dll - c#

This is essentially identical to Class Library Project File not compiling into .dll or debugging, but that item was from 2009 and should be closed and inactive by now.
I, too, have a class solution/project that should be producing a .dll on successful build and isn't.
I have followed all instructions in the previously referenced stack overflow item to no avail. It doesn't matter if I clean the build, build debug or release versions. There are no errors, no warnings, and no messages whatsoever.
The Build always succeeds. If I do a Clean it always succeeds.
The Output path is correct.
How do I get around this issue and get output from the Build?
I'm pretty much at my wits end. Any thoughts or suggestions? This is VS 2015, version 14.0.25431.01 Update 3 running on Windows 10 Pro.
Thanks in advance for any suggestions.

Ok, so I'm a screw-up! Sometimes you have to get frustrated to find the real problem...
If you have this problem, one suggestion would be to verify that you really loaded the solution/project from the location on the (a) hard drive that corresponds to the one you are trying to reference in another solution. Be careful when doing so, sometimes those "Recent" solutions aren't really what you think they are.
Sorry to clog space up with such a stupid issue. It's getting late; I must be getting a little tired.

Related

Azure Functions(.net core 3+) - Getting "Entry point was not found" error when trying to access HttpRequest.Query

I started encountering this issue about 3 days ago after an update that I randomly clicked on when I was in Visual Studio Code. Whenever I try to access HttpRequest.Query from the Microsoft.AspNetCore.Http namespace, I get an the following error message: "Entry Point was not found".
I have not been unable to fix this and this has interrupted my ability to work. I've talked this over with my teammates, and they are not encountering this issue at all.
I've tried pretty much everything I could google and think of.
Auto Generating Bindings
Deleted and re installed every Nuget Package at C:\Users{username}.nuget\packages
Deleting and reinstalling everything about Visual Studio and Visual Studio Code
Using the most recent versions of Microsoft.NET.Sdk.Functions
Deleting the bin and obj folders of my project
Removing unused references in my project
At this point, I'm not even sure what's really wrong any more. I found a post with my EXACT SAME issue, but the way the person fixed it did not apply to me:
Azure Functions .NetCore 3.0 Request.Query throwing "Entry point not found" error
Some Info- may or may not be useful.
When I go through the code step by step in the debugger, HttpRequest.Query shows up properly with all of the keys. I'm wondering if there is some kind of name conflict between HttpRequest object from Microsoft.AspNetCore.Http vs System.Web
If I set my project to use the most recent version of Microsoft.NET.Sdk.Functions, I get a new error instead of an entry point error, I get this instead:
I'm using Visual studio Code.
Can anyone assist? I'd be happy to provide any information needed!
I gave up. I spent about 3 days trying to solve this and this was affecting my ability to work. I just had my entire laptop reformatted and that "fixed" the issue. I tried pretty much everything I could find and nothing worked and I couldn't wait any more. Best of luck to anyone who encounters this!

Solution fails to build w/ missing auto-generated .g.cs file for the first time, succeeds on second build

I'm building a WPF app w/ Visual Studio 2015 (Update 3), and—at least by now, I'm not sure for how long this has been the case—every time I make a change and compile, I'll get a failed build w/ the error
6>CSC : error CS2001: Source file 'C:[...]\Obj\Debug\AnyCPU\GeneratedInternalTypeHelper.g.cs' could not be found.`
If I just build a second time, though, it works just fine.
This smells to me like a dependency on another file that is generated afterwards or something like that, but I haven't been able to find out what it is, a google search didn't net anything either, and neither did a search through my project what this file is used for in the first place (the name suggests its purpose, but I don't know where exactly it is used).
It might also be that the (group-policy-mandated) Anti-Virus is holding an exclusive lock on the file or its dependency for a moment too long, and VS stumbles over that, I think I remember a problem like this at my last job, but I'm not sure that is the case (and I can't simply disable the scanner for a check, it's completely locked down and I don't want to violate company policy for trying to circumvent it).
Any ideas? It's not critical since it's easy to work around, but it's annoying and I don't really want to check in the project like this in the end.
I had the same issue and i found why it happened (in my case).
Every project of our solution has the same output folder.
The file GeneratedInternalTypeHelper.g.cs was generated at the same place for each project.
The build order/dependencies were computed and Visual Studio found that some project could be build in parallel.
In Tools > Options > Project & Solutions > Build and Run you can find the option "Maximum number of parallel project builds.
After changed from 8(in my case) to 1, no more files generated at the same time :)
It is a little slower to compile but really less annoying than compile multiple times... \o/
An alternative solution is to add project dependencies in the solution for the projects you don't want to build in parallel.
With this you can keep the parallel project build for the other projects.
I have just chased down the same error. In my case it was caused by Git checkout inserting a "%20" into the folder name of the solution where a space was expected. Replacing "%20" with space fixed all these missing *.g.cs errors. Thought worth mentioning here.

Unable to load "lpsolve55.dll" in VS2015 on 64-bits OS

For a project I am working on, I need to solve a mathematical model. I chose to do this using Microsoft.Solver.Foundation and the SolverFoundation.Plugin.LpSolve plugin. Both associated .dll files for these extension seem to work fine, as VS2015 recognizes and references them without a problem and compiles and runs my program without errors.
This is however up untill I try to actually solve my optimization, which needs "lpsolve55.dll" to work. I have downloaded this dll and put it in my project's bin/Debug folder, but for some kind of reason VS2015 just doesn't recognize it. I.e.
I can't reference it by simply browsing to it from my "Add Reference" tab.
It's impossible to (un-)register it via the regsvr32 cmd-prompt application, as it doesn't have any DLL (Un-)registry entry points.
The TlbImp.exe cmd-prompt application can't handle it.
So basically, after discovering the above (after trying the most-common internet solutions), I still feel quite dissatisfied to get the error message while I try to solve the optimization -
Unable to load DLL 'lpsolve55.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
The wierd part is also that I have another project in which I solve a similar problem, where there are absolutely no problems at all using lpsolve55.dll....
Some quick facts:
I reference .NET framwork 4.5.2. I have changed it to 4.5 as well as 4.0, but this didn't change anyting.
For as far as I can tell, the bin/debug folder of my projects are identical.
I am working on a fully updated windows 10 OS, 64 bits, while using visual studio 2015.
My question would thus be whether or not some of you have encountered a similar problem and if you were able to solve it in some way.
Highly appreciated!
After some careful analysis, I have found the answer to the problem. To be honest, as most things are, it was quite simple in the end. The lpsolve55.dll wasn't recognized because I didn't have my new bin-folder in the Path, which I did have with my old project. I simply forgot.
On a further note however, after the lpsolve55.dll directory was added to the path, I still got an error telling me there was no model to be found that could solve my directive. Since the error occured when I was calling the LPSolverDirective(), some research landed me on the following page:
http://lpsolve.sourceforge.net/5.5/MSF.htm
Above page gives a complete and stable way of how to acces lpsolve55.dll using the LPSolverPlugin straight out of Microsoft.Solver.Foundation.dll. After following the method in the link that involves editing my projects' bin/Debug and bin/Release folders, I got the LP model up and running within no-time.
Morale of the story - read the documentation. I am a bit of a beginner in programming entire multi-project solutions and using customly-added dlls, but hopefully this helps someone else experiencing the same. In the end, I learned a lot by simply trying different methods of getting it to work, so no time was wasted.

SOME Breakpoints not hitting in VS2012 / C#

I have somewhat a bizarre problem here. I have a Solution developed with VS2012 in C#. I have 6 Projects in the solution. My problem is, with some of the projects in the solution, no code change has any affect on Solution Build. It's not just new code, not even Breakpoints are getting hit!!
I have done a thorough research in the net, couldn't find anything helpful.
And of course, I have tried
re-compiling
deleting all the binaries and compiling again
checked solution properties numerous times
etc...So, I think I have tried all the basics, but couldn't find a way out.
I gathered some screenshots, but I noticed I need at least 10 reps so I can't post them yet :(.
Any help at all will be greatly appreciated
Cihan Esen
EDIT: After the responses, I see that I have add, two other guys in my team is working on the same code, same build environment. They are not having this problem. I cross-checked every single configuration in their system which could remotely relate with this, we definitely have the same settings in VS.
And yes, I build the solution in DEBUG mode, not RELEASE.
I have tried seperate clean + build for the problematic projects -> no difference.
EDIT 2: I have to add; I have modified the code in the problematic project, so that I would see completely different output, but it didn't work. I mean that project/class of the solution, is still producing the same result, as if the code has not been changed at all. And yes, I have deleted all the binaries, saw them being built again.
This sounds really stupid to me but VS is acting as if it has a version of my source code of this problematic Project/Class, and it always compiles that version.
Make sure you are running in dubug mode and try this:
Go to your solution folder.
Show hidden files
Close your solution Delete .sou file for solution.
Add your break points, build your soltion and try.
throw away the obj and bin folders
throw away your .suo files
perform IIS reset for webapplications
rebuild everything.
should do the trick :)

Two or more objects have the same target location '<location>'

I'm trying to Build a Deployment project wich has some dll dependencies, and I'm getting this error while building :
Two or more objects have the same target location ('[targetdir]\icon.ico')
I've tried to remove the file and do the same thing as this answer : VS2010 (older) installer project
But I get always the same error.
I found also this : Condition Property from MSDN
But I don't have any condition before adding the icon to the installation folder.
Any suggestions ?
Thanks
Rename one icon.ico file that is included in one of the projects.
I still regularly get this error in VS2017 when no change has occurred that should be causing this exception. Every time it happens I find that closing VS and then restarting it sorts it out.
Obviously this won't fix scenarios where there's a structural fault causing it, but it does seem that there are still many issues in the VS installers that can be solved by simply restarting VS - I think VS doesn't take kindly to the project configuration being changed sometimes (e.g. from Debug to Release).

Categories