Multi-Project Template creates only empty folder - project-template

I have created a multi-project template. But I'm not able to get it working. It creates only empty folders for solution. Could not find useful info on google. Here is the template zip
https://dl.dropboxusercontent.com/u/39085241/TestProjectTemplate.zip
It would be great if anyone working with templates could have a look at it and tell me what I'm doing wrong.

Found the problem. You just need to change the ProjectType attribute of main .vstemplate file to ProjectGroup.
<VSTemplate Version="3.0.0" Type="ProjectGroup"

Related

blogdown not showing plots from .Rmarkdown files but from .Rmd

I'm using blogdown to create my website. Now I found this problem:
ggplots embedded in .Rmarkdown files doesn't appear. When I rename the file to .Rmd the graphic is okay. But I need to use .Rmarkdown because I want to use the beauty syntax highlighting and other features only available in .Rmarkdown files.
When I print the fig.path with
knitr::opts_chunk$get('fig.path')
I see the difference:
In .Rmd
"2020-06-17-rmd_files/figure-html/"
In .Rmarkdown
"/post/2020-06-17-rmarkdown_files/figure-html/"
But I don't see why the paths are changed.
How do I solve this?
I found a solution (at https://discourse.gohugo.io/t/raw-html-getting-omitted-in-0-60-0/22032):
After adding
[markup.goldmark.renderer]
unsafe= true
in the config.toml the plots appear.

2sxc Adam folder list

I have a problem with listing/showing Folders created within Adam's File Library?
I have dowloaded Adam 2.0 tutorial from your site
I can't get them listed even in downloaded template and example "Another one rides the bus". If I change template view "Adam example with groups (folders) I don't see any image at all.
I tried adding #screenshots.Folders.Count but I get value 0 even there are already 2 non-empty folders created in given example gallery.
For #screenshots.Files.Count I get 4 which is correct value for a root level.
I get no other errors.
Thanks!
I'm not sure if those examples are all still current. But if you check out the latest Blueimp that may help. See https://2sxc.org/en/apps/app/blueimp-gallery-slider-4-0-with-koi-bootstrap-3-and-4.

How to handle Solutions, Projects and their contents in a VisualStudio extension

In short:
I'm new to VisualStudio Extensibility and my goal is to create an extension with a ToolWindow (which already works) showing different views for each context of a VisualStudio solution, i. e. a view for the solution, a view for a project etc.. The window should be opened by clicking on a context menu entry in the context menus of the Solution Explorer, Class View, Object Browser and (ideally) any other window showing contents like projects, namespaces, classes etc..
After searching I found a lot of information, but for some points I couldn't find very helpful information. How do I ...
... create a context menu item for the VisualStudio views?
... get the currently open solution as an instance in code?
... get the projects of the solution and their contens as instances in code?
... add/remove items to/from a solution/project/class/... in code?
... react to selection changes in the Solution Explorer?
What I've done, so far:
I read the docs for Starting to Develop Visual Studio Extensions and downloaded the VSSDK-Extensibility-Samples. Especially the WPF_Toolwindow example was interesting for my purposes, so I built and ran it, which was successful, so far. Another interesting sample would have been the WPFDesigner_XML, but it always throws a NullReferenceException, so I decided to stick with the former ToolWindow, which is completely fine, for now.
Furtermore, I tried to understand the example by having a close look at each file in the project, running it in the debugger and analyzing what happened. I'm confident I understood it, but am also open for corrections of my possibly misguided thoughts following.
Now, I have created a new project, based on the WPF_Toolwindow sample, renamed and adapted to my needs (basically, I created new GUIDs, renamed the namespaces and removed things I won't use). This extension still works in the debugger. I even uninstalled everything from the experimental instance and debugged the extension from scratch.
What I try to achieve:
Have the ToolWindow load a specific view/viewmodel, when the selection changes in the Solution Explorer (or any other VisualStudio view). Alternatively, there should be a context menu item for every node's context menu in the Solution Explorer tree (or any other VisualStudio view).
Get the currently open solution, the containing projects and basically everything from the Solution Explorer's content as instances processable in my viewmodel. I need to properly add/remove
classes/structs/enums to/from
a folder in a project
a namespace
properties/fields to/from a class/struct
Generate code based on information of the solution and add the file properly to a project.
Does anyone know of examples for something like this or can anyone give me some hints, where I can find further information? Any help would be appreciated. Thanks in advance.
(1) The items already have a context menu and I want to add a new command to this menu.
if you want to add a sub menu to the context menu, the following link provide a complete sample
https://github.com/visualstudioextensibility/VSX-Samples/tree/master/CommandSubmenu
(3) Yes, basically adding a file to a project without manually manipulating the project file would be nice.
You can add the file to project via Project.ProjectItems.AddFromFile, and the following provide a sample for your reference.
https://www.mztools.com/Articles/2014/MZ2014009.aspx
Update:
I select a project and a similar event is fired. Are there such events I can subscribe to?
You could use IVsMonitorSelection to implement. here is the code which retrieve related project path for your reference.
IntPtr hierarchyPointer, selectionContainerPointer;
Object selectedObject = null;
IVsMultiItemSelect multiItemSelect;
uint projectItemId;
IVsMonitorSelection monitorSelection =
(IVsMonitorSelection)Package.GetGlobalService(
typeof(SVsShellMonitorSelection));
monitorSelection.GetCurrentSelection(out hierarchyPointer,
out projectItemId,
out multiItemSelect,
out selectionContainerPointer);
IVsHierarchy selectedHierarchy = Marshal.GetTypedObjectForIUnknown(
hierarchyPointer,
typeof(IVsHierarchy)) as IVsHierarchy;
if (selectedHierarchy != null)
{
ErrorHandler.ThrowOnFailure(selectedHierarchy.GetProperty(
projectItemId,
(int)__VSHPROPID.VSHPROPID_ExtObject,
out selectedObject));
}
Project selectedProject = selectedObject as Project;
string projectPath = selectedProject.FullName;
For more information about the usage, please refer to:
https://www.mztools.com/articles/2007/mz2007024.aspx

cakephp Managing Plugin Views how to determine paths

I have a plugin installed that has its own layout overrides for different controllers. However I'm having trouble understanding the mechanism for modifying the paths.
In the plug-in controller if I tell it to use my layout
$this->layout = 'default_dashboard';
Which is in app/Views/Layout and references an image in app/webroot/default_images.
All the relative links work fine to default_images when I do this, but would like to use some of the Plugin template overides for other actions.
However if I modify the default.cpt file to include some of the images, like say a logo that is used in default_dashboard.ctp. It is unable to map to the same image location.
For example in default.ctp:
echo $this->Html->image('default_images/logo.png',array('alt' =>
'Logo','width'=>'284','height'=>'82'));
produces a path to /img/default_images/logo.png. The Plugin is configured to use the /img location, whereas I want to direct to /default_images in this case. I could make this ../default_images/logo.png, but this isn't very clean.
In addition I have js and css which is having a similar problem. Can someone please explain the mechanism for using a site-wide default.ctp so that it works with inherited plugin templates?
From hard coding the links into the template not using the Html Helper, I see that the browser's relative path is confused because of the routing. For example the first one works with the root specified, the second doesn't.
<img src="/default_images/logo.png" alt="works" width='284' height='82'>
<img src="default_images/logo.png" alt="lost" width='284' height='82'>
What's the best way to make sure that the Plugin layouts and non-plugin layouts can all find the correct path to /default_images ?
Following are the steps that you can follow to resolve relative path problem:
Create a file abc_constants.php in app\Config folder.
Include the file in app\Config\bootstrap.php
require_once(abc_constants.php);
abc_constants.php should contain:
define('HTTP_HOST', "http://" . $_SERVER['HTTP_HOST'].'/');
define('SITE_URL', HTTP_HOST.'your_app_name/');
define('IMAGE_HTTP_PATH', SITE_URL.'app/webroot/default_images/');
Use these constants in your view file accordingly.
<?php echo $this->Html->image(IMAGE_HTTP_PATH.'logo.png',array('alt' => 'Logo','width'=>'284','height'=>'82'));
It looks a bit lengthy process at first time, but once implemented, you can use these constants in Ajax calls in view files, controller's code etc.

How to avoid doxygen's automatic folder based namespace?

i am going crazy over this and i'm tired of searching - could someone please explain to me, how i can avoid the default namespace of doxygen, which seems to be the base input folder.
Here you can see what i mean: http://trac.sevo.org/doxyvb/html/_v_b6_module_8bas.html
The package "ClassicVB" is only named so, because it's the name of the folder in which this file is in. But is there any way to specify, to which package or namespace a specific file belongs?
You see, if i generate a documentation, i would like to state #namespace inside my .bas file and doxygen should then use this as the namespace of the included functions inside this file. But instead it is using the name of the folder, in which my .bas file is in.
Maybe i am just doing it wrong, but i spend the last couple of hours with this, i'm grateful for any help on this matter!
I had to deal with the same and I managed this way. Go to Doxygen GUI:
Expert->Project-> Set FULL_PATH_NAMES to NO
I think this will be enough. If not let me know. When you change something in Doxygen to not-default it becomes red, so I can quickly check all the boxes I have changed.

Resources