ClickOnce Deployment failing–requires installing into GAC

Note to myself for future for this issue: After making some changes to an application, I went to publish it using Visual Studio, as a ClickOnce application. On trying to install the resulting published application I got presented with the following error.

Unable to install or run the application. The application requires that assembly Newtonsoft.Json Version 6.0.0.0 be installed in the Global Assembly Cache (GAC) first

Unable to install or run the application. The application requires that assembly Newtonsoft.Json Version 6.0.0.0 be installed in the Global Assembly Cache (GAC) first.

I searched for any reference, or mention of the NewtonSoft 6 version but found nothing, anywhere in any projects involved. There was a old folder in the NUGET cache for it, so it had been in use at some point.

Totally stumped, the breakthrough came when looking at the build log. There were warnings in there about the version of Newtonsoft.

Warning message in build log

Ah – that makes more sense, so I added a mapping into the app.config.

Binding Redirect to correct the issue from version 6 to 10

<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30AD4FE6B2A6AEED" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="10.0.0.0"/>

After publishing the application launched correctly again.

There must be some 3rd party dependency somewhere that is looking to the old version but I can’t track it down. Remember ClickOnce applications run in a sandbox.

** If you found this useful, drop me a comment to let me know, as it motivates me to blog more!

Retail Microsoft Dynamics GP Point of Sale Systems (POS)

What retail point of sale (POS), retail store, till Systems are compatible with and also work well with Microsoft Dynamics GP?

On my investigation, the market seems to be sparse with only a few products out there:

Compass POS- seems to get the most praise and most mentions

Salespad POS – very experienced in Dynamics GP

Retail Edge – reports of the product being integrated successfully with GP

Microsoft Dynamics Retail Management System (RMS) (as good as retired not worth looking at)

 

If you know of any others, please leave me a comment and I will add them to the list.

Enterprise Microsoft Dynamics consultants and developers should sit up and pay attention to Microsoft Graph, a briefing

If you are involved in business software then Microsoft Graph is a really big deal, so sit up and pay attention! Graph is quickly becoming the all pervasive API for access/control of the Microsoft cloud products and services. This is going to encompass Azure AD, Excel, Outlook, OneDrive, OneNote, SharePoint sites/lists, Planner, machine learning, business intelligence, Dynamics ERP products, cognitive services, users, Insights, Microsoft Teams and lots more, as they are added. I have noticed Microsoft Graph being mentioned more and more, so thought it about time I briefed other technologists working in or on behalf of enterprises about its importance.


What is Microsoft Graph?

Microsoft Graph Gateway

Microsoft Graph is the API of APIs, a key enabler of next generation computing with machine learning, BI and more. It is a single consistent API endpoint that provides access to a candy store of Microsoft cloud technology. It is a robust, well designed and strictly curated API, that is encompassing access to all the progressive Microsoft applications and services in the cloud. New services and applications are being rapidly added to Microsoft Graph all the time. Both end users and independent software vendors (ISV) have a need to integrate with the new fleet of cloud products and Graph can be thought of as a menu of services and products from which you may peruse, pick and choose from. From these selections, innovative solutions to your or your customers’ business needs can be devised. Microsoft Graph is your entry point to this world. Perhaps now you can start to see how important it is to keep an eye on Microsoft Graph as it matures and evolves.

Graph is one of those cases of the sum of the whole being greater than the individual parts. Graph enables consumers of the API to segue contextually and effortlessly between related data in the Graph, examine the Microsoft Graph graphic below to get the idea.

microsoft graph showing relationships between data


Some highlights of Microsoft Graph  include:

  • Office 365 Groups
  • BI Reporting
  • OneDrive
  • File storage
  • Excel and office
  • Sharepoint sites
  • Microsoft Teams
  • Insights
  • Outlook
  • People (users)
  • Dynamics products (e.g. Dynamics endpoints (NAV) coming soon…)

Design

Access to the API is kept simple with straightforward (REST) HTTP endpoints with easy to process, familiar JSON responses, this makes it easy for different devices and platforms to consume services utilizing the API. To ensure traversal of the Graph is made easy, product teams implementing the Microsoft Graph for their product are required to; abide by strict naming conventions, versioning rules, philosophy and data typing. The result provides the consistency and quality required to enable effortless consumption of information from different facets of the Graph for single purposes.

In a session that I recently attended, the Dynamics NAV team were describing the experience of getting the NAV ERP product onto the Graph. It sounded like the Graph team expect a high standard from those wanting to be a part of it. For example there are performance targets to meet, responses to API calls within 20ms, that can be a challenge in ERP scale, breaking changes on the API between versions are certainly a no, no too!. Lets face it, the Graph team are in a position to call the shots, as a product is not a first class player on the Microsoft Platform if it is not on the Graph. Thus in the new era, for those at Microsoft, long term future of your particular product may depend on engaging with Microsoft Graph.


