Sandcastle ResolveReferenceLinksComponent warning - sandcastle

I want to create a documentation via sandcastle.
Therefore I need to reference DevExpress which should not be documented.
I added the DevExpress dll's under references and the DevExpress resource folder at the project, too.
I tried several different settings, but can't resolve it.
Now Sandcastle shows this Warning several times:
BuildAssembler : warning : ResolveReferenceLinksComponent: [T:test.DEVEXPRESS] Unknown reference link target 'P:DevExpress.XtraEditors.BaseStyleControl.Appearance'. [G:\test\test\test\Testing\Working\BuildReferenceTopics.proj]
How can I resolve this?

I've been facing the same issue for a while now, and I'm just getting around to researching it.
Sandcastle builds documentation which contains clickable reference links. However some references may not resolve because
they are from external assemblies (dependencies). This will cause a warning in the build output. If you're OK with that then just ignore it because there's no harm. However if you have OCD (like me), then follow the instructions below to suppress the warnings.
Instructions
Create a dummy Sandcastle project.
It does not need to be included in the solution, however I find it helpful during the setup.
Disable the project from being built. (Recommended as the build may fail.)
Add the assemblies mentioned in the ResolveReferenceLinksComponent warning to the Documentation Source.
Try to build it. It may fail with "unresolved assembly" errors. (Perhaps dependencies of your dependencies.)
If the "unresolved assembly" is not reference directly in your project then you can ignore it using the Assembly Binding Redirection plug-in.
Otherwise add the required referenced assembly to Documentation Sources as well.
You can also add it to the project References.
Add the dummy Sandcastle project to the main Documentation project using the Additional Reference Links plug-in.
Make sure to configure the plug-in so that all Link Types are set to None.
Note: When updating dependencies, the dummy Sandcastle project's Documentation Sources and reference also need
to be updated. [TODO]: Find a way for this to be automated. Nuget?
Note: Sandcastle does a partial build of the dummy project to gather Type information (via reflection). The dummy project
does not necessary have to build successfully however it must pass the TransformReflectionInfo phase in order for the plug-in to work.
References
GitHub Issue #67
Documentation Q&A
Additional Reference Links Plug-In
Assembly Binding Redirection Plug-In
IMO this is not quite the solution I was hoping for as it adds another project needlessly, however since I had so many warnings that they were masking real issues. Better of two evils I guess.

Related

How do I use doxygen with vcpkg/cmake?

I want to use doxygen with my project to generate documentation.
All "normal" dependencies of my project are managed by vcpkg and I was hoping that I can use doxygen this way as well, although it is not a lib that I link against, but a tool that I process my files with.
There seems to be some need for this, as this issue seems to be posted and some solution is merged.
When I dig further I found that there is a function called vcpkg_find_acquire_program that can specifically be called with doxygen argument. However, all examples are using portfile.cmake which my project does not have.
In my project I use:
vcpkg.json that acts as a manifest file. I specify the project name, version, dependencies. But I cannot put doxygen in the dependency list, because there is no doxygen portfile
CMakeLists.txt where I can specify that I require doxygen, but cmake won't manage downloading/installing it for me. It's vcpkg's job.
CMakeSettings.json where I specify build configurations
...and that is about it in terms of project configuration. So, where should I put that vcpkg_find_acquire_program? Or is there a different way?

NuGet packages that create a large number of non-required project references

I am reviewing our TFS access code after we upgraded to VS 2017 and VSTS Online.
I found out from another question on this site that the recommended way to access the TFS libraries is via a NuGetPackage.
Great, that's surely better than referencing from the Team Explorer installation folder.
However, the NuGet package in question added over 45 references to my project.
I believe I am only using 4-6 of them.
I found this question which discussed the fact that the package files do not have to go into source control.
That's good to know.
However, the references have been added as "Copy Local" and so they are all currently being copied to my output directory. This has caused my application to more than treble in size. It just doesn't seem like good practice.
Do people usually just ignore this and trade off against the fact they are getting great dependency management?
Or manually remove the non-required references...? Do future updates put the references back?
Or have I incorrectly consumed the package in some way...?
There are a lot of NuGet questions on this site. I did search but please accept my apologies if this is a duplicate.
Do people usually just ignore this and trade off against the fact they are getting great dependency management?
Add all dependencies to the project is the default behavior of NuGet. At this moment, there is not such option so that we could choose some of those dependencies.
Although all dependencies are added to the project as "Copy Local", when we publish our application, we could exclude those unneeded dependencies by changing the Publish Status from Include (Auto) to Exclude:
In this case, those non-required references are not included into the application.
Or manually remove the non-required references...? Do future updates
put the references back?
Yes, you can manually remove those non-required references, but when you update the package next time, those removed references would be re-add again.
Besides, as you said, you are only using 4-6 of them. You can try to custom a nuget package only including those 4-6 references.
Create nuget package from dlls
Hope this helps.

