Visual Studio – Build – Warning – “The referenced component ‘Microsoft.Web.Infrastructure’ could not be found.”

Background

Downloaded a new Application.  One that I will have to build myself.

Launched Visual Studio and issued Build Command via menu.

Error

Ran into build errors.

The first one reads:

The referenced component ‘Microsoft.Web.Infrastructure’ could not be found.

Remediation

Have a lot of work to do this Saturday morning.

And, so let us address.

Package Manager Console

Running Visual Studio 2017 Community Edition, and the steps to access the Package Manager Console are:

  1. Navigate to the top menu
  2.  Menu Item
    • Tools
    • NuGet Package Manger
    • Package Manager Console

 

Install-Package

Code


Install-Package Microsoft.Web.Infrastructure

 

 

Output

Image

Textual
Attempting to gather dependency information for package 'Microsoft.Web.Infrastructure.1.0.0' with respect to project '[ProjectA]', targeting '.NETFramework,Version=v4.5.1'
Gathering dependency information took 120.25 ms
Attempting to resolve dependencies for package 'Microsoft.Web.Infrastructure.1.0.0' with DependencyBehavior 'Lowest'
Resolving dependency information took 0 ms
Resolving actions to install package 'Microsoft.Web.Infrastructure.1.0.0'
Resolved actions to install package 'Microsoft.Web.Infrastructure.1.0.0'
Retrieving package 'Microsoft.Web.Infrastructure 1.0.0' from 'nuget.org'.
Adding package 'Microsoft.Web.Infrastructure.1.0.0' to folder '<app>\\packages'
Added package 'Microsoft.Web.Infrastructure.1.0.0' to folder '<app>\\packages'
Added package 'Microsoft.Web.Infrastructure.1.0.0' to 'packages.config'
Successfully installed 'Microsoft.Web.Infrastructure 1.0.0' to <ProjectA>
Executing nuget actions took 5.42 sec
Time Elapsed: 00:00:07.5704133
PM> 

Credit

Crediting Joshua Davis per “FileNotFoundException: Could not load file or assembly ‘Microsoft.Web.Infrastructure“.  Here is the Link.

Joshua Davis’s about page is worthy of good, congratulatory read.  Here is the link to that page.

 

References

  1. NuGet.Org
    • Microsoft.Web.Infrastructure 1.0.0
      • This package contains the Microsoft.Web.Infrastructure assembly that lets you dynamically register HTTP modules at run time.
        Link
  2. fsprojects/Paket
    • Problem referencing Microsoft.Web.Infrastructure #1393
      Link

Visual Studio – Error – “Unable to find manifest signing certificate in the certificate store”

Background

Downloaded Source Code of an Application that I will be using, but unable to successfully compile it.

Error

Error Message

Error
Unable to find manifest signing certificate in the certificate store
Unable to find code signing certificate in the current user’s Windows certificate store.

Error Image

TroubleShooting

pfx file Missing

Solution Explorer

DiagManager

Image

Explanation
File Diagnosis
DiagManager_TemporaryKey.pfx DiagManager_TemporaryKey.pfx file is missing

 

Remediation

Project \ Signing

Uncheck “Sign the ClickOnce manifests

Summary

ClickOnce requires code signing.

As Microsoft is availing the Source code, they have opted not to include their PFX file.

References

  1. StackOverflow.com
    • Why am I getting “Unable to find manifest signing certificate in the certificate store” in my Excel Addin?
      Link

Visual Studio Community 2017 – Upgrading

Background

The lead developer on one of our projects experienced problems deploying a report yesterday evening.

It is time to see if we can duplicate and thus research the error.

 

SQL Server Data Tools

SQL Server Data Tools – v2015

Downloaded SQL Server Data Tools (SSDT) v2015 from here.

Was able to successfully install and deploy the report.

 

SQL Server Data Tools – v2017

Download

From same link, downloaded SSDT v2017.

Install

Prerequisite

Visual Studio 2017

Blocking Issue
Textual

The current installation requires Visual Studio 2017 version number 15.3.0 or higher.  Please upgrade your Visual Studio instance before continuing the setup.

Image

 

Validate v2017

Launched our installed v2017 and validated the Version # is 15.2 (26430.15 )

Image

Textual

Microsoft Visual Studio Community 2017
Version 15.2 (26430.15) Release
VisualStudio.15.Release/15.2.0+26430.15
Microsoft .NET Framework
Version 4.7.02053

