Merge schemas of custom dialog - Error conflicting definitions - bot-framework-composer

I am following the steps of this page:
https://learn.microsoft.com/en-us/composer/how-to-create-custom-actions
and have reached to the part where it is required to merge the two schemas: bots and your custom one. However when running the powershell script found inside the created project template (CoreAssistant template) I have the following error:
Error conflicting definitions of HelpDialog.dialog :
C:\Users\user\source\repos\AvanadeCoreAssistant\AvanadeCoreAssistant\dialogs\imported\Microsoft.Bot.Components.HelpAndCancel\HelpDialog\HelpDialog.dialog
Microsoft.Bot.Components.HelpAndCancel:
C:\Users\user.nuget\packages\microsoft.bot.components.helpandcancel\1.1.2\exported\HelpDialog\HelpDialog.dialog
Error conflicting definitions of HelpDialog.en-us.lu.dialog :
C:\Users\user\source\repos\AvanadeCoreAssistant\AvanadeCoreAssistant\dialogs\imported\Microsoft.Bot.Components.HelpAndCancel\HelpDialog\recognizers\HelpDialog.en-us.lu.dialog
Microsoft.Bot.Components.HelpAndCancel:
C:\Users\user.nuget\packages\microsoft.bot.components.helpandcancel\1.1.2\exported\HelpDialog\recognizers\HelpDialog.en-us.lu.dialog
Error conflicting definitions of HelpDialog.lu.dialog
HelpDialog is a predefined dialog that was already present. I have installed NodeJs and #botframework-cli package because it was required from the powershell script in order to run bf dialog:merge and now it seems these two sources have some kind of conflict.

To add to other answers, changes that worked for me are as follows:
update-schema.ps1, line 11, change "!**/generated" to "!../generated" and add "!../dialogs/imported"
Also, make sure that your custom action project is INSIDE of your bot directory, it should be a folder next to the "schemas" folder for the script to find it.
Note/Edit: Having the project nested inside the bot works to get the script working, though I do not recommend it due to causing other errors. Oddly, I found it was best to move the whole custom solution up a level, next to the bot project. You may have to edit the [botName].sln file in notepad to reference the location of the project, as well as editing the bot project's project reference.

I fixed it by changing the script. I noticed the script was trying to ignore the folder imported and generated but the error message indicated it was not doing so. So I changed it from !**/generated to !../generated.

I experienced the same issue.
To fix this problem you could simply delete the corresponding dialogs in the "imported" folder. Note that this will, however, delete these dialogs in your bot, which is not optimal but should be of little concern for a sample application.

Related

Create project that is not in the default path in DataSpell

I tried the new DataSpell today, but fail to create a project. Every time I try to attach a directory, it has been marked as a library. And it seems like the Project is always in
C:\Users\XXX\AppData\Roaming\JetBrains\DataSpell2021.3\projects\workspace
What's more, the intended project root folder (i.e., Test_2) is marked as a Module,
What's more, I can not mark the directory as well as all the subdrectories within it:
Does anyone know how to create a PyCharm like project in DataSpell?

Error: A namespace cannot directly contain members such as fields EntityFramework.dll' could not be found

enter image description hereI want to create model: add > class > ado.net entity, for my db first project and also want to create CRUD operation by asp.netscaffolding, but failed to create a model with necessary code.and thus i failed to create scaffolding .
in my model file AllahHelp.Context.cs, there is no code, only the text "ErrorGeneratingOutput".
Error 1:
A namespace cannot directly contain members such as fields or methods F:\project\WebApplication8\WebApplication8\Models\AllahHelp.Context.cs 1 1 WebApplication8
Error 2:
Compiling transformation: Metadata file 'C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools..\IDE\EntityFramework.dll' could not be found F:\project\WebApplication8\WebApplication8\Models\AllahHelp.tt 1 1 WebApplication8
If there is an error transforming your .tt files into class files, your class files will just have "ErrorGeneratingOutput" in the source file, which causes a "namespace cannot directly contain members such as fields" error, but doesn't really have anything to do with that.
Your actual error sounds like you're missing a reference to EntityFramework.dll. Right click the project, choose "Manage NuGet Packages..." and find and install EntityFramework to your project.
In some situations I've also run into a problem where since the transformation occurs before files are copied, referenced dlls don't ever get copied since the error occurs and stops the process. In this case you would need to remove the model from your project temporarily, successfully compile the project, and then add the model back.
According to this similar question it could also be because of your install path. If that is your issue, try to find where the dll is, and correct the environment variable VS120COMNTOOLS (Control Panel -> System -> Advanced System Settings -> Environment Variables -> System Variables)
(Be careful changing system variables, though.)
I was getting this error when attempting to build a project using .tt templates. I fixed the issue by checking everywhere that I used C# code injection and making sure that I closed each section of C# code by including #>.
Example:
Problematic code:
{
"find": "__LOCATION__",
"replaceWith": "<#= deployment.Location"
},
Fixed code:
{
"find": "__LOCATION__",
"replaceWith": "<#= deployment.Location #>"
},

