Deploying single files to Dynamics 365 while developing (e.g. web resources) - dynamics-crm

I am developing my first simple app in Dynamics 365, and one of my main pieces is a Web Resource that involves a lot of tweak-save-test-repeat workflow. Up to this point, every time I have made a tiny change to my web resource, I have been deploying it by opening the solution customization settings, navigating to my particular Web Resource, opening it, clicking "Text Editor" button, pasting in my updated Javascript code, and saving/publishing the changes.
This process is tedious, and I would like to find a way to automate it. I have been researching Dynamics 365 deployment tools, and I have found the CRM Package Deployer tool, but from what I can find it requires me to set up an entire deployment package (a giant XML file) comprising my entire customization, rather than the single file I am currently working on. Is there some way to automate deploying a SINGLE FILE with these (or other) tools? Or is it possible to deploy a package with ONLY A SINGLE FILE rather than re-deploying the entire solution's package each time I just change the one file?

Check out the open source alternative to the SDK's developer toolkit called Dynamics CRM & 365 Developer Extensions which you can install right into VS. It makes deployment of web resources a snap. Basically, you map individual JS/Html/Css/etc files to their corresponding web resources in CRM, and then once they are mapped all you have to do to deploy is right-click and choose Publish to CRM.
That tool is great, but if you really want to speed up your web resource development, you should use Fiddler. In Fiddler, turn on Autoresponder and setup a mapping for the file you are working on. When Fiddler sees a request that matches a mapping, it doesn't send the request to the server and instead returns the file from your hard drive. This technique offers a dramatic speed improvements for developing web resources. There's also a free tool for Fiddler called Imposter that makes the process easier. Search the web for "dynamics crm fiddler web resources" to read about this technique.

Another tool is the Web Resource Manager in the XrmToolBox It's free, a part of the XrmToolBox, and even handles pushing .map and .ts files you're doing TypeScript. It will warn you if someone else has updated the file since you have, and allows you to push, publish, or even add the files to a particular solution.

Another lightweight Visual Studio Add-in, which allows for deploying single (or multiple) web resource file to CRM without leaving Visual Studio is
Microsoft Dynamics CRM Web Resources Updater:
https://marketplace.visualstudio.com/items?itemName=MaratVDeykun.MicrosoftDynamicsCRMWebResourcesUpdater

There is also a commercial solution called XrmToolkit which can be set to automatically publish to CRM when you save the web resource file in Visual Studio:
https://www.xrmtoolkit.com/

Related

Deploy Outlook/Word/Excel Addins with custom internal website

I have an outlook addin that I currently deploy by telling the users to browse with windows explorer to a specific file on a share.
I would like to change that such that I would tell the users to browse to a specific internal website using edge/chrome. Then click on a link to install the addin.
I want to change from file system to browser based so I can deploy it much like any other website we have. I have add good instructions on the webpage with the link and any number of other advantages.
The file system supports automatic updating as we update the addin and I would want the browser based install to support the same thing.
The best what you can do is to publish a manifest URL so users could add it instead if file path on the shared place (of course, if the add-in is not published in the AppStore). You can find all possible ways of deploying Office web add-ins described in the Deploy and publish Office Add-ins article.

How to test an office excel add-in with other computer

I'm newly developing office Add-Ins. I was able to create an Excel add-in using visual studio 2019 with Office / SharePoint development workload (JavaScrip APIs). It was possible to test on my own excel desktop when I press the start button in Visual studio, but I need a test on another computer. I'm planning to publicize this app on AppSource and OfficeStore.
Checking Microsoft's documentation and some other questions here at Stackoverflow I understood that the recommended way to test is: SideLoad.
Microsoft's Documentation about testing and debugging office
add-ins
Test office Add-ins - StackOverflow
Overall Testing Story for Office Add-ins
On the other hand, when I started on my desktop the WebApp(task pane) was host in the IIS server as localhost. So, I created a shared folder and put the manifest archive that was available in my machine on the path: Office add-in\ExcelWebAddIn1\bin\Release\OfficeAppManifests. Besides that, accessing another computer I set the trust manually and it works. On the other hand, when I accessed the excel> insert>add-in>myadd-ins> down arrow is not possible to keep going with Microsoft's documentation, and the add-in is not there!
If I try file>options>add-ins is not there too!
Sideload Office Add-ins for testing from a network share
Is it necessary to host the web app on a real server or Azure before following these steps? or Is it necessary to publish the solution? Besides that how can I include the manifest in excel?
To test an add-in on a machine that is not the machine where the add-in's web app is running, you cannot use "localhost" in the manifest. The manifest must point to the HTTPS URL of the web app.
I have done the following:
installed and used Node.js
edited taskpane files etc on node server
in a browser, visited localhost:3000/taskpane.html and other files, and copied source generated
on a webserver, placed these generated files, and copied links to these files (only one html and one js needed)
repalced links in manifest.xml to html file, and in .html file to .js file
re-upload manifest.xml to reflect changes
It works, with some errors being thrown in the console output.
It does mean that you need to repeat the steps above each time, except for the upload of the manifest.xml.