Review Visual Studio 2017 Packages

Let us quickly review Visual Studio ( VS) 2017 Release History

Image

Explanation
  1. v15.2
    • We have v15.2, released on May 10th, 2017
  2. v15.3
    • We need at least 15.3, released on August 14th, 2017
  3. v15.4.3
    • The latest as of today, 2017-Nov-9th, is v15.4.3
Download Visual Studio 2017 – Bootstrapper

We will to “Install Visual Studio 2017 on low bandwidth or unreliable network environments” ( here  )and reach for the Bootstrapper community edition.

The direct link to Community edition is here.

 

Create an offline installer

Let us create an offline installer


set "_target=C:\VS2017offline"
set "_desktop=Microsoft.VisualStudio.Workload.ManagedDesktop"
set "_netWeb=Microsoft.VisualStudio.Workload.NetWeb"
set "_github=Component.GitHub.VisualStudio"

vs_community.exe --layout %_target% --add %_desktop% --add %_netWeb%  --add %_github% --includeOptional --lang en-US

 

Build offline installer

Run the batch file created earlier to build the offline installer.

Image – Invoke batch file

Image – download…

Image – Successful
Patch Visual Studio 2017

Let us patch our installed v2017

Run the setup.exe availed through the offline installer.

Image – 1

Update available

Visual Studio 2017 is already installed.

Click update to update to version 15.4.3

 

Image – 2

Image – 3

 

Image – 4

 

Image – 5

 

Validate Visual Studio 2017 Version

Launch Visual and validated that v2017 is installed.

 

Install

Steps

Let us go back and try to install SQL Server Data Tools – Release 15.4.0 Preview

Install Tools to this Visual Studio 2017 instance

 

References

  1. Microsoft
    • Docs / SQL / SSDT ( SQL Server Data Tools )
      • Download SQL Server Data Tools ( SSDT )
        Link
    • Docs / Visual Studio / Documentation / Installation
      • Install Visual Studio 2017 on low bandwidth or unreliable network environments
        Link
      • Create an offline installation of Visual Studio 2017
        Link
    • VisualStudio.com
      • Visual Studio 2017 version 15.4 Release Notes
        Link

SQL Server Mini Dump Files – Day 01

Background

Received an alert indicating that one of our database jobs is lagging.

TroubleShooting

Adam Machanic

sp_whoisActive

Ran Adam Machanic’s sp_whoIsActive ..

And, noticed that a couple of Restore Transaction Log sessions have been running for 6 to 7 hours.

SQL Server – Error Log Folder

Reviewed the errorlog folder and noticed a couple of mdmp files.

 

Secure mdmp files

Secured the mdmp files and copied them locally to my machine.

Visual Studio

Visual Studio Community Edition 2017

About

Have a copy of the free community edition of SQL Server 2017.

Launched it.

Access mdmp files

Using menu item File \ File Open accessed the “Open File” window.

For file types chose “Dump files ( dmp, mdmp )

Dump – SQLDump0065.mdmp

Image

Explanation
  1. Process Information :- E:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\Binn\sqlservr.exe
    • MSSQL12.MSSQLSERVER
      • Version :- MS SQL Server v2014
  2. Process Architecture :- x64
  3. Exception Code :- 0xC0000005
  4. Exception Information :- The thread tried to read or write to a virtual address for which it does not have the appropriate access.

 

Dump – SQLDump0066.mdmp

Image

Explanation
  1. Process Information :- E:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\Binn\sqlservr.exe
    • MSSQL12.MSSQLSERVER
      • Version :- MS SQL Server v2014
  2. Process Architecture :- x64
  3. Exception Code :- 0x000042AC
  4. Exception Information :- {blank}

 

Summary

Quick Points here:

  1. Alerts & Notifications
    • Have alerts and notifications on jobs
    • Have them set up to email a distribution list or yourself
    • Need and have a smart phone
  2. TroubleShoot
    • Prepare and have diagnostic checklist & steps
    • Review Error Logs
    • Dump Files?
      • If dump files are being generated, analyze them

 

Reference

  1. Microsoft
    • Windows Development Center
      • DirectX Graphics and Gaming > Classic DirectX Graphics > Technical Articles
        • Crash Dump Analysis
          Link
    • SQL Server Customer Advisory Team
      • Thomas Kejser
        • Looking deeper into SQL Server using Minidumps
          Link

