the application requires that assembly microsoft.reportviewer.processingObjectModel version 11.0.0.0 be installed in the global assembly cache first - .net-4.0

I have a small windows forms application created in Visual Studio 2012 that uses ReportViewer version 11.0.0.0.
The application target framework is .NET 4.0 and its deployment method is ClickOnce
On my PC it installs but on client machines, intallation fails with error
the application requires that assembly microsoft.reportviewer.processingObjectModel version 11.0.0.0 be installed in the global assembly cache first.
On the client machines, i have installed
.NET 4.0
ReportViewer 2010
Microsoft Report Viewer 2012 Runtime CTP
SQLSYSCLRTYPES.msi
in the project application files settings, i have set microsoft.reportviewer.processingObjectModel publish status to Include(Auto), in the references i have also set its Copy Local property to True.
what am i missing?
I have even followed the instructions here http://msdn.microsoft.com/en-us/library/ms251723.aspx

Here is (arguably) the best way to deal with this issue... without downloading or installing any extras. This worked with Visual Studio 2012 (Ultimate)
Goto the main project within your solution(default/statup project)
Right Click and Click Properties / Select "Your Project">> Project>> Properties
Click on "Publish" Tab to see publishing options
Goto "Install Mode and Settings">> Click "Application Files" and Dialog opens
Go down and look for the items set with "Publish Status" > Prerequisite
You will find ReportViewer and Several Other Files set to Prerequisite
Change all the Publish Statuses to "Include" in the drop down
I know you only need the ReportViewer Only but this will eliminate other potential problems I came across
Now all the required files will be added to your installation setup good to go!
For interest, you can change include a desktop icon under "Install Mode and Settings">>Options>Mainfests>Create Desktop Short Cut

you are missing the ProcessingObjectModel.dll file find the version 11.0.0.0 in gac assembly C:\windows\assembly\GAC_MSIL\Microsoft.ReportViewer.ProcessingObjectModel and add it to bin dir.

We had the same issue, but the thing is, its automatically adding it to the references (microsoft.reportviewer.processingObjectModel), if u EXCLUDE it from the publishing properties(properties->publish->application files), It might fix it.

A better option would be to install the Microsoft Report Viewer 2010 SP1 Redistributable Package at:
http://www.microsoft.com/en-us/download/details.aspx?id=6610
Your users will need to have this package installed as well. If you just copy and paste a MS DLL, you'll have to redeploy it every time you upgrade your application.

If you are using WinForms, to me it seems pointless to worry about installing this DLL in the GAC when it's being used for a report viewer that is deployed via click-once. This isn't a big file and you're probably using it as a report viewer control on a form, nothing more. One possible solution is to do the following:
In Visual Studio, go to the reference in your project for the assembly Microsoft.ReportViewer.ProcessingObjectModeland locate the file path to the folder for that assembly. Mine was version 12 and so my file path was C:\windows\assembly\GAC_MSIL\Microsoft.ReportViewer.ProcessingObjectModel\12.0.0.0__89845dcd8080cc91
Copy the file path of the folder the assembly is in and remove the reference from your project (right click the reference and select "Remove").
Win + R to get a 'Run' prompt. Paste that folder path in there and execute to jump right into the folder of that DLL.
Find the DLL, it should be the only file in that folder, and copy it to your Visual Studio project folder. You shouldn't care about 100kb of extra space on your drive consumed, and I don't think this DLL is one you'll need to update.
Back in Visual Studio, right click References, Add Reference, and browse for that DLL in your project folder. After adding the reference, make sure that the Copy Local property is set to true.
Clean and rebuild, test the application on your local computer, than Deploy your ClickOnce again.
Now when users install your application with ClickOnce, the reference will not refer to the GAC at all and there won't be any need to rely on the prerequisite check/installation process for this DLL because you have included it directly in your published application.