Leave and resume

Not only is the aim for Microsoft Graph to be central to the cloud services and products, indeed it looks like with Project Rome, this Graph also is to be central to windows operating system too. It becomes the technology used to hold state for the operating system to allow hand off between devices and instances of windows as users move between them. Thus allowing users to pick up on another devices where they left off on a previous device, no matter what the operation you were performing. It will also be the glue allows the devices to communicate instructions between each other, thus for example it could provide instructions from your laptop to your Xbox games console, binding disparate devices together. Applying these concepts to business this becomes very powerful with lots of potential. Think of typical workflows through a business and the movement of individuals in that business, but with Microsoft Graph coordinating the the information flows and performing operations on them. Talking of workflow, Microsoft Flow can be extended with the Microsoft Graph (see references). Multi-device experiences are now easily in reach of us all!


Microsoft Graph and the Enterprise

So as a end user or Microsoft Dynamics partner you may start to see how important it is to have an understanding of the Microsoft Graph! It is the key to the engine, enables integration and interaction with the Microsoft services. Business intelligence driven from cognitive services or machine learning will take on more business decision making as it matures. It will commonplace and essential due to companies striving to differentiate themselves or seeking competitive advantage, so the Graph will be critical in delivering those experiences and services to the business. ISVs will also need to develop competencies with integrating the Microsoft Graph, it will be key to developing new generation business solutions. We may see Dynamics NAV shortly becoming another part of the graph that may make it discoverable to more companies by them stumbling into using ERP while using the Graph. The distinction between products and services are bound to blur over time, leaving less distinctly defined products. It certainly brings us yet another step nearer to a world where CRM/ERP/Office/BI/Cognitive Services/Machine Learning/Office products/IoT blur together into one another now becoming a platform offering. I still see the need for “consultants” or “specialists” that can help companies navigate and translate best use of the open ended possibilities they will then be faced with into business solutions. There will also be spaces for the ISV to address verticals by adding thier own value and in other cases punch out of the graph into the “real world”. This is going to be a new shape of enterprise software solutions, keep up with the changes!


If you are a developer or interested in integrating with Graph please read on…

Extending Microsoft Graph

The Graph may also be extended by developers or technical minded users via extensions, with their own application data adding custom properties to Microsoft Graph resources without requiring an external data store. Examples are storing user profile information in the graph by extending the user resource.

  • open extensions: A good way for developers to get started.
  • Schema extensions: A more versatile mechanism for developers who care about storing typed data, making their schema discoverable and shareable, being able to filter, and in the future, being able to perform input data validation and authorization.

So it can be seen how consuming the Graph API is easy, compared to integrating with all those product APIs individually and dealing with trying to tie them together yourself. 


Getting Started

The excellent Graph developer site is here https://developer.microsoft.com/en-us/graph

It contains a wealth of information to get you started, such as samples and the explorer tool, the Graph explorer is an “in browser” tool for exploring the API.

Microsoft Graph Explorer

There are samples and SDKs available there too for different languages to get you running quickly along with plenty of documentation sections.

Microsoft Graph Samples and SDK


Note:

Graph formerly known as the Office 365 Unified API.


Reference material:

Microsoft Graph APIs: The Glue That's Starting to Stick

Build Intelligence with Microsoft Graph

Add custom data to resources using extensions

Extend Microsoft Flow with the Microsoft Graph


If you found this helpful or interesting then please comment as it helps motivate me to write more!

NAV TechDays 2017 - Day two

Day one is here: #NAV Tech Days 2017–Antwerp Belgium, Day one

Day two and a tough start, Friday and a busy month was catching up with me. Dragged myself out of bed at a hideously early hour, to catch the shuttle bus to the venue. Again the organisation is faultless with stewards outside the hotel helping people to the buses and said buses running right on time.

Breakfast was laid on again at the venue, with pastries, sandwiches,  cereal and milk, yoghurt, coffee fruit juices etc. quick bite and right into the first session of the day…

Find below some highlights of the day -  I try include enough to give you a taste of the sessions without reproducing the whole session – you need to attend to get the proper experience (or watch the you tube videos when they get released)!




PowerApps, Common  Data Services and Common Data Model – Michael Nielsen, Mark Brummel

I was tired so didn’t take many notes, but Mark and Michael showed us about the common data model and the common data services layer in Azure.

Michael pointed out how there are shortfalls in the CDM, when it comes to basic ERP functionality. For example, where sending invoices to a different person to the delivery address person, this is not possible as the person name is held at a level above the addresses. There are limitations/problems with the model all over due to the data model coming from AX/CRM or other product teams that do not necessarily map well to NAV (or Dynamics GP I would add).

ps4