UML & Visual Studio

Background

My brother has a couple of Applications that he wanted to generate UML Models for.

And, so went online and downloaded both the Community ( Actual ) and Enterprise Edition ( Trial ).

 

Download

The latest version v2017, is available here.

Installed

Installed both versions.

And, was surprised that access to UML is no longer available under the Architecture menu.

Missed Functionality

UML to be ejected from Microsoft Visual Studio
Link

Not Supported post Visual Studio 2015 …

Stay with Visual Studio 2015

 

References

  1. Infoworld
    • Paul Krill
      • UML to be ejected from Microsoft Visual Studio
        Link
  2. Microsoft Developer Community
    • UML use case diagram in vs2017 RC Enterprise Edition
      Link
  3. Microsoft Developer Network
    • Create UML Class Diagrams from Code
      Link

Visual Studio 2010 – Upgrade from RTM to SP1

Background

Just as yourself, got a lot to do, but occasionally get pulled back in.

 

SQL Server 2008-R2 Upgrade

My manager has signed us up to upgrade all SQL Servers to the most recent version, 2016. Or at minimum the version that precedes the latest; btw, that is 2014.

The SQL Instance that I am looking at currently is v2008-R2 and the OS is 2008/R2.

That latest SQL Server supported on Windows 2008-R2 is SQL Server 2014.

 

Upgrade 2008-R2 to 2014

Trying to upgrade v2008-R2 to v2014, but ran into a constraint right away.

Features Rules

Textual

This computer has an installation of Visual Studio 2010 that requires a Service Pack 1 update that is needed for a successful installation of SQL Server based on your feature selection.

To continue, install the required Visual Studio 2010 Service Pack 1 from SQL Server media or from http://go.microsoft.com/fwlink/?LinkID=220649.

Image

Download Visual Studio 2010 SP1

Tried a drive by visiting https://www.microsoft.com/en-us/download/details.aspx?id=23691.

Redirected to https://www.microsoft.com/en-us/download/details.aspx?id=23691.

Download Visual Studio 2010 SP1 – Download 23691

Textual

We are sorry, this download is no longer available.

Image

 

Download Links

Source Link Works
go.microsoft.com/fwlink/?LinkID=220649 Link No
http://www.microsoft.com/en-us/download/details.aspx?id=23691 Link No
download.microsoft.com/download/E/B/A/EBA0A152-F426-47E6-9E3F-EFB686E3CA20/VS2010SP1dvd1.iso  Link  No
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=75568aa6-8107-475d-948a-ef22627e57a5&displaylang=en Link  No
 my.visualstudio.com/Downloads?q=visual%20studio%202010%20service%20pack%201  ( All ) Link  Yes
my.visualstudio.com/Downloads?pid=2300 ( Visual Studio 2010 Service Pack 1 ) Link  Yes

 

Downloaded

Please download the online installer availed here.

BTW the link noted above is from my.visualstudio.com web site.

And, you need a registered user.

If you have yet to register for my.visualstudio.com, please do so.

It is a free.

 

Downloaded Results

Here are results that matches “Visual Studio Service Pack 1

Downloaded

Visual Studio 2010 Service Pack 1 – Details

File Specification

The file’s name is mu_visual_studio_2010_sp1_web_installer_x86_651694.exe.

It is a relatively small file, 795 KB.

It is an online installer and it is a bootstrap as it simply connects to the website and downloads the actual install media.

 

Install Visual Studio 2010 – SP1

Screen Shot

Welcome

Microsoft Visual Studio 2010 Service Pack 1 Setup

Installation Progress

Installation Is Complete

Microsoft -LightSwitch – Error – “Request Failed with Status Code ‘500’ and Status Text ‘Internal Status Error.'”

Background

From within Visual Studio, launched an application that I am developing using LightSwitch and received one of those hard to decipher error.

Error Message

Image

requestfailedwithstatuscode500

Text

Request failed with status code ‘500’ and status text ‘Internal Server Error’.

TroubleShooting

As I know so little about LightSwitch, I get petrified anytime I see an error.

Event Viewer

Took to the system’s event viewer and found the obvious problem.

Sender Information: System.ServiceModel.Activation.HostedHttpRequestAsyncResult – System.ServiceModel.ServiceActivationException

Image

taskcategory_webhost_2017021_0445pm-cropped-up

Textual