Download Azure website and Azure database and create new TFS project

We have an Azure website and database that was published by a 3rd party. Is there a way to pull this down into Visual Studio and Team Foundation Server as a project?
I know you can publish existing projects to Azure via Visual Studio, but this site and database currently only exist in Azure.
You can move the database by exporting it through the portal, downloading the bacpac blob and restoring it to a local SQL server.
The content of the website could also be recovered using a backup of the website (currently in preview). This should work well for all static content and scripting languages (e.g. PHP) but you will have a hard time if the original solution contained multiple projects and compiled code (attempting disassembling the code and rebuilding the solution would only be feasible in a worst case disaster recovery situation).
If there is any chance to receive the code and project meta-information through the 3rd party it is the preferred solution for all non-trivial websites.

Visual Studio 2010 can't open a web browser, tells me to restart Windows every time

I'm trying to publish an Azure application, but can't sign in using Visual Studio 2010. I get the error message "The web browser cannot be started. To resolve this problem, you must restart Windows."
I've tried both rebooting and making Internet Explorer the default browser, but I still get the error message. This also occurs when clicking on other links (for example "Online Privacy Statement" in the same publish dialog box).
How can I fix this, or alternatively, are there any other easy ways to publish to Azure?
There are several ways to publish to Azure. Depending on your preference, some of them may be easy. Some, not so much.
First of all, are you using a source control? If you're using git, then you can use Azure Git Repository that comes free with Azure Websites and also Azure Cloud Services. So when you push your code to the Azure repository, it automatically publishes the final bits to the corresponding site.
If you're using TFS locally (at home or office), you can set up a build task that'll deploy the bits to Azure. Also, check out TFS Preview if you are comfortable with a Microsoft hosted free TFS server.
If you feel comfortable using FTP, you can get the FTP account details from the Azure portal when you set up a new azure website or a cloud service.
Finally, one of the easiest way to publish to Azure is to use the Publish Profile feature.
You'll find a link called "Download Publish Profile" associated with
your azure website. Click on that to download the profile (an XML
file).
Then right click on your VS project and hit Publish. Under Profile
tab, select "Import" and pick this downloaded file.
It should populate all the details for you. Test your connection to make sure everything works okay.
Publish and ENJOY!
UPDATE: Based on the comment to this answer, adding screenshot to show where to get the FTP details for your azure website.

Web Application within a Web Site in Visual Studio?

Visual Studio allows you to make "Web Sites" and "Web Applications", but, inside a project, can you have one within the other?
Say I have my website "www.mysite.com" and I have an application called "BudgetCalculator". One the production server, this is supposed to be located at:
www.mysite.com/BudgetCalculator
And the BudgetCalculator app contains links back to other parts of the website, like "/page1" and "/page2".
However in Visual Studio, when they're listed as two different projects, they're on the same level. When I fire up the debugger for the BudgetCalculator app, those links aren't going to point back to the main website, like they should.
Is there a way around this?
One solution would be to stop using the built-in .NET Web Server.
Use IIS, create one site, and make your Web App a Virtual Directory inside of the Web Site.
A project cannot host/contain another project in Visual Studio.
You can however create a project that sites in the directory of another higher level project when you create it, however they may not be directly linked, so you couldn't debug them both at the same time.

Resources