Slide below shows the model that you can navigate around if you so wish from repository.

ps3

Slide below shows swagger (an API documentation tool).

ps2


power1


Easier and DevOps-friendly Dynamics NAV environments using Docker /Windows Containers -  Freddy Kristiansen,  Jakub Vanak, Tobias Fenster

docker

This turned out to be the best session at NAV TechDays. Partly due to timing as I’ve been playing with Docker recently.

Here is a summary of the points from the presentation:

NAV container is quite a large one due to the number of dependencies, such as .NET, SQL, IIS etc.

IF you are new to Docker, don’t go looking to find a remote desktop connection into the container, you can’t it simply does not work that way.

Advantages of containers is uses much less space as only the difference is applied if you have multiple Docker images.

Immutable base and only changes are stored from there so more containers that are similar, then that makes for more efficiency.

The images are easily accessed and pulled down, gives reliable state of environment that can be reproduced for test, dev etc.

Can configure to allocate resources to different containers, resource governance.

Docker2

Networking:

Can map ports from external into to container using port mapping, if access required outside the machine host.

Docker uses NAT to allow access to the container from host.

File System:

The file system is like chroot in linux – mapped file system to directory on host.

Demo:

Then demo of first container.

Using Docker run to start new instance

dock1

How is Docker NAV image created:

  • Base image based on Microsoft/Windows server code
  • Then sql express and iis layered on top
  • plus installations scripts (PowerShell)
  • NAV generic image applied
  • Parts of the NAV installation DVD installed
  • then install scripts from generic layer is added
  • DVD is removed from the image, after running
  • Country database added on top of (country images)


What happens when image is started?

The scripts can be overridden and only those parts required are ran. For instance a company SQL server could be used instead of SQL express.

Note the “if necessary” on the what running.


Extending the NAV Docker image

It was then covered how to extend the standard NAV images:

Making your own image does not make sense as you can’t get the benefit of the regular releases, better to extend the provided container.

The PowerShell scripts created in way to extend Docker images on  the fly..

PowerShell will start everything up SetupConfiguration.pa1 in folder of start.

The scripts look for override scripts if they are present in folder and runs if there

Many scripts are empty placeholders provided as hooks, they are empty for you to override such as addionalsetup.ps1

this provides for many extension points


Demo on extending the container

In your extension still call the original for best practices, unless it is setup certificate for example where it does not make sense.

Example of script could add domain users from domain to NAV Docker image or practically anything else

Docker7

docker6

Build and resuse your own images

After extending the standard NAV Docker images you need to persist that and resuse your images.

/dev /qa / test  need to be as close to each other as possible so this is a good use case for containers

To capture the image, can stop the image then label with a save changes


Normally images are in a public registry but you can set up private registry lets you store your own images in your environment, you pull from your own registry.

Create your own dockerfile = “image recipe” and build images


Resource governance:

Use the resource limits for the containers so the instances don’t impact the whole host.

example If out of memory error, it stops and restarts the container,  if configured that way.

warm mode where able to scaling and high availability run the same container on different hosts. The others take over.  This is good for High Availability.


Multi-cumulative update environment

Docker solves massive headache of the cumulative updates


Github navcontainerhelper project

a number of helpful PowerShell scripts for running NAV containers. Can run them from the PS gallery too.


This session was interesting, I would like to see this applied to Dynamics GP which is my usual development target. As Docker is only dealing with the service layer, it suits the webclient most, but with click once or copy deploy we can get value from it for use in windows client too.

There were many questions from the audience after this session. The buzz around Docker continued throughout the conference. Partners can see the benefit of managing many customer setups in a more efficient manner than VMs.


Source Code Management with Visual Studio Code Made Easy – Soren Klemmensen, Janas Andersen

scm

First half was a intro to Source Control. Rapid intro as to WHY you should use source code management to introducing Git then to how this looks in Visual Studio Code.

Demos:

There are some good helper commands for NAV in VSCode- NAV export to Git for example that pushes all the objects into Git from NAV.

If you work with source control, apart from seeing the VSCode Git and NAV integration parts, it was pretty slow as explaining basics of source control actions.

Demo showing triggering automatic builds from check ins, launching Docker for the build.

If this session represents the normal state of a NAV development team then I’m worried, he talked as if no one is doing Agile or using any kind of source control – really?


Lunch

Lunch arrangements, soup and selection of filled buns with quality fresh salad, cheeses, fillings etc. A large number of these “stations” were around the exhibition area meaning no big queues for lunch and good footfall for the exhibitors.

lunch3


The conversations on Docker were very prevalent in the Airport shuttle waiting lines and on the coaches back to the airports. Partner developers really bought into how Docker can radically change how they manage customer images.

It was interesting to also hear concerns about how to deal with the new world of GDPR where having customer’s data on your system becomes a liability.