CRM 2016 Plugin Profiler not working for some plugins - dynamics-crm

I am having an issue with the Plugin Profiler in CRM 2016 on-premise.
I need to debug a plugin on a remote machine. The assembly that contains the plugin is not registered as sandbox. Also for all plugins in the assembly, the deployment is set to Server and mode is synchronous. The solution on the remote server is managed.
I successfully installed the profiler in the Plugin Registration Tool and the Plug-in Profiler node appears in the tool as expected. However, when I select my intended plugin step to debug, there is no "Start Profiling" option available when I right click on the step or at the top of the Registration tool. In fact, that option is not available for any plugin steps in the custom assembly. However it is available for plugins in some built-in assemblies such as ActivityFeeds.Filtering.Plugins.
Any help with getting the profiler to work in appreciated.

Related

How to debug Blazor project (plugin module) in VS if main web app running under IIS?

This scenario is where there is a Blazor web application platform, inside of which plugin modules can be run. Specifically in my case this is the Oqtane platform, but the question could apply to other Blazor web app platforms e.g. ABP.io. The plugin modules are basically assemblies, that are loaded into the platform application at runtime.
My question is - how to debug a plugin module where the platform is running under IIS, i.e. the platform is NOT being launched via Visual Studio.
I know that one way to do this would be to get the platform source code, open its solution in Visual Studio, then add the plugin module projects to the solution, and launch the whole application from VS.
However, for various reasons I prefer to run my development instance of the platform under IIS, and maintain a VS solution that just contains the plugin module projects, and copy the DLLs and wwwroot content into the instance on build (and restart the IIS app pool).
So this approach does work, except I can't see how to debug my plugin module code when the app is running. If this was a WebForms or MVC application, I would use the VS "attach to process" command to attach to w3wp.exe. However, Blazor apps running under IIS clearly don't work like that.
FYI, the app runs in Blazor Server mode (not WebAssembly), and is .NET 6.0
Is this kind of approach possible, and how?
It seems I was mistaken about not being able to use Attach to Process to attach to w3wp.exe (due to some misconfiguration, the process was not showing up to attach to).
If you make the following selections on the Attach to Process window, you should find that the w3wp.exe process shows up and can be attached to, which means you can debug your plugin module assembly code:
Connection type: Default
Connection target: your machine
Attach to: Managed (.NET Core, .NET 5+) code
Show processes for all users: checked

TFS to Release Management - Release from Build

I am so close yet so far from getting my Visual Studio (MVC) application released through TFS & Release Management. I am using Version 2013 and have my build definition setup as follows:
As you can see it is using the TfvcTemplate.12.xaml as its template, and as such I cannot see the options for Release as I have been finding in all other examples online - eg:
I have gone into Release Management and setup my Release Template to reference this build definition and selected 'Can Trigger a Release from a Build'... but I have nothing happen in RM when I Build in Visual Studio.
What I have also found is that because the application I am building is MVC with Windows Authentication - every time I run a manual release, the Web Site gets rebuilt (as per my release template), but the website is always rebuilt with Windows Authentication Disabled... Which is a pain as I keep having to go into IIS after every release to enable Windows Authentication.
So, my questions are...
1) What am I doing wrong with my version of the Build Definition setup that it will not prompt a release?
2) Do I have to Remove and Create my website on the Release Template... and if so...
3) How do I get around the fact I always have to revisit IIS to enable Windows Authentication after each release?
Thanks!
You need to switch your build template to ReleaseTfvcTemplate.12.xaml.
You can find that file in the folder:
Program Files (x86)\ Microsoft Visual Studio 12.0\ReleaseManagement\bin
You need to check that into your TFS repo, then switch your build definition over to use it.https://msdn.microsoft.com/library/ms181355(v=vs.120).aspx#add_template

How to resolve "Unable to start debugging on the web server"

I am creating a module on Dotnetnuke project template, and i want to make the release of that module. But when I select "release" from dropdownlist and after that click on debug button. I got an error below on iis7 and windows7.
Unable to start debugging on the web server. The web server is not configured correctly. See
help for common configuration errors. Running the web page outside of the debugger may provide further information.
I don't understand why it comes.
If you are trying to DEBUG, you shouldn't choose RELEASE from the dropdown list, that will build the module in RELEASE mode, not DEBUG mode.
You should also check to see if you have enabled Debugging in the web.config of your DNN Development site.
Update:
If you want to package the module, after choosing RELEASE from the dropdown list, choose BUILD not the DEBUG option in visual studio.
One other consideration is to ensure that your web.config compilation node is set to debug="true". This is of particular interest if you configSource this setting into a separate file.

Build->Deploy doesn't work for database projects

I have a database project in Visual Studio 2012. When selecting "Deploy MyDBProj" on the Build menu nothing happens.
When I hit F5 to debug however, the database project is deployed, using the settings in the debug section of the database project properties. This is enabled in by checking the "deploy" checkbox in the solution's configuration manager.
I would like to be able to do a deploy, without starting a debug session. How do I do that?
Note: This is not publishing, which is something else. I want to know how to manually initiate the deploy that is part of the build process. Since the deploy is already done automatically it should be possible to initiate it manually too.
I got an answer from Microsoft at MS Connect:
There was a bug in the version of SSDT that shipped in Visual Studio
2012 in wuich the Deploy menu command appears but is a no-op. This has
since been fixed and is available in the latest version of SSDT:
http://msdn.microsoft.com/en-us/data/hh297027
The only way I can think of doing it (though I haven't tested it) would be to use the command line to do it as outlined at http://msdn.microsoft.com/en-us/library/dd193258(v=vs.100).aspx.
Though once you have your manifest, you can run:
VSDBCMD /a:Deploy /dd:+ /manifest:manifestFileName.dbmanifest
from a command line to deploy your database.
The manifest will contain your target database name, connection string, and so on but you can also specify those as part of the command line instead.

CRM 2011 Development toolkit

I just installed the CRM Development Toolkit and everything seems to be working fine until I need to deploy the plugins. According to the tutorials I should have a Deploy option just below Rebuild when i right click on the project package(in this case Lan2Lan). Unfortunately I have no such option.
Any ideas what I might be doing wrong?
If you want to deploy in this manner, create your initial project using the Solution Template rather than the individual plug-in library template. It will create projects for plug-ins, workflows and SilverLight. You can delete the projects you don't need. In the end you should have a project called 'CrmPackage' which you can right click on and have a 'Deploy' option.
I would suggest that if all you are maintaining is JScript, then use the CRM 2011 Package project. It doesn't create the Plugin, WF and Silverlight projects - which have to be compiled and deployed slowing down your deploys.
Personally, I keep my web resources and compiled projects in separate projects to speed my JScript develop/debug/deploy process.

Resources