It depends on the setup type you are using but basically, it means the required library is missing from your server or computer. To enable the application to download from the server (In a client-server architecture), you need to include the file(s) in the project.
Go to your application option and locate the "Publish" tab
Click on "Application files"
In the ensuing dialog, select to include all the libraries you want included (or that are required to run your application on the client machine and click "Ok")
Build your application and then publish to the server.
I hope this works for you, it worked for me in Visual Studio 2010 Professional

In case of Windows 10 it won't work installing Microsoft Report Viewer 2010 SP1 as describe by user1236560. First you need to install Prerequisites for SQL Server Management Objects (SQLSysClrTypes.msi) need to choose between x86 and x64 depending on your hardware. You could find it on: http://origin.www.ms.akadns.net/downloads/en/details.aspx?FamilyID=16BC778C-357B-46E9-8356-D575903AC831
After that you need to install MICROSOFT® REPORT VIEWER 2012 RUNTIME that you could find on: https://www.microsoft.com/en-us/download/details.aspx?id=35747
Both of this package will have to be installed.

I encountered this error
System Update Required
Unable to install or run the application. The application requires that assembly
Microsoft.ReportViewer.ProcessingObjectModel Version 11.0.0.0 be installed in the Global Assembly Cache (GAC) first.
Please contact your system administrator.
this error popped out when installing an application made from Visual Studio
meaning I am one of the client
I have Visual Studio 2015 and a Microsoft SQL Server 2014 and didn't know about Crystal Reports and other related stuff to it. I do check the version of my .NET Framework which is version 4.6.2.
I have several extension files and distributable files downloaded and yet doesn't solve my problem.
I do not know if I solve the problem generally but I do become successful in installing the application
so I downloaded and installed the ff:
SAP Crystal Report for Visual Studio 2015(latest, just to make sure)
Microsoft System CLR Types for Microsoft SQL Server 2012
Microsoft Report Viewer 2012 Runtime.
the problem took me about 2 days to trouble shoot, Be careful on downloading and installing extension files and distributed files cause it will munch some space too.

The Best answer is:
Here is (arguably) the best way to deal with this issue... without downloading or installing any extras. This worked with Visual Studio 2012 (Ultimate)
Go to the main project within your solution(default/statup project)
Right Click and Click Properties / Select "Your Project">> Project>> Properties
Click on "Publish" Tab to see publishing options
Go to "Install Mode and Settings">> Click "Application Files" and Dialog opens
Go down and look for the items set with "Publish Status" > Prerequisite
You will find ReportViewer and Several Other Files set to Prerequisite
Change all the Publish Statuses to "Include" in the drop down.
I know you only need the ReportViewer Only but this will eliminate other potential problems I came across
Now all the required files will be added to your installation setup good to go!
For interest, you can change include a desktop icon under "Install Mode and Settings">>Options>Mainfests>Create Desktop Short Cut
It reduced all of my head aches.

Related

I cannot access the Excel interop from my VB program

