Git Product home page Git Product logo

laubplusco / laubplusco.helix.vstemplates Goto Github PK

View Code? Open in Web Editor NEW
31.0 31.0 17.0 3.45 MB

Visual Studio extension that accelerates creating new Visual Studio solutions and projects that follow the conventions described in Sitecore Helix. Install extension from Visual Studio Marketplace

Home Page: https://marketplace.visualstudio.com/items?itemName=AndersLaublaubplusco.SitecoreHelixVisualStudioTemplates

License: Other

C# 99.63% PowerShell 0.37%
helix sitecore sitecore-helix visual-studio

laubplusco.helix.vstemplates's People

Contributors

af4jm avatar anderslaub avatar andrewwburns avatar peter-nazarov-namics-com avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

laubplusco.helix.vstemplates's Issues

[Minor] "Place solution and project in the same directory" checkbox breaks creation of new project

Create button doesn't work, when Place solution and project in the same directory is checked.

image

As Place solution and project in the same directory has no sense for Helix Solution project it is minor. But it is confusing when you accidentally forgot about the checkbox and wonder why Create button doesn't work. That is why it will be enough some information message about it.

Trace:

Exception occurred while parsing manifest: Could not find file or directory on relative \src\$layerName$\$modulename$\$platformProjectfolderName$\$moduleNamespace$.csproj - expected file on full path c:\projects\helix.templates\Example.Module.Platform.Clean.SDK\src\$layerName$\$modulename$\$platformProjectfolderName$\$moduleNamespace$.csproj

   at LaubPlusCo.Foundation.HelixTemplating.Services.ParseManifestService.GetFullPath(String path, Boolean createFolder)
   at LaubPlusCo.Foundation.HelixTemplating.Services.ParseManifestService.GetConditionalValue(XPathNavigator navigator)
   at LaubPlusCo.Foundation.HelixTemplating.Services.ParseManifestService.ParseProjectsToAttach()
   at LaubPlusCo.Foundation.HelixTemplating.Services.ParseManifestService.Parse(String fileContent)
   at LaubPlusCo.Foundation.HelixTemplating.Services.ParseManifestService.Parse(IDictionary`2 replacementTokens)
Info: Manifest "Simple "legacy" Helix Solution - Support for 'CLASSIC' project style (example)" selected

Issue with following TDS Helix structure(suggested by Sitecore)

Hi @anderslaub ,

I am using "LaubPlusCo.Helix.VsTemplates" for creating helix structure. I am facing some issue with maintaining Helix structure(as defined by sitecore
https://helix.sitecore.net/principles/sitecore-items/development.html
,please refer below attachment).
SitecoreHelixTDS

As per structure defined by sitecore, all 3 projects (code, Tds Core Project and Tds Master project) should appear at same level in feature but should be in 2 folders in file system(1 for CODE and 1 for TDS).

On creating same structure defined for helix templates defined by sitecore in HelixTemplates, "Tds" folder is also being included in Visual studio which leads to following structure in Visual studio as shown in attachment
HelixProject

because of this, when we create new feature, tds projects from next feature moved to this tds folder created by first feature.

Ideally, It should be like this :
HelixFinal

Is there any way we can exclude this "tds" folder from being excluded from visual studio just like "code","core" and "master" folder? I guess the issue(of tds folder creation in visual studio) is occurring because we have 2 layers "tds folder and core folder" or "tds folder and master folder", unlike only one layer "code","core" or "master" which gets skipped.

Do we have any solution or setting which can solve this issue.

P.S.: I have already tried "skipAttach".

PFB my configuration :

<templateManifest typeOfTemplate="Module">
  <name>Helix Clean Feature Module</name>
  <description>Helix Clean Feature Module</description>
  <version>1.0.1</version>
  <author>Sagar Taneja</author>
  <sourceFolder>/src</sourceFolder>
  <saveOnCreate>true</saveOnCreate>
  <templateEngine type="LaubPlusCo.Foundation.HelixTemplating.TemplateEngine.DefaultHelixTemplateEngine, LaubPlusCo.Foundation.HelixTemplating" />
  <replacementTokens>
    <token key="$layerName$" displayName="Create on Layer" default="Feature" input="Selection" required="true">
      <option name="Project" />
      <option name="Feature" />
      <option name="Foundation" />
    </token>
    <token key="$moduleName$" displayName="Module name" default="$safeprojectname$" input="Text" required="true" 
           validationType="LaubPlusCo.Foundation.HelixTemplating.Tokens.ValidateModuleNameToken, LaubPlusCo.Foundation.HelixTemplating" />
    <token key="$moduleNamespace$" displayName="Module namespace" required="true" default="Blickle.$layerName$.$moduleName$" input="Text"
           suggestType="LaubPlusCo.Foundation.HelixTemplating.Tokens.SuggestNamespaceToken, LaubPlusCo.Foundation.HelixTemplating"
           validationType="LaubPlusCo.Foundation.HelixTemplating.Tokens.ValidateNamespaceToken, LaubPlusCo.Foundation.HelixTemplating" />
    <token key="$sitecoreVersion$" displayName="Sitecore version (for Sitecore nuget packages)" default="9.2.0" required="true" input="Text"
           validationType="LaubPlusCo.Foundation.HelixTemplating.Tokens.ValidateVersionNumberToken, LaubPlusCo.Foundation.HelixTemplating" />
  </replacementTokens>
  <projectsToAttach>
    <projectFile path="/src/$layerName$/$modulename$/code/$moduleNamespace$.csproj" />
	<projectFile path="/src/$layerName$/$modulename$/tds/core/$modulenamespace$.tds.Core.scproj" />
	<projectFile path="/src/$layerName$/$modulename$/tds/master/$modulenamespace$.tds.Master.scproj" />
  </projectsToAttach>
  <ignoreFiles>
    <file path="/template.manifest.xml" />
  </ignoreFiles>
  <skipAttach>
    <folder path="/src/$layerName$/$modulename$/tds" />
  </skipAttach>
</templateManifest>

Controller rendering in class libary

Hello, how are you?
When creating a new module a Class Library is created, and when creating a controller rendering an error is displayed when trying to execute it, is there anything different that I have to do to work a module created with the template?
feature created:
image
Error:
image

Item publish from TDS project

Hello,

I have setup the TDS project for all the layers. But when i build solution, items which are added or modified are not getting updated in Sitecore instance. I am trying to see if there is any step/task which will sync the items in Sitecore through MSBuild.

Microsoft.AspNetCore.Mvc Missing Assembly Reference

When opening a CSHTML View file in Visual Studio, I seem to be getting the following error:

The type or namespace name 'AspNetCore' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)

The project seems to build fine and is auto-publishing.

This can be replicated on the Helix.Msbuild.Example project (https://github.com/LaubPlusCo/helix-msbuild-example) that utilises the templates.

We are currently have the following set-up:

  • Visual Studio 2019
  • Helix Template v0.9.9.14

Unit tests fails to run in any project inside Helix solution

My project solution is based on Sitecore Helix Visual Studio Templates by Ander's Laub. Im trying to write Unit tests using XUnit, but none of the tests are running and not even failing.

For test projects, I have tried using Project based on Class Library(.NET Framework), Projects based on Sitecore Helix Visual Studio Templates by Ander's Laub.

Packages used:

XUnit(2.4.1)
XUnit.Runner.VisualStudio(2.4.3)
XUnit.Runner.Console(2.4.1)
Framework: .NET 4.8

Visual Studio 2019: v16.8.5

The output im getting:
image

Test Run Output window:

ProjectData: Could not find project with GUID 09fe023c-998c-4a4c-a896-bc27884e7aaf
ProjectData: Could not find project with GUID 09fe023c-998c-4a4c-a896-bc27884e7aaf
---------- Starting test run ----------
[xUnit.net 00:00:00.00] xUnit.net VSTest Adapter v2.4.3+1b45f5407b (64-bit Desktop .NET 4.0.30319.42000)
No test matches the given testcase filter `FullyQualifiedName=Linde.Foundation.SitecoreExtensions.Tests.DemoTests.DemoTestForPassingOnly` in C:\SourceTree\lindemh-sitecore\bin\Debug\Linde.Foundation.SitecoreExtensions.Tests.dll
========== Test run finished: 0 Tests run in 1.3 sec (0 Passed, 0 Failed, 0 Skipped) ==========

I have tried building a separate Console Application with Tests project to make sure whether this is a Visual Studio Issue, but it is running/failing/passing inside the console application, but not inside the Sitecore Project.

Do I have to configure the solution differently in order for the Tests to run successfully?

Incorrect Helix Template root folder displayed in Settings dialog

ISSUE:
when a .helixtemplates file is used in a solution and the templates.modules.folder value is set, it is not reflected in the settings dialog in Visual Studio.

EXPECTED BEHAVIOR:
when a .helixtemplates file is used, the path specified in templates.modules.folder should be the path shown in the template. otherwise, it should be the global value set when no .helixtempaltes file exists in the solution folder.

Resolution

hi, i am using latest version download from marketplace sitecore helix extension , but due to resolution out , i can't edit my extension setting , have look image i am attaching with this issue , kindly resolve my issue because windows doesn't allow me to decrease resolution to lower one ,

Capture1

VS crashing after install

VS 2017 has in some cases been crashing following installation of v0.9.9.1. It is most likely related to a recent update of VS.

Ability to define a template solution file.

Ability to define a template solution file ($clientName$.sln) that the extension uses rather than trying to create one. This would allow us to have predefined projects attached out of the box and use virtual folders for better organization and naming (that doesn't match disk).

Unable to create Helix Solution using Example.Solution.Rendering.SDK template

Hi, I am using VS Professional 17.4.2 version. Installed helix extension in admin mode and got installed successfully. I am trying to create a solution through Example.Solution.Rendering.SDK template but getting below error. I am passing c:/Demo for publishing path but template is looking Demo folder inside MSBuild solution root directory, not sure why?

log trace from extension
Info: 
Reading token inputs
-----------
Info: Input - $sitecorePlatformVersion$: 10.2.*
Info: Input - $sitecoreAspNetVersion$: 19.0.*
Info: Input - $publishRootPath$: $(SolutionDir)docker\deploy
Info: All template replacement tokens:
-----------
    $guid1$: 586d93f5-2248-4145-9e43-cc39187ede21
    $guid2$: 391a1bba-5905-47ae-929d-1c492c91dc8a
    $guid3$: b1c48fe1-b154-4ad6-8ea9-4257b663b0c7
    $guid4$: b4f440d4-ff1b-4534-81f2-c35a82565ac3
    $guid5$: 62f7e00b-0ae4-4ba6-8e75-6ae17addca39
    $guid6$: 639811de-edcf-49cf-9a1a-c948713086e2
    $guid7$: 7cc6798e-c79d-4243-918c-9d4793757fce
    $guid8$: 2d402078-4f6e-44aa-a738-de81f8a7998f
    $guid9$: 285dbe07-ce56-4ad1-bab2-7db267075287
    $guid10$: ec0b0a6b-4dcb-455b-a1fe-795cc42857d7
    $time$: 12/4/2022 11:54:49 AM
    $year$: 2022
    $clrversion$: 4.0.30319.42000
    $runsilent$: False
    $targetframeworkversion$: 4.8
    $language$: CSharp
    $uistyle$: oneaspnet
    $tagfilter$: web
    $applyUIFilters$: WebCore
    $showAllFrameworks$: true
    $enableFrameworkTypeSelection$: false
    $solutiondirectory$: C:\Users\<usrename>\source\repos\GHD
    $projectname$: GHD
    $safeprojectname$: GHD
    $currentuiculturename$: en-US
    $installpath$: C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\
    $specifiedsolutionname$: 
    $exclusiveproject$: True
    $destinationdirectory$: C:\GHD\GHD
    $guid11$: 8babb15e-b8fd-4dae-9379-73fe50877f55
    $guid12$: 3b811836-5b91-4cc8-81a4-01fc621c7154
    $guid13$: 9c51f3c9-da93-4544-8b02-957415d5519a
    $guid14$: e5d92a35-1c2b-4323-89ad-1654bde8c769
    $guid15$: 6bbe8c34-2a0b-45cd-98b4-4d4d693bb30f
    $guid16$: 0cdb7269-90f8-42d0-9e3b-efb8e4d5f409
    $guid17$: 0b3a7707-8b31-476d-bd5d-8569181b4ad9
    $guid18$: 29ab8da8-0c31-4e13-850b-c887ce3420ec
    $guid19$: 83edac73-2e2b-48fd-8702-a0226ba4ee4f
    $guid20$: 8c9b6443-f9f0-414e-9c79-28ed091dfc4d
    $guid21$: 7f1fab9e-3668-4aea-8aef-eee333a48dbe
    $guid22$: f0d77d75-6434-4f8d-b542-143647e349e9
    $guid23$: ca9f8701-37c6-44ab-8843-7d7f8cdec4c4
    $guid24$: e9155674-0365-49ea-a5e1-e68d42cd6703
    $guid25$: a8c32ee4-e9ff-487a-b358-d9a5319cec02
    $guid26$: 7f11ecae-f522-4aa0-9445-9cdc3de0da03
    $guid27$: cfb66556-b462-49de-ac1d-d18589005a97
    $guid28$: 64f6a35f-d089-4c48-9e9b-0f818a9a2208
    $guid29$: ff2ff6b9-4663-445d-a735-8f92f066c90e
    $guid30$: 7a587a54-6d20-44f5-85f9-fc61970c2e79
    $guid31$: 493cfcd1-520b-4c41-8855-f870eb441793
    $guid32$: 55548e07-e30e-49b2-b3ed-63ddc3b4fe82
    $guid33$: 5fd5f7bc-b0bc-4214-a081-0c363e1a9330
    $guid34$: 790f5c5e-2aeb-4c72-8ced-0f2f61f2b91d
    $guid35$: af47c884-bcf7-442b-8a3c-70e57670ebe7
    $guid36$: dd207978-cf3e-4dd0-9964-e696b9027582
    $guid37$: c9ee9f39-4853-4afd-a18f-0443f9b2b7c2
    $guid38$: a0177cf0-e3f1-4506-8711-36b54362b17e
    $guid39$: add6bd43-8eee-42b9-a5f0-1d5021de02b0
    $guid40$: 7190632d-6ba9-4f84-ac2a-e8241f86e5c5
    $guid41$: 20bcc3d3-8fc8-4082-90c6-6ca2bd655ec9
    $guid42$: c304135a-8bc2-413f-99e2-dc69672aed96
    $guid43$: acf969ae-5660-4c66-8129-1b488daa187e
    $guid44$: 97931948-4d17-46e0-86f0-dba4432d390c
    $guid45$: db0d27f0-2ac5-465c-85bd-68266cdf698d
    $guid46$: 3ec44785-f272-47ff-92ec-53354828899e
    $guid47$: ab66b41c-85bd-41d2-a322-292bb1591758
    $guid48$: 0064df09-8e2e-46cd-a972-070863838912
    $guid49$: 926162aa-ba71-463a-977d-fba2b5358e76
    $guid50$: 871fcc2b-31a8-40b3-8dae-f6a052cefd37
    $guid51$: 8b897ac0-dea4-4624-8803-251a82dae417
    $guid52$: 13f2d9b9-447a-4f22-bb2c-a9b4fcf480f8
    $guid53$: e45f8139-1c9a-406c-a40a-ef45ba478600
    $guid54$: acf81d7c-7484-4255-99f9-c9c0d7ae20a5
    $guid55$: ad4ec431-8651-492d-af55-8ce6c8eccd10
    $guid56$: 20479dcc-85ad-4c1c-b193-31bd789af91e
    $guid57$: 14332c13-a72e-4985-baef-2bb8def5e509
    $guid58$: 2586cdf7-6803-49fb-9f25-401e84a59c72
    $guid59$: 545daeb9-9e66-4286-b67a-f31df4330c30
    $guid60$: 0fa57707-fa04-4f53-b8be-86685f459151
    $guid61$: a8092886-17ea-4269-b4eb-417b76df035e
    $guid62$: 91b40a78-8192-4a29-a57d-8d57b0a1c19d
    $guid63$: 82a71e31-75d2-4e23-898b-b7ee398ba128
    $guid64$: a2ad32b7-f415-495f-8b5d-e441a6d514c8
    $guid65$: 56f82198-5818-4152-b495-68f58fa8aab7
    $guid66$: f25cfbf9-b72a-47e4-8d87-0d175a9effe7
    $guid67$: 90640753-e2a2-4924-82f6-228b0c6bafb4
    $guid68$: a95f8f29-4da2-48b9-b95c-b414c6fef128
    $guid69$: eb098057-20d9-4e06-955a-765b79a2ccec
    $guid70$: 9415fe67-3202-49c8-8b8d-d058379a11ee
    $guid71$: 9241c4e2-4aa8-4701-9f76-039333f38b04
    $guid72$: 3aa79b7b-291b-436e-b71d-b2aaeeb61d91
    $guid73$: b335bd1f-53f1-4605-af4e-16a1b5abdc96
    $guid74$: 53ca6d2e-2af6-458c-bf2b-2b98b60b510d
    $guid75$: 4a562f8d-9ddf-472a-a940-a3f49820f4f1
    $guid76$: 2ed1d8a7-659a-4205-bd90-2bcb4528a419
    $guid77$: 33b53548-9c7a-4660-9df0-3664da72492d
    $guid78$: 99b2201a-cf77-4028-9c80-bea0d67a4054
    $guid79$: fc0757b7-7cd6-4330-9f24-9973a5f3eac8
    $guid80$: ff4afb39-0503-40c0-b4b7-06fa59870495
    $guid81$: 02b3ba44-de4e-45e4-bef3-cfb1e3f41802
    $guid82$: 847e3fde-cae4-4262-8ec7-65d52513693c
    $guid83$: 2e73a2f0-547b-4ceb-89ba-2a3db40c7287
    $guid84$: 0a82e336-735a-4cce-9207-62ad1d5c3e17
    $guid85$: b7cdb958-9513-4098-9a8d-56d40c5f2be9
    $guid86$: ea2df8d6-4b21-4cca-bdb6-766c6a138161
    $guid87$: c6584dad-d10e-4883-926d-73a4459c3e88
    $guid88$: 0db2b42f-ef85-4a8a-b693-176d5a3330fc
    $guid89$: 727721a0-c5b7-438d-a0a5-07f809cb4948
    $guid90$: e7e5d1ba-72e7-4d68-84de-922d6a177cda
    $guid91$: 4c99fced-10aa-4b11-aae7-2e055a6c7244
    $guid92$: 10a62f24-c6a3-4fa3-906f-9b2c972c16f6
    $guid93$: 2653c369-aaf3-4a5d-9de5-51964ff8db1a
    $guid94$: 8a9bd7a9-689b-44fc-b1ea-4800307ce73f
    $guid95$: 6ffb2aad-2ad6-4845-8452-f22055f9f12c
    $guid96$: 03182e81-97fc-411b-8346-b34c47b78a65
    $guid97$: 1cb36d0c-dfb7-401f-b081-73ad3071a2aa
    $guid98$: 4a950302-fd1f-4a35-94da-633f59f0ea9f
    $guid99$: fdf2a76f-c131-4506-9af6-28d7b00879fb
    $emptyString$: 
    $serializationDeps$: Foundation.*
    $platformFrameworkversion$: net48
    $renderingFrameworkversion$: netcoreapp3.1
    $renderingOutputFolderName$: rendering
    $siteName$: my-website
    $siteHostname$: *cm*|*cd*
    $instanceUri$: http://cd
    $layerName$: Feature
    $sitecoreVersion$: 8.2.170728
    $moduleName$: GHD
    $platformProjectfolderName$: platform
    $netframeworkversion$: net48
    $moduleNamespace$: Feature.GHD
    $autoPublishOnBuild$: true
    $publishPath$: C:\Websites\my.sitecore.local
    $sitecorePlatformVersion$: 10.2.*
    $sitecoreAspNetVersion$: 19.0.*
    $publishRootPath$: $(SolutionDir)docker\deploy
Info: Running template engine:
-----------
Info: Template Engine started
    Manifest: Empty Helix Solution for Sitecore 10.2 using Sitecore AspNet rendering host (example)
    root path: C:\Users\<username>\source\repos\GHD 
Error: Exception occurred: Could not find a part of the path 'c:\users\<username>\source\repos\ghd\.editorconfig'.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite, Boolean checkHost)
   at LaubPlusCo.Foundation.HelixTemplating.Services.CopyTemplateObjectFilesService.CopyFile(ITemplateObject templateObject)
   at LaubPlusCo.Foundation.HelixTemplating.Services.CopyTemplateObjectFilesService.Copy(IEnumerable`1 templateObjects)
   at LaubPlusCo.Foundation.HelixTemplating.TemplateEngine.DefaultHelixTemplateEngine.Run(HelixTemplateManifest manifest, String solutionRootPath)
   at LaubPlusCo.VisualStudio.HelixTemplates.Dialogs.Dialogs.ManifestDialog.CreateButton_OnClick(Object sender, RoutedEventArgs e)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.Controls.Primitives.ButtonBase.OnClick()
   at System.Windows.Controls.Button.OnClick()
   at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
   at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
   at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
   at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
   at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
   at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   at System.Windows.Window.ShowHelper(Object booleanBox)
   at System.Windows.Window.ShowDialog()
   at LaubPlusCo.VisualStudio.Helix.Wizard.HelixTemplateWizard.GetHelixProjectTemplate(String solutionRootDirectory)
   at LaubPlusCo.VisualStudio.Helix.Wizard.HelixTemplateWizard.ShowManifestDialog()
