How to add reference to Microsoft.CSharp in a Visual Studio Professional 2010? - vb.net

I have inherited a Visual Studio (VB) project. (I am new to Visual Studio, Net Framework and VB). I need to add Credit Card payment processing using BeanStream. As per the instructions provided on http://developer.beanstream.com/, I tried to install Beanstream package using NuGet Package Manager Console.
PM> Install-Package Beanstream
It installed the package successfully but then rolled back and displayed an error message:
Install-Package: Failed to add refernece to 'Microsoft.CSharp'. Please make sure that it is in the Global Assembly Cache.
I understand that Micsosoft.CSharp is either not installed on my Windows PC or is not accessible to Visual Studio. I did not find 'Microsoft.CSharp' in the Add Reference dialog box.
Could someone please advise how to fix this issue?

Related

Could not load file or asssembly 'Microsoft.identity.client'

I want to install Github Copilot extension in Visual studio 2022. when i install it, i close all vs 2022 as instructed then i am supposed to receive a message saying that it was done.
However i keep getting an error from VSIX Installer saying:
Could not load file or asssembly 'Microsoft.identity.client, version=4.30.0.0,culture=neutral,PublickeyToken=0a613f4dd989eBae' or one of its dependencies. the located assembly's manifest definition does not match the asssembly reference.(Exception from HRESULT: 0x801311040).
I get the same message when i try to update any extensions i have in visual studio 2022
PS: I already installed Copilot in VsCode and it working perfectly.
Thank you!
It FINALLY worked. The error happened because I didn't have app installer and Microsoft store so I had to reset my windows 10 then the problem was solved.
Try logging in from a clean state:
Close Visual Studio 2022.
Delete C:\Users\AppData\Local\github-copilot\hosts.json
Log out of GitHub in the web browser.
Open Visual Studio.

It can be use in Visual Studio 2019?

I was wondering if EPPLus can be use in Visual Studio 2019. I was looking into others Nugets but this is the most relevant for what I need. I saw in the Nuget Gallery (https://www.nuget.org/packages/EPPlus/) that it is usefull in Visual Studio 2017.
EPPLus is a nuget package, it is not linked to Visual studio version but on your code target. So you can use it in VS 2019.
I'm using it in my current project in .NET Core API
I can see the OP accepted the previous answer but here is a more detailed answer just in case anybody needs it in the future.
From Package Manager Console in an open project
Install-Package EPPlus
If you do not know where to access Package Manager Console from
Navigate to Tools / Nuget Package Manager / Package Manager Console
Then run the above command
or
Right click dependencies in the project and select Manage Nuget Packages
in the browse tab enter EPPlus

Visual Studio 2017 can't load solutions The "Package" package did not load correctly

I recently used the repair function in my Visual Studio Installer that I thought could fix the error message: Microsoft data transformation services designer package did not load correctly. However it turns out there is a new error message when I wanted to load my previous project: The "Package" package did not load correctly.
If I continue the loading, I will receive some other warning message in the solution Explorer saying my project is "incompatible" and "the application is not installed":
I initially also tried to follow some online solution and tried to repair Microsoft SQL Server Data Tools in control panel. It doesn't allow me to repair and says Setup Failed almost immediately after I click on the repair button.
Initially I was trying to add an WCF extenion in Visual Studio but seemed failed and threw the first error message to me. Then when I try to repair, the first error message is gone and I was given the second error message. Now I stuck in there.
I have also checked if SSDT is included in the installer and New project types:
It seems the SSDT is selected in the Visual Studio Installer and all my current project types are listed in the screenshot as well (previously I was able to see Integration services as well but now after the repair I can't).
I'm using Visual Studio Enterprise 2017 on a test server that a few people have access to (I've also tried to restart the Visual Studio and the server but it didn't help).
Hope I can get some suggestions here, really appreciated.

Adding ColinsALMCorner.CustomBuildTasks.dll to Toolbox causes 'could not load file or assembly' error

I am adding this custom build task to my TFS 2010 build workflow, however when attempting to add it (ColinsALMCorner.CustomBuildTasks.dll) to the toolbox, I get error:
'Could not load file or assembly file 'ColinsALMCorner.CustomBuildTasks.dll' or one of its dependencies. Operation is not supported'.
I have added all of its dependencies to (I admit, this is probably redundant):
1) the same location where the ColinsALMCorner.CustomBuildTasks.dll resides, which is ..\BuildProcessTemplates\CustomActivities
2) in the Public Assemblies folder: Microsoft Visual Studio 10.0\Common7\IDE\PublicAssemblies
And I have the build definition xaml file correctly importing the ColinsALMCorner.CustomBuildTasks namespace
Although the activity is set to target .Net 4.5, the documentation says that TFS 2010 / .Net 4.0 is supported, so I assume this should all be possible.
My Questions:
Is this possible with TFS 2010 / .Net 4.0 development environment? My concern is that the error message isn't telling the real story, for example maybe it is able to find it, however just not the right version of the assembly.
Is it likely that since the DLL targets .Net 4.5 I need to have all of its referenced dll's also be the 4.5 version? For example, it references Microsoft.TeamFoundation.VersionControl.Client however I only have the version 10.0.0.0 (which I assume the .Net 4.5 version of this might be 11.0.0.0)
Here was the solution, in short story format: I installed Visual Studio 2012. Result: I was able to add ColinsALMCorner.CustomBuildTasks to my workflow in Visual Studio 2010 without error. I assume this means there was a 2012 (v11.0.0.0) DLL or two required to use the activity in 2010, despite the fact that the requirements state:
Team Foundation Build 2010, 2012 or 2013

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

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.