I have had to replace my laptop. One of the applications I have needed to install is Visual Studio Community 2019 since I rely on some programs which I wrote in VB. My memory of the 2015 version is that I just installed it. With the 2019 version, I must specify which components I need. Given how many components are available, I can see why they cannot install everything. I need access the Excel interop and have downloaded every component that might give access to the interop without any apparent success. The statement Imports Excel = Microsoft.Office.Interop.Excel gives the error “{) Namespace Microsoft. Namespace or type specified in the Imports ‘Microsoft.Office.Interop.Excel’ does not contain any public member or cannot be found.”
Searching for help, I found: “to use the features of a Microsoft Office application from an Office project, you must use the primary interop assembly (PIA) for the application.” For my 64-bit computer, these should, apparently, be installed in “%ProgramFiles(x86)%\Microsoft Visual Studio\Shared\Visual Studio Tools for Office\PIA\”.
I find that folder “C:\Program Files (x86)\Microsoft Visual Studio\Shared\Visual Studio Tools for Office\PIA\” contains subfolders “Office14” and “Office15”. Each of these subfolders contains a different set of PIAs. Both contain “Microsoft.Office.Interop.Excel.dll” with the Office 14 version dated 31Mar2015 and the Office 15 version dated 7Oct2015.
I use Office version 15. Should I move the PIAs I want from folder “PIA\Office15” to folder “PIA” or have I misunderstood something else?
You can try to install the Nuget package Microsoft.Office.Interop.Excel form Nuget Package Manager.
First, right click the project and select Manage NuGet Packages....
Then type Microsoft.Office.Interop.Excel in the search bar and install it:
Kyle Wang’s answer allowed me to solve my problem. However, his images and descriptions differed from my experience with Visual Studio 2019. I suspect he uses an earlier version. This answer documents my experience with Visual Studio Community 2019 in the hope that other can benefit from my troubles.
With Visual Studio 2015, the version I have been using, only Visual Studio is installed. With Visual Studio 2019, Visual Studio Installer is also installed.
If I open Visual Studio Installer I see:
If I click Modify, I see:
If I scroll down a little I see:
The blue ticks in the righthand corner identify the workloads I have already installed.
If I click Individual Components, I see:
I am unsure which components were downloaded because they were included in a selected workload and which were downloaded because I selected every component that might include the Excel InterOp I was looking for. I will probably uninstall Visual Studio and re-install now I know what I need.
If I scroll down enough, I see:
I definitely needed to download NuGet package manager if I want access to the Excel InterOp. I do not know if I needed NuGet targets and build tasks. If I re-install Visual Studio I will try without NuGet targets and build tasks and update this answer to report if it is needed. I have not found any documentation describing the significance of these components, so it seems you need to experiment to determine what components you need.
Once you have selected the workloads and or individual components you want, click Modify in the bottom righthand corner. A progress screen is displayed while the installation is performed. When it has finished, close Visual Studio Installer.
Open Visual Studio 2019 and then create or open the solution that requires the Excel InterOp. The fourth tab in the top row is Project. Click it. The bottom but one line in the dropdown menu is Manage NuGet Packages…. Click it. You will see:
Click Browse to get:
https://www.nuget.org/ claims they hold 2,031,503 versions of 181,450 unique packages. As far as I can tell, they are displayed in order of download numbers. For example, Newtonsoft.Json has been downloaded 320.5 million times. To find any particular package you must use search. Searching for “microsoft.office.interop” reduces the list to something manageable with the Excel Interop at the top. Select the package you need and click Install on the right.

How can I include necessary libraries with VB.NET project?

I am reworking old VB6 apps into VB.NET with Visual Studio 2005 and when i tried to install them on Windows 10 I got following errors:
How can I include the missing libraries and carry them with the project?
Or can i somehow make a VB.NET installer with Visual Studio 2005 and it will take all dependencies with it?
It went well. I created new Setup project by using this tutorial vs 2005 setup project tutorial .
I added all the files that resided in the bin folder of my development project, plus I added adodb.dll by using the "Add Assembly" dialog window, right click on the setup project "Application Folder" node.
I also added msdatasrc.dll which is like backward compatibility library for MS Office for Windows XP. You can find download link here office xp support files
Once you these files, you can create shortucts which will open the main *.exe file when double clicked. Shortcuts for the desktop and for menu, can be added on the nodes User's Desktop and User's Menu

Shell Extension : Not showing in Windows Explorer context

I have Windows 7 Professional x64. I have Visual Studio 2010 Premium and Visual Studio 2012 Premium installed on my machine.
I installed TFS Power Tools Decemeber 2011. I restarted my computer after successful installation. I then checked out a folder from TFS 2010 but the TFS menu items in Windows Explorer context menu do not appear when i right click on the folder.
I even reinstalled it by uinstalling it, restarting the pc and installing it again then restarting it again but same issue.
I have followed the instructions outlined in here:
TFS Power Tools: Shell Extension : Context Menu Quirky and TFS Icons on Files/Folders missing
But same issue same issue occurs. Would anyone know what else i can do to get the TFS menu items to appear in the context menu please?
Thanks in advance,
I am not sure if this would help or you are willing to use a new version but I had the exact same environment and issue with you.
What I had done is that I uninstalled the old TFS Power Tools ( listed with a "Microsoft Team Foundation Server" prefix and/or "Microsoft Visual Studio Team Foundation Server" in Control-Panel/Programs-and-Features ) and install a newer version which is RTM. You can download them at http://www.microsoft.com/en-nz/download/details.aspx?id=35775 and install the following in the same order listed below
Team Foundation Server 2012 RTM Power Tools.msi
Visual Studio Team Foundation Server 2012 Update 1 Power Tools.msi
Visual Studio Team Foundation Server 2012 Update 2 Power Tools.msi
Close Visual Studio before you start then restart after installing, you should see your context menu afterwards together with the green arrow that indicates it is in TFS
Here is a screenshot of it
Also please take note that after installation this would not happen instantaneously as advised on this post: TFS Power Tools: Shell Extension : Context Menu Quirky and TFS Icons on Files/Folders missing
It sometimes takes a while for the TfsComProviderSvr.exe to check if
the local folder is a workspace and register the shell extension.
So this depends on many variables, your TFS server speed, your machine speed and your network speed. In my case I left it overnight to fully show everything.
Windows has a limit on home many overlay icons it can support. This started happening to me after i installed google drive, one drive, and dropbox and the TFSOverlay got pushed down to the bottom in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\explorer \ShellIconOverlayIdentifiers
You can fix it by either
Uninstalling some of the overlay apps. (Eg: remove Google drive
or Dropbox)
Rename the TFS folders in
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\explorer \ShellIconOverlayIdentifiers to start with numbers so they take priority (Eg: "1TfsOverlayAdd" , "2TfsOverlayEdit" etc.).
Also there is usually a delay for the green icons to appear in the folder explorer, so be patient.
I was having the same problem and just I executed this file:
C:\Program Files (x86)\Microsoft Team Foundation Server 2012 Power
Tools\TfsComProviderSvr.exe
After a few minutes the menu appeared.
This problem also occurs when you are running Visual Studio under different credentials (i.e. an account with Administrator privileges) than the logged on user. Logging on as that same user displays the ShellExtension correctly. But that's just not an option here...
I have not yet found a solution. It would be a nice feature to be able to set some options for TfsComProviderSvr.exe, so that one can let it watch workspace folders for a different 'Team Member' than the logged on user...
I've tried running Explorer.exe with other credentials, but that does not spawn a new TfsComProviderSvr.exe. Starting it by hand with the different credentials also does not seem to work. An instance of TfsComProviderSvr.exe is always (re)spawned for the currently logged on user.
Forgive me for sharing the obvious, but I had a similar issue, and in my case it appears that the default selected installed features were different than I expected.
I reran the installer using "Modify" instead of "Repair" and confirmed that the Windows Shell Extension feature was selected for installation:
I'm running a similar environment (VS 2010 Shell with VS 2013 Professional). Perhaps that impacts the defaults.
Here is the Power Tools Installer that I used.
I had a similar issue, I ripped off old the version, gave me some issues as you have to stop the TFS process and the explorer process but you can always restart explorer again once the old version has been uninstalled.
Then I restated my machine.
Installed latest version: http://visualstudiogallery.msdn.microsoft.com/b1ef7eb2-e084-4cb8-9bc7-06c3bad9148f ( version 11.0.60506.0 )
Restarted my pc again
Navigated to a source control folder and all TFS icons and shell extensions now started to appear.
Bottom line, the latest version worked for me, did not have to fiddle with reg'values at all.
Here's how I fixed mine. I had installed Visual Studio 2015 and installed TFS Power Tools for VS 2015. I also installed Visual Studio 2017. I generally use VS 2017 and had attached to TFS there. I hadn't attached VS 2015 to TFS and the power tools menu would not show up in explorer. I finally realized that when they say you have to have the same version of Visual Studio installed that you ALSO have to have that visual studio Team Explorer connected to TFS. You don't have to use it beyond that, but it must be connected using the dialog, like you see here.

My VSTO 3.0 Outlook addin doesn't load

I'm trying to diagnose why my Outlook plugin written in C#/VSTO 3.0/VS 2008 doesn't load after being installed.
The plugin works awesomely on my development machine, which has Visual Studio 2008 installed. I can't expect all my users to have all the prerequisites though so I went through these steps to write an installer:
http://msdn.microsoft.com/en-us/library/cc563937(loband).aspx
I installed the add-in on a fresh Windows XP SP 2 machine with a fresh install of Outlook 2007. It installs all the prereqs ok (.NET 3.5, VSTO 3.0 runtime, Windows Installer 3.1, 2007 PIAs). Outlook starts but the add-in isn't run. If I go to the Add-ins tab in the Trust Center, I see my add-in in the "Inactive Application Add-ins" section with the message "Not loaded. A runtime error occurred during the loading of the COM Add-in.".
Not sure how to find the specific error so I can fix it.
The reg keys look ok. Under HKEY_CURRENT_USER\Software\Microsoft\Office\Outlook\Addins\BlahAddin I see Description, FriendlyName, LoadBehavior (set to 3 until it fails after which if becomes set to 2), and Manifest.
Tried the VSTO_SUPPRESSDISPLAYALERTS environment variable trick and then launched Outlook from the command line but no output came out.
I have remote debugging more or less working but I'm not sure what to look for. I don't see my DLL loaded when I attach to Outlook, but then again maybe managed DLLs don't show up the same way in VS.
Any other ideas on next steps I could follow to produce a specific error I can diagnose?
Solved my problem after weeks of pain. The "Manifest" reg key was getting corrupted to some junk value during the setup build. It was a known Visual Studio bug that supposedly got fixed in Visual Studio 2008 SP 1, but apparently wasn't for me. Renaming the project name to be different from the plugin name fixed the problem. Random, huh?
Make sure you have try-catch handlers at the top level of all methods called by Outlook and log any exceptions you are unable to handle in some way. Focus your troubleshooting on methods like the Startup method and other methods called during initialization.
You probably want to debug this using the remote debugger. Share out the MSVCMON.EXE folder from your developer machine (in your Visual Studio folders in Program Files) on your test machine (share it with a UNC path), and launch Outlook under the debugger trapping (.NET) exceptions in your modules and putting breakpoints in your methods.
If you need to clean your test computer each time before you install your solution, you should probably run XP under a Virtual PC 2007 VM (free download) and switch to a differencing HD after setting up everything but your plugin to snapshot your pre-installed state once so you don't have to keep uninstalling/reinstalling as you make changes to your program to fix bugs.
Are you installing Debug builds or Release builds? Perhaps one flavor has different requirements. Just guessing.
-Mike [MSFT Office Dev]
On your machine, when you run the addin from Visual Studio, it should create a registry key in HKEY_CURRENT_USER\Software\Microsoft\VSTO\Security\Inclusion{SomeGuid}. Make sure that these registry settings are also being deployed with your addin. They are the ones that allow your code to be trusted.

Deploy VSTO application in visual studio windows application

I have created a VSTO application using office 2005 & visual studio 2005 professional.I found there a setup folder.While i am running the *.exe file in client machine,it giving me error."An add-in could not be found or could not be loaded."
What is the architecture of the client machine?
If Vista: do you have the UAC (Security Dialog) disabled?
Also check in the Registry if the Path to the Manifest File is correct.
Is it loading the right Framework Version?
Are you using the Publish feature, or are you trying to create your own MSI?
You need to do some debugging on your side to have this sorted maybe:
Try to uninstall VSTO SE completely and install it again.
Create a new VSTO add-in without any additional code and run it.
Evaluate what happens and perform actions accordingly