WebHost failed to process a request.
Sender Information: System.ServiceModel.Activation.HostedHttpRequestAsyncResult/35567111
Exception: System.ServiceModel.ServiceActivationException: The service ‘/DBDiagData.svc’ cannot be activated due to an exception during compilation. The exception message is: Memory gates checking failed because the free memory (196927488 bytes) is less than 5% of total memory. As a result, the service will not be available for incoming requests. To resolve this, either reduce the load on the machine or adjust the value of minFreeMemoryPercentageToActivateService on the serviceHostingEnvironment config element.. —> System.InsufficientMemoryException: Memory gates checking failed because the free memory (196927488 bytes) is less than 5% of total memory. As a result, the service will not be available for incoming requests. To resolve this, either reduce the load on the machine or adjust the value of minFreeMemoryPercentageToActivateService on the serviceHostingEnvironment config element.
at System.ServiceModel.Activation.ServiceMemoryGates.Check(Int32 minFreeMemoryPercentage, Boolean throwOnLowMemory, UInt64& availableMemoryBytes)
at System.ServiceModel.ServiceHostingEnvironment.HostingManager.CheckMemoryCloseIdleServices(EventTraceActivity eventTraceActivity)
at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath, EventTraceActivity eventTraceActivity)
— End of inner exception stack trace —
at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result)
at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result)
Process Name: iisexpress
Process ID: 2756

Tabulate

Product Version File Version
 Log Name Application
 Source System.ServiceModel 4.0.0.0
 Event ID  3
 Task Category  WebHost
 Level  Error
 Process Name  iisexpress

 

 

ASP.NET 4.0.30319.0 –  InsufficientMemoryException

Image

taskcategory_aspnet_2017021_0616pm-croppedup

Textual

Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 2/21/2017 4:15:03 PM
Event time (UTC): 2/22/2017 12:15:03 AM
Event ID: a9e5abe2978940499d84b3ed7b2bc5a1
Event sequence: 34
Event occurrence: 1
Event detail code: 0

Application information:
Application domain: /LM/W3SVC/2/ROOT-1-131321960967478001
Trust level: Full
Application Virtual Path: /
Application Path: C:\EDiag\bin\Debug\
Machine name: DADENIJI

Process information:
Process ID: 2756
Process name: iisexpress.exe
Account name: dadeniji

Exception information:
Exception type: InsufficientMemoryException
Exception message: Memory gates checking failed because the free memory (179412992 bytes) is less than 5% of total memory. As a result, the service will not be available for incoming requests. To resolve this, either reduce the load on the machine or adjust the value of minFreeMemoryPercentageToActivateService on the serviceHostingEnvironment config element.
at System.ServiceModel.Activation.ServiceMemoryGates.Check(Int32 minFreeMemoryPercentage, Boolean throwOnLowMemory, UInt64& availableMemoryBytes)
at System.ServiceModel.ServiceHostingEnvironment.HostingManager.CheckMemoryCloseIdleServices(EventTraceActivity eventTraceActivity)
at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath, EventTraceActivity eventTraceActivity)

Request information:
Request URL: http://localhost:62496/Services/Microsoft-LightSwitch-Security-ServerGenerated-Implementation-AuthenticationService.svc/binary/GetAuthenticationInfo
Request path: /Services/Microsoft-LightSwitch-Security-ServerGenerated-Implementation-AuthenticationService.svc/binary/GetAuthenticationInfo
User host address: 127.0.0.1
User: dadeniji
Is authenticated: True
Authentication Type: Negotiate
Thread account name: dadeniji

Thread information:
Thread ID: 11
Thread account name: dadeniji
Is impersonating: False
Stack trace: at System.ServiceModel.Activation.ServiceMemoryGates.Check(Int32 minFreeMemoryPercentage, Boolean throwOnLowMemory, UInt64& availableMemoryBytes)
at System.ServiceModel.ServiceHostingEnvironment.HostingManager.CheckMemoryCloseIdleServices(EventTraceActivity eventTraceActivity)
at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath, EventTraceActivity eventTraceActivity)

 

Tabulate

Product Version File Version
 Log Name Application
 Source ASP.NET 4.0.30319.0
 Event ID  1309
 Task Category  Web Event
 Level  Warning
 Process Name  iisexpress.exe

 

 

Remediation

Using Microsoft’s Task Manager close some of the Applications and Processes that are sagging memory.

Our target is to get more than 5% memory available.