logs from windows event log

Faulting application name: devenv.exe, version: 17.4.33122.133, time stamp: 0x637d0bc1
Faulting module name: KERNELBASE.dll, version: 10.0.19041.2193, time stamp: 0x7f7062e1
Exception code: 0xe0434352
Fault offset: 0x000000000002cd29
Faulting process id: 0x4a2c
Faulting application start time: 0x01d9088ee07a8ab0
Faulting application path: C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\devenv.exe
Faulting module path: C:\WINDOWS\System32\KERNELBASE.dll
Report Id: d6804cc8-e949-4a3a-b387-785e28b15373
Faulting package full name: 
Faulting package-relative application ID: 

Application: devenv.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.IO.DirectoryNotFoundException
   at System.IO.__Error.WinIOError(Int32, System.String)
   at System.IO.File.InternalCopy(System.String, System.String, Boolean, Boolean)
   at LaubPlusCo.Foundation.HelixTemplating.Services.CopyTemplateObjectFilesService.CopyFile(LaubPlusCo.Foundation.HelixTemplating.TemplateEngine.ITemplateObject)
   at LaubPlusCo.Foundation.HelixTemplating.Services.CopyTemplateObjectFilesService.Copy(System.Collections.Generic.IEnumerable`1<LaubPlusCo.Foundation.HelixTemplating.TemplateEngine.ITemplateObject>)
   at LaubPlusCo.Foundation.HelixTemplating.TemplateEngine.DefaultHelixTemplateEngine.Run(LaubPlusCo.Foundation.HelixTemplating.Manifest.HelixTemplateManifest, System.String)
   at LaubPlusCo.VisualStudio.HelixTemplates.Dialogs.Dialogs.ManifestDialog.CreateButton_OnClick(System.Object, System.Windows.RoutedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean)
   at System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject, System.Windows.RoutedEventArgs)
   at System.Windows.Controls.Primitives.ButtonBase.OnClick()
   at System.Windows.Controls.Button.OnClick()
   at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(System.Windows.Input.MouseButtonEventArgs)
   at System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate, System.Object)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(System.Object, System.Windows.RoutedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean)
   at System.Windows.UIElement.ReRaiseEventAs(System.Windows.DependencyObject, System.Windows.RoutedEventArgs, System.Windows.RoutedEvent)
   at System.Windows.UIElement.OnMouseUpThunk(System.Object, System.Windows.Input.MouseButtonEventArgs)
   at System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate, System.Object)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(System.Object, System.Windows.RoutedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean)
   at System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject, System.Windows.RoutedEventArgs)
   at System.Windows.UIElement.RaiseTrustedEvent(System.Windows.RoutedEventArgs)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Input.InputManager.ProcessInput(System.Windows.Input.InputEventArgs)
   at System.Windows.Input.InputProviderSite.ReportInput(System.Windows.Input.InputReport)
   at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr, System.Windows.Input.InputMode, Int32, System.Windows.Input.RawMouseActions, Int32, Int32, Int32)
   at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr, MS.Internal.Interop.WindowMessage, IntPtr, IntPtr, Boolean ByRef)
   at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)

The description for Event ID 0 from source VSTTExecution cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.

If the event originated on another computer, the display information had to be saved with the event.

The following information was included with the event: 

(devenv.exe, PID 11044, Thread 1) TestTypes\{7a24f8ff-85da-d664-ef44-83ff4743dae6} could not be loaded because the TIP could not be instantiated for the following reason(s): An item with the same key has already been added.

The message resource is present but the message was not found in the message table

No Valid Template

Great update :)
I do however get an error when trying to add a new "helix" project. It keeps saying "No Valid Template" even if I have the latest templates on the correct location.

Weird...

NoValidTemplate

Templates

AutoPublish fails in Visual Studio 2019

Hi @anderslaub

Version: 9.9.14

When you have <AutoPublishOnBuild>True</AutoPublishOnBuild> and you Rebuild solution in Visual Studio 2017 all projects are published correctly.

However, when you try to do the same in Visual Studio 2019 then AutoPublish fails with the following error message:

image

The value for PublishProfile is set to 'FileSystem', expected to find the file at 'C:\Projects\sitecoresolutiontemplate\src\Project\Website\website\Properties\PublishProfiles\FileSystem.pubxml' but it could not be found.

Test123.Project.Website	

C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VisualStudio\v16.0\Web\Microsoft.Web.Publishing.targets	

4360

Can't create new project un VS2015

Hi @anderslaub,

Tried to use Sitecore Helix Visual Studio Templates Version 0.9.9.3 to create new project in VS2015 but I got this issue

could not load assembly Laubplusco.Visual studio.HelixTemplates.Dialogs one or more dependency

image

It works fine in VS2017 but we still working in some projects VS2015.

I have an old version Sitecore Helix Visual Studio Templates 0.9.9.1 and it works fine in VS2015

Can you help us to fix this issue?

Thanks in advance

Autopublish for "legacy" Helix Solution doesn't work

I want to create a new Sitecore Helix MVC solution with auto-publish.

VS version: Version 16.10.3
Sitecore Helix Visual Studio Templates version: 22.12.1314

My steps:

  1. Create a new solution using Simple "legacy" Helix Solution - Support for "CLASSIC" project style(example)

  2. Check Auto-publish solution on local build

  3. Set Publish to file path to C:\Websites\my.sitecore.local
    image

  4. Add a new project to the feature folder use Sitecore Helix Module - "CLASSIC" project style (example from 2017)
    image

  5. Build solution

Actual result
Publishing project Feature.DefaultName2 to /. in build output.
And configuration of the new project should be published. However, when I wasn't able to where it was "published".

Expected result
Publishing project Feature.DefaultName2 to C:\Websites\my.sitecore.local in build output. Files are present in that folder.

  1. Create view and run solution build again

Actual result
Publishing project Feature.DefaultName2 to /. in build output.
An added view should be published. However, when I wasn't able to where it was "published".

Expected result
Publishing project Feature.DefaultName2 to C:\Websites\my.sitecore.local in build output. Files are present in that folder.

  1. Add a new project to the feature folder use Sitecore Helix Module with Unicorn - SDK PROJECT STYLE (example)
    image

  2. Build the solution. It is failed, but once comment line 5 in Templates.cs using Sitecore.Data; - it starts to work.

Actual result

Rebuild started...
1>------ Rebuild All started: Project: Feature.DefaultName2, Configuration: Debug Any CPU ------
2>------ Rebuild All started: Project: Feature.DefaultName3, Configuration: Debug Any CPU ------
Restored c:\source\helixtest\7\defaultname1\src\Feature\DefaultName3\platform\Feature.DefaultName3.csproj (in 2 ms).
1>c:\source\helixtest\7\defaultname1\src\Feature\DefaultName2\code\Feature.DefaultName2.csproj(122,3): warning MSB4011: "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VisualStudio\v16.0\WebApplications\Microsoft.WebApplication.targets" cannot be imported again. It was already imported at "c:\source\helixtest\7\defaultname1\Directory.Build.targets (16,3)". This is most likely a build authoring error. This subsequent import will be ignored. 
2>Feature.DefaultName3 -> c:\source\helixtest\7\defaultname1\src\Feature\DefaultName3\platform\bin\Debug\net48\Feature.DefaultName3.dll
2>Publishing project Feature.DefaultName3 to /.
1>  Feature.DefaultName2 -> c:\source\helixtest\7\defaultname1\src\Feature\DefaultName2\code\bin\Feature.DefaultName2.dll
1>  Publishing project Feature.DefaultName2 to /.

Expected result
Files should be published to C:\Websites\my.sitecore.local

P.S.
I have tried different combinations of solution type and project type from Helix templates. But I wasn't able to find a working combination.

Ability to exclude paths from token replacement.

Ability to exclude files or paths from token replacement. During the creation of a Solution (sln), this would allow someone to include project templates in a local HelixTemplates folder. If that folder isn't excluded it would run thru those folders and perform token replacement. The other issue is when you include dll or exe in the templates folder structure the template engine appears to try to open and save the files corrupt. It would be nice to tell the engine to copy these files but skip trying to perform token replacement.

Support for conditional $if$

Visual Studio's templating engine supports $if$ conditionals in its files so it would be good to support them here. Is this something you'd be happy to accept a PR for?

Sitecore 9.3

I am a bit confused how to change from 9.1 to 9.3. I have changed the version number in the dialog but after generation 9.1.0 still referenced. I have had to manually update references on every new project added. I would appreciate some clarification.

Thanks.

Ability to run custom code for token values.

Example 1:

Use Case:
Have the template seed a handful of Sitecore items by writing out .yml when the project is created. The .yml need GUID's created for the Sitecore items. VS templates allow for up to 10 GUIDs ($guid1-10$) OOTB but that might be limiting in the future.
https://docs.microsoft.com/en-us/visualstudio/ide/template-parameters?view=vs-2019

Example 2:

Use Case:
At the solution level, we would like to set these values during creation. Passing in a type of "hex" and a length would solve this. The custom class would return the generated value.

Bonus: Ability to hide tokens from the screen with a hidden attribute, but still include in the token array would make the UI much cleaner.

Issue changing template path in .helixtemplates file

I wanted to keep the example templates the plugin installs, so I renamed the folder they're in to "Example Helix Templates". I then created a new folder "HelixTemplates", and created a template within that directory. I don't want to confuse my fellow devs with choice!

I edited the .helixtemplates file in Notepad++ and set the templates.modules.folder setting to \helixtemplates. However, when I go to use the plugin the folder it uses is still the Example Helix Templates, and something sets the templates.modules.folder setting in the .helixtemplates file to \Example Helix Templates!

It almost looks like there's a file-system watcher that is overwriting the setting I manually entered in the .helixtemplates file?

I have resolved this by renaming 'Example Helix Templates', and by moving the templates within, rather than the whole folder. But it seems kind of strange.

Tokenreplacer failing on max threadcount

LaubPlusCo.Foundation.HelixTemplating.Services.RunReplacements() fails on line 40, when the template contains too many files. I read on StackOverflow here and here that the WaitAll call can only handle 64 threads... thus it crashes when you got too many files.

Different style for solution folder

In our project we are using a different convention for the name of the solution file.
As you can see here.
helix-folders

Currently when adding a new feature, the module is added to a solution folder named "Feature" instead of "20 - Feature"
Is it possible to automatically add new modules to the solution folders that we are currently using?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.