Category Archives: Visual Studio
This week we were trying to install Visual Studio 2017 (15.3.2) but we were getting the following error:
Package ‘Microsoft.VisualStudio.Debugger.JustInTime,version=15.0.26621.2’ failed to install
Other Visual Studio components depend on this package:
- .NET desktop development
- .NET desktop development tools
- Windows Workflow Foundation
Since the Windows Workflow Foundation module couldn’t be installed, I couldn’t open workflow libraries to develop Custom Workflow Activities for Dynamics 365.
The solution was as simple as updating the System Variable __PSLockDownPolicy value to 1:
This is related to the PowerShell Constrained Language Mode, see the following article for more details:
Basically the Visual Studio installer was trying to run a command that was not allowed based on the PowerShell Constrained Language policy.
***Thanks to my colleague Emir for his help 😉
Looking at forums, there were other suggestions like stopping the anti-virus or run the following command:
Unblock-File -path “C:\ProgramData\Microsoft\VisualStudio\Packages\Microsoft.VisualStudio.Debugger.JustInTime,version=15.0.26621.2\RegisterJustInTimeDebugger.ps1”
The following discussions were talking about the same:
The new CRM SDK 2015 doesn’t give support yet for our known CRM Developer Toolkit, which has been part of the CRM SDK until CRM 2013. Basically, the CRM SDK 2015 assemblies have been compiled with .NET Framework 4.5.2, but CRM Developer Toolkit was compiled using NET Framework 4.5. See the next Microsoft article for more details.
For instance, let’s check the new assembly Microsoft.xrm.sdk.dll part of the CRM SDK 2015:
The good news are… we still can make compatible the Developer Toolkit with the latest CRM SDK 2015 editing the .NET Framework in the corresponding projects of our Visual Studio solution. Let’s say we have the next CRM solution:
For plugins and workflows, we should update the references to the new assemblies and also the .NET Framework in the project properties:
After updating those references, we could still find the following error:
“The type or namespace name ‘Xrm’ does not exist in the namespace ‘Microsoft’ (are you missing an assembly reference?)”
This error is indicating you haven’t got installed the expected .NET Framework 4.5.2. Do right click on the same project and select Properties to check the version actually used:
If you are only getting old versions of the Target Framework, select “Install other frameworks…” that will take you to the next site:
There you must download .NET Framework 4.5.2 Developer Pack.
After it has been installed, you get a new option in that previous list:
Finally, we need to do something similar with the CRM Package Project. But in this case, we will have to edit the project file and update the entry “TargetFrameworkVersion” to “4.5.2”. Start unloading the project:
Update the mentioned entry “TargetFrameworkVersion“:
Finally, reload the project again and everything should work now!
About this last part, I would like to say thanks to my CRM MVP colleague Scott Durow (@), who helped me to find that entry.
If you don’t update the package project, it may still compiled, but the actual deployment will fail and you should see the next warning in the Visual Studio output:
warning MSB3274: The primary reference “[Your Assembly Name].dll” could not be resolved because it was built against the “.NETFramework,Version=v4.5.2” framework. This is a higher version than the currently targeted framework “.NETFramework,Version=v4.5”
warning MSB3275: The primary reference “[Your Assembly Name].dll” could not be resolved because it has an indirect dependency on the assembly “Microsoft.Xrm.Sdk, Version=220.127.116.11, Culture=neutral, PublicKeyToken=31bf3856ad364e35” which was built against the “.NETFramework,Version=v4.5.2” framework. This is a higher version than the currently targeted framework “.NETFramework,Version=v4.5”
Last week I noticed many of the icons in the buttons of our Online Team Foundation Service have been disappeared. This issue only happens with IE 10. I have tried the compatibility mode but no difference.
- It works fine with Chrome (28.0.1500.95).
- Turn on Internet Options -> Advanced tab -> Use Software Rendering in IE
See more information about this bug here: