Category Archives: Visual Studio

Failed to install Microsoft.VisualStudio.Component.Debugger.JustInTime (VS2017)

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

ramontebar_blog_Just-In-Time debugger dependencies

Since the Windows Workflow Foundation module couldn’t be installed, I couldn’t open workflow libraries to develop Custom Workflow Activities for Dynamics 365.

SOLUTION:

The solution was as simple as updating the System Variable __PSLockDownPolicy value to 1:

ramontebar_blog___PSLockDownPolicy

This is related to the PowerShell Constrained Language Mode, see the following article for more details:

https://blogs.technet.microsoft.com/kfalde/2017/01/20/pslockdownpolicy-and-powershell-constrained-language-mode/

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:

https://developercommunity.visualstudio.com/content/problem/27352/install-stucks-applying-debuggerjustintime.html

https://developercommunity.visualstudio.com/content/problem/24407/failed-to-install-microsoftvisualstudiocomponentde.html

https://developercommunity.visualstudio.com/content/problem/15718/incomplete-workload-net-desktop-development.html

https://developercommunity.visualstudio.com/content/problem/27400/unable-to-install-officesharepoint-workload-on-vis.html

 

 

Advertisements

Dynamics CRM 2015 SDK and Developer Toolkit

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: 

SDK2015_Microsoft.Xrm.Sdk_ILSpy

 

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:

CRM_DeveloperToolkit_SampleSolution

 

For plugins and workflows, we should update the references to the new assemblies and also the .NET Framework in the project properties:

CRM_DeveloperToolkit_UpdateAssemblyReferences

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:

CRM_DeveloperToolkit_TargetFramework_4.5.1

If you are only getting old versions of the Target Framework, select “Install other frameworks…” that will take you to the next site:

http://blogs.msdn.com/b/dotnet/p/dotnet_sdks.aspx

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:

CRM_DeveloperToolkit_TargetFramework_4.5.2

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:

UnloadCRMPackageProject

Update the mentioned entry “TargetFrameworkVersion“:

EditCRMPackageProject

Finally, reload the project again and everything should work now!

ReloadCRMPackageProject

About this last part, I would like to say thanks to my CRM MVP colleague Scott Durow (@ScottDurow), 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=7.0.0.0, 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”

[Online Team Foundation Service] Icons are missed in the buttons

FIXED!

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.

Workarounds:

  • 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:

http://connect.microsoft.com/VisualStudio/feedback/details/800974/online-team-foundation-service-icons-are-missed-in-the-buttons