CRM could not load file or assembly to my project

I added a reference itextsharp.dll to my plugins project, when running my plugins using plugin-registration tool I get this exception:
Could not load file or assembly or one of its dependencies. The system
cannot find the file specified
I tried removing the ref and adding it again, cleaning and then adding it to my project from different places.
Is there restrictions in plugin registration tool about adding non crm dlls? why ? how to solve it?
This is not going to work - you cannot reference external assemblies from CRM plugins that are registered in database. If you want to do this, you will have to merge your external dll with your plugin assembly. You have to remember that adding assembly as reference is not automatically making your referenced assembly available for your base assembly, therefore if you register your plugin assembly in CRM, system is not going to "magically" find somewhere your external assembly (in your case - "itextsharp.dll"). If this is not Online system, you can add your assembly to GAC, or register all your assemblies on Disk instead of database (not recommended approach). If you want to register them in database, you will have to merge everything in one assembly using ILMerge for example.
You can't reference something in a plugin unless it's in the bin of the CRM.
To make it work you need to ILmerge your reference with the plugin. Install this package in your project: MSBuild.ILMerge.Task. Then build. It will work instantly. The package will merge everything in the bin after the build. So make sure every other references are marked "Copy Local = false". Otherwise, you'll have a crazy big assembly.
Finally, Microsoft released a solution for this. You can build a nupgk file and register dependent assemblies.
Here are the white paper and my post about this;
Microsoft : Microsoft White Paper
My summary: Here is the link

Validating that references to NuGet packages are proper NuGet references

I'm moving my large project to properly use NuGet packages. However, I know that although they shouldn't, some developers will simply add references to assemblies in packages, rather than properly add NuGet refs, and I want to prevent that.
Is there a solution that either:
Checks this inside Visual Studio, and suggests the correct ref instead?
Checks this in build time, and produces build errors?
NuGet doesn't have any built-in command to validate this, however it would be relatively simple to write some code to do this.
The basic steps are:
for each project in solution
for each reference in project
if reference in path 'packages'
if package not in 'packages.config'
log 'invalid reference: use NuGet'

Xcode - deleted openFrameworks libraries, now can't compile and having trouble re-adding

I was 'cleaning up' a project and deleted some of the references to libs used with openFrameworks. Certain things weren't being used, or so I mistakenly thought... Panic in my project!
All sorts of errors, of course. But, XCode won't let me undo that sort of action. I've re-added the libs but the errors persist. Can someone explain to me what basic conceptual thing I'm missing?
Errors go like this [edited]:
/Developer/openFrameworks-iPhone/libs/openFrameworks/app/ofAppGlutWindow.cpp:61: error: 'glutInit' was not declared in this scope
/Developer/openFrameworks-iPhone/libs/openFrameworks/app/ofAppGlutWindow.cpp:62: error: 'GLUT_RGB' was not declared in this scope
/Developer/openFrameworks-iPhone/libs/openFrameworks/app/ofAppGlutWindow.cpp:62: error: 'GLUT_DOUBLE' was not declared in this scope
[UPDATE]. Two things to check: (1) Having a valid build of the oF library itself. Open library project, make sure it builds.
(2) Is the oF library (and all the other, dependent libraries such as Poco) being added in the Build Phases > Link Binary With Libraries section? Sometimes when you delete and then re-add a library, it doesn't get included on this list. Re-drag the library files here. That's what ultimately solved this for me.
Have you tried clean build? I got this error once when adding static libraries.
Found it: Had to manually add the appropriate libraries to be included under "Build Phases". Built the clean download of openFrameworks that way; afterward I could add that to projects referencing the library and build them!