.net application throwing TypeLoadExceptions or saying that side-by-side configuration is invalid, etc - deployment

I post this merely as a reference for others that might end up being in the same situation and since I spent almost 3 days trying to figure out the root cause of the problem, I thought it would be a good idea to post the solution here.
My situation was as follows:
I tried to build a deployment package for a .net application and got TypeLoadExceptions, FileNotFoundExceptions (regarding DLLs), Side-By-Side configuration errors, etc. once I tried to run it on a vanilla test machine.
[edit]: stackoverflow won't let me answer my own question within 8 hours of it being posted, the answer follows in ~8 hours ;)

The problem was that one of the dependency projects of my application was set to "Debug" build in the Visual Studio configuration manager, therefore the debug dll of the dependency ended up being used for release builds as well. On any development machine this was no problem after all since all debug runtimes were available.
On the vanilla test machine however only the release runtimes were present which caused so much trouble to me and gave me unmeaning exceptions that lead me to so many wrong directions via google, etc.
In my case it was SlimDX that was set to build a debug build in the VS configuration manager, even when doing release builds. Since SlimDX makes use of the VC runtimes I got the above problem, but this could happen with any .net assembly that uses the VC runtimes.
I hope this will eventually safe someone some hours ;)

Related

VSO Release Management - Tests will not run

I have a VSO release management definition in which I'm deploying a cloud service and then running some tests. The deployment executes without issues, but then the tests don't run, I recieve the following message in the logs:
Warning: No test is available in My DLL Path. Make sure that installed test discoverers & executors, platform & framework version settings are appropriate and try again.
Now, the strange thing is that this release is triggered by a build, which runs exactly the same set of tests and they all run happily.
I've included a runsettings file specifying the framework version (based on some SO posts I found from a year ago with a similar issue) but its made no difference. Been messing with this for nearly 2 days now with no progress. Any suggestions happily accepted!
Arrrrgh! So it turns out, if I deleted the whole project, created it again and added my tests again, it just works. Gremlins apparently!
Admins, if this needs to be deleted, go ahead

dep6500 errors on multi-app deploys

I'm receiving an error that's nearly identical to what's posted in How to solve DEP6500 while deploying a solution with multiple projects to an emulator or Lumia 950xl:
The issue isn't resolved and I've got further detail to add here in the hope that it might resolve & clarify both questions (that question is presently the top hit when I search for DEP6500)
AFAICT, mine really appears to be a VS15 solution deployment configuration issue.
I have a single solution with five projects: three apps, a class library, and a win runtime component:
First trivial app, references #2
Universal class library, references no other project directly, but attempts to use an AppServiceConnection to connect to #4
Second trivial app, just a hello world, references absolutely nothing
Third trivial app, references #5, meant to be used via an AppServiceConnection
Universal windows runtime component, references nothing
Really, what I want to be able to do is start with nothing deployed to the device, select "Deploy Solution", and have all three apps successfully deployed.
Based on the rest of the description below, I'm clearly misconfiguring this solution, but for the life of me I don't see where.
At the solution level, if I configure any combination of two or more of the three apps to deploy, I get the DEP6500 error when I try "Deploy Solution" - actually, two DEP6500 errors when three apps are configured to deploy.
If I configure only one of the three apps to deploy, deploying the solution works just fine.
If I uninstall every deployed app and deploy just #1, as you might expect, it has trouble at runtime when it tries to use #4.
If, instead, I deploy just #1 and then deploy just #4, #1 runs just fine.
As I said earlier, if #1 and #4 are both configured to deploy, deploying the whole solution fails.
The third app, #3, is really uninvolved in this whole mess, I only added it to better characterize the problems deploying #1 and #4.
Seeing as each deploys just fine individually and all three can be deployed to my device at the same time if I deploy them one at at time, how can I configure Visual Studio 15 to deploy all three when I run "Deploy Solution"?
Finally, it would help to find out what type of port the IDE referring to when I produces the error in question:
DEP6500 : A specified communication resource (port) is already in use by another application. 0x89731800
helpful smaller questions may be: that is that port used for? when is it opened? how long is it open? how can I configure VS15 in a way that avoids port collisions between apps during full-solution deploys?
The issue here was that Visual Studio 15 just doesn't appear to be able to time the deployment correctly when you ask it to do a full deploy of every project in one action.
In this case, manually deploying each project one at a time yields a good result.
I suspect the "port" in question has to do with device deployment, as I can do a full deploy to my local machine without issue but see the DEP6500 error on deploys to my Lumia 950XL.
My aim was to be able to do a full deploy from a single VS15 menu option and that's still not technically working consistently, but I suppose I've found a workaround in as much as a piecemeal manual deploy is working everywhere.

Why does NetBeans use Tomcat Manager (and Eclipse does not)?

As a long-time J2EE developer, I have always been curious as to why NetBeans uses(i.e. forces you to use) the Tomcat Manager app to deploy while Eclipse seems perfectly happy/able to deploy without the manager app? Though I have googled this exhaustively over the years, I have never found even the beginning to an answer. Perhaps this is nothing more than how each product started and has never changed.
Does anyone have any insight or educated theories they would be willing to share?
[Edit] Sigh... to address shekhar's comment, I see that it is not absolutely clear that I am referring ONLY to using Tomcat. I mistakenly assumed that the title and context of my question was sufficient, but again, I am specifically referring to using Tomcat as the Servlet Container with these IDEs. Thanks.
[Edit] I don't know who down-voted this but I have researched this for a long time and found zero reason for it. As for down-voting because it might not be useful, I think that is in the eye of the beholder; also, it usefulness can only be determined based on the answer which is why I am asking.
Sounds like a good topic for Quora but anyway...
I can only speak about NetBeans. It originally used a patched version of Tomcat 3. (early NetBeans 3.x releases). Tomcat Manager was added in Tomcat 4 and it was used because it was possible to integrate easily with your Tomcat installation without knowing much details about their setup. Start/stop Tomcat can use default scripts and will pick up your settings. Deploy does not need to care about access rights and it just assumes that manager works.