Sugar CRM Module install issue

I uploaded the Module in Sugar CRM using Module Loader and it is showing in the list but while I try to install it shows me the following error.
Display Log
Failed to copy
cache/upgrades/temp/BqJ0Hh/SugarModules/modules/ls_l2schat to
modules/ls_l2schat
I have given permissions necessary permission to all folders but still getting the same error.
and the directory "cache/upgrades/temp/" is empty. Please let me know how to fix this issue OR debug step by step.
That usually means that your manifest.php is incorrect and it doesn't correspond to what is actually in the zip. Check to see if /SugarModules/modules/ls_l2schat exists in your module's zip file. If it is, check again and make sure that the spelling and casing is EXACTLY right.

Modifying project with multiple solutions files and multiple project files referencing each other

I have a project structure like -
proj_Main
proj_A(directory)
somefile.cs(etc.)
proj_A.csproj
proj_B(dir)
somefile.cs
proj_B.csproj
proj_C(dir)
somefile.cs
proj_C.csproj
proj_D(dir)
somefile.cs
proj_D.csproj
proj_Main(dir)
other dirs etc.
some.cs files
proj_Main.csproj
proj_Main.csproj.user
proj_Main2010.csproj
proj_Main2010.csproj.user
proj_Main2010.v11.suo
proj_A.sln
proj_B.sln
proj_C.sln
proj_D.sln
proj_Main.sln
proj_Main2010.sln
(There are actually more than 10 solutions inside it, to keep it simple, I have depicted 4 above.)
While opening it in VS 2012 I have opened proj_Main2010.sln and it shows other linked projects with it, opens them inside the solution. This proj_Main refers the dll of other projects from those other projects. So far fine.
Now I have to modify the code from all project files, but if I do that, the previously referenced classes and code stops working, and throws errors of all sort -
Error 2 The type or namespace name 'XXXX' could not be found (are you missing a using directive or an assembly reference?)
I am not sure, If this is the correct way to depict the scenario, my apologies for that.
My problem is, I am not sure If I am opening the right file to work on this solution or if I am trying to modify the files safely.
Any suggestions would be appreciated.
p.s. I also have a setup project in it ( but I guess its related to deploying an application not useful while developing /redeveloping it)

Build is producing a .momd in the bundle that is missing the .mom file

I have an app that has been running fine on the iPhone simulator for some time. Recently, I decided I wanted to re-use the data model and related classes in another project - so I dragged them from this project window to the other then told Xcode not to copy, just to make references. At first this didn't work so I jumped through a number of hoops to try to fix it (I may be asking more about that in another post). After all this, I re-compiled and tried to run the original app -- and it's not working any more. On further investigation, I discovered that when I re-compile the original app, I end up with a bundle that contains a .momd package but it contains only a Versioninfo.plist file - no .mom file, no .omo file like I'm expecting to see. I don't recall making any changes to the original app. I don't get any warnings. I just get an incomplete .momd package (and, not surprisingly, my app now crashes).
What's going on here?
BTW, the app now crashes with this message:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '* -[__NSArrayM insertObject:atIndex:]: object cannot be nil'
Which I get when executing this line of code:
self.productRegistry = [[UIManagedDocument alloc] initWithFileURL:self.productRegistryURL];
I figured this out by looking more closely at the file locations in the project directory using Finder. In the Xcode window, everything looks normal but in the actual project directory I found that the .datamodeld package had ended up at the top level of the project directory -- at the same level as the project package itself. Xcode apparently did not like this but unfortunately it did not complain -- it just created a partial build output. Once I moved the .datamodeld package into the same folder as the rest of the project's code, everything worked just fine.
This would appear to be just a quirk. I would expect that Xcode would either see that all is well and build correctly OR it would see that things weren't quite as they should be and fail. In this case, it did not build correctly but was silent about it.
Hope this answer helps someone else someday.

Resources