Domino 8.5.3 - Create an organization extension library / codestore

This is a project I've been working on off and on for months and I feel like I'm pretty close, but I just can't seem to get past the final hurdle.
The goal is to develop an organization extension library that contains both internal and 3rd party code that we frequently rely on.
History
As a test project, I started with Apache Poi because that is already in wide use in our environment. I have a plug-in and feature built just from the Poi .jars that allows me to build our current Poi applications as long as I add the plug-in (from my workspace) to my build path. The apps work on the servers because we have already distributed the Poi .jars by manually copying them.
The next step is taking that plug-in and getting it into an updatesite so that all of the servers and developers can synchronize on one version. I found and followed these two excellent blog articles (that I wish existed when I started this project):
http://www.dalsgaard-data.eu/blog/wrap-an-existing-jar-file-into-a-plug-in/
http://www.dalsgaard-data.eu/blog/deploy-an-eclipse-update-site-to-ibm-domino-and-ibm-domino-designer/
With the caveat that the articles are written for Domino 9 and we are running 8.5.3 here, but that only matters in the last (installation) step.
Current
This brings us to the problem. All of the above seems to have worked great up to a point. I can install my feature to my designer client from the eclipse update site and it works great. However, the install is failing when I import that into our updatesite.nsf database. This means that while the developers can all install from the updatesite if I put it on a network drive, that doesn't deploy updates to our servers.
The problem is that when I try to install from the .nsf update site, the Eclipse Updater just hangs. I've let it go for well over an hour and eventually Notes becomes completely unresponsive.
So the question is, is there anything I might have done wrong, either in the development of the plug-in or server configuration that might be causing this issue?
Additional Info
I'm looking at the osgi console and that is largely unhelpful. I am getting the following errors as I'm trying to install: SEVERE Could not access digest on the site: no protocol: 0/5B004DDD5E38F3FF85257CAF004C72C7/$file/digest.zip ::class.method=unknown ::thread=Worker-7 ::loggername=org.eclipse.update.core
I could generate dumps if that would be useful.
Security is also locked down fairly tight here. It could be a security issue - is there a way to troubleshoot that? Once I get to the hang I'm just stuck guessing.
This has been edited for clarity and to update information
I know that this is post is over 5 years ago but...
for those that find this and are trying to resolve the error
SEVERE Could not access digest on the site: no protocol: "
is due to the update site project not having the URL of the Domino updatesite.nsf not being added to the Archives tab of the site.xml.
I found the updatesite.nsf also needs to be anonymously accessible as no credentials are prompted/passed through to the Domino server hosting the updatesite.nsf database (at least from DDE), YMMV from eclipse. So if Anonymous connections are blocked on the Domino server you will be out of luck.
To develop a plug-in you really want to have 3 projects:
the plug-in
the feature
the update site
Of course a feature can contain more than one plug-in (and probably should) and a update site can contain more than one feature (and probably should). Once you have an update site project it features a handy button "build all" that makes sure plug-in, feature and update-site get compiled in one go. And that button is what you really want.
You can point using a setting in your Domino Designer (or local Domino server) to the feature directory. Add a plain text .link file to framework/rcp/eclipse/links, that contains the path to your install site - it then picks up the features and plug-ins from there. After a build you would need to restart designer/server to activate the updated feature.
For the Domino server the approach using an updatesite.nsf and the respective notes.ini setting makes the most sense (to me). http restart required. Lazy people script the whole thing.
I still don't have a great answer for this, but I believe the issue is related to the environment here. I don't have the authority to change the environment, even if I were able to conclusively demonstrate it is the cause of this problem, so it is a moot point. All I can say is that at least one administrator computer had no issue installing from the update site.
For me, the solution for distributing the update site is to put it on a network drive and have everyone install it from there. The server has no problem using it from the updatesite.nsf.

GWT/GPE Development / Eclipse Slow - Workspace recreation helped

Im finding after a few weeks of GWT development my Development Mode compilations suddenly slow down at the stage where you see this in the Development Mode console log:
Validating newly compiled units
I've found a related question but this seemed a little vague compared to my issue
Eclipse getting too slow - workspace recreation helped
Since I lose window/toolbar layout settings (even if export/import prefs) and other useful things when I recreate the workspace I want to find out which files I can clean?
I've raised a bug with GWT..
Another answer which really solved it in my case.
Is it possible that you are operating behind a proxy which has to be configured in Preferences->General->Network Connections (e.g. for installing plugins)?
That's true in my case but I had deactivated the proxy settings to reach the in-house SVN. As it seemed, the Validation routine always tries to download ui binder XSDs without success which takes a lot of time.
Concerning my comment in my first answer: yes, it run a lot faster after reinstallation but the reason was that I had to activate the proxy settings for reinstallation. Once I deactivated it again for an SVN commit, it ran slow again ;-)
I have similar problems with Eclipse (Indigo Service Release 1 Build id: 20110916-0149)
and the GWT plugin. Especially when starting Eclipse, Validating the GWT components in my project takes ages.
Googling revealed that the GWT designer in combination with a 64Bit Eclipse Indigo causes this issue.
http://code.google.com/p/google-web-toolkit/issues/detail?id=6602
I wil try to reinstall the GWT plugin without Designer.