Add Reporting.WinForms Reference to VS2015 - c#

I'm looking at adding the reference;
Microsoft.Reporting.WinForms
to my VisualStudio (2015) project but when I go to Add the Reference in the Solution Explorer I couldn't find it.
Eventually I added it through NuGet but now I am getting the error message;
Could not load file or assembly 'Microsoft.ReportViewer.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
which leads me to believe I just haven't added the package properly. I've installed Microsoft SQL Server Data Tools through program features but still no luck.
What am I missing?

You can try by executing this into Package Manager Console
Install-Package Microsoft.Reporting.WinForms.v11

Related

FileNotFound Error while creating SSIS package programmatically using C#

I am trying to write an SSIS package programmatically using C#.
I have installed SQL Server Integration Services Projects v16 and added all the references like Microsoft.SqlServer.ManagedDTS and using Microsoft.Dts.Runtime.
However, at runtime, I am getting an error:
System.IO.FileNotFoundException: 'Could not load file or assembly 'Microsoft.SqlServer.DTSRuntimeWrap, Version=13.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified.'
I tried to manually add the DLL "Microsoft.SqlServer.DTSRuntimeWrap" from "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\SSIS\160\Binn" but it throws the same error.
My Microsoft SQL Server Integration Services Projects is version 16.0.5035.3 and hence, I added the reference from the \160\Binn.
However, it seems that the code is asking for another version (Version=13.0.0.0).
Can someone please tell me what's going wrong?
Much appreciated!

System.Data.SqlXml Version 2 not installed on system

One of our build agent servers does not have System.Data.SqlXml Version=2.0.0.0 under C:\Windows\assembly but every other machine we have does. Unfortunately this causes nunit-summary.exe on that box to fail with:
EXEC Could not load file or assembly 'System.Data.SqlXml,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or
one of its dependencies. The system cannot find the file specified.
error MSB3073: The command ""../tools/nunit-summary.exe" artifacts/Test_*.xml" exited with code -1.
I tried installing MSXML 4 to no avail. I have not been able to figure out how to install version 2, any ideas?
Two possible solutions.
a) In the project, expand references to find the reference to the library. Go to properies and set Copy Local to be True. The .dll will then be included in the bin folder when the project is built.
b) Install SQLXML from Microsoft (this is different to MSXML which you tried). Details about the library (including the download link) are available at https://learn.microsoft.com/en-us/sql/relational-databases/sqlxml/what-s-new-in-sqlxml-4-0-sp1

Upgrading WP8 to Silverlight WP8.1, assembly issue

I have updated my project to Silverlight WP8.1, and updated the different nuget packages. Rebuild, restart, clean and rebuild :)
But I keep getting an error with one assembly for one of my dll's.
Error 24 Assembly 'MainGame, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' uses 'GalaSoft.MvvmLight, Version=5.1.1.35049, Culture=neutral, PublicKeyToken=e7570ab207bcb616' which has a higher version than referenced assembly 'GalaSoft.MvvmLight, Version=5.0.2.32240, Culture=neutral, PublicKeyToken=e7570ab207bcb616' c:\Users\johann\Desktop\StoneGaard\MainGame\Bin\ARM\Debug\MainGame.dll MVVMTestApp
I have reinstalled and removed and reinstalled the MVVMLight Package. I am sure that the references are new 5.1.1.x when looking in the references overview:
Finally I have tried deleting the Maingame.dll and restarting yet again and rebuilding with the same error.
Can anyone help with solving the error?
I think you are referencing the wrong libraries. (Maybe you pick the WP8.1 RT version?) Try using Nuget package installer, so it automatically choose the right ones for your project.
Open Tools > Nuget package manager > Package manager console and use this command:
Install-Package MvvmLight
Nuget lib page: https://www.nuget.org/packages/MvvmLight/

Entity Framework throws an error in my .net namespace

Error:
The type 'System.Data.Entity.DbContext' is defined in an assembly that is not referenced. You must add a reference to assembly 'EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
As you can see my Entity Framework is complaining at the reference, tried to solve it but got nowhere. Has someone experienced this problem before? I'm basically trying to do this:
http://www.asp.net/web-api/overview/getting-started-with-aspnet-web-api/tutorial-your-first-web-api
Go to your solution and follow this steps(provided that you use a downloaded zip from the page you specified):
Right click on sln node and Enable Nuget package restore, then rebuild you sln.
If not already installed try open the Manage Nuget Package and check EF is installed.
Would not recommend loading dll by hand, but you can try adding it.

Could not load file or assembly 'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies

I have this exception generated on some user machines (~1 of 20):
Could not load file or assembly 'System, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its
dependencies. The system cannot find the file specified.
I found several references to this error over the web and this site but nothing helped.
I have an add-in application which uses WCF to connect to the server. The add-in built with .NET Framework 3.5 with VS 2008.
The error is reproducible on one of the test machines in only one user account. I install my application and can only reproduce this from one account on this machine everywhere else it is working fine. Furthermore it is only reproducible with only one version of host application which I created add-in for (I assume because it uses differnet .NET Frameworks).
I have checked the fuse logs and I see the following:
Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorwks.dll
Running under executable C:\Program Files\SolidWorks Corp\SolidWorks\sldworks.exe
--- A detailed error log follows.
=== Pre-bind state information ===
LOG: User = Home\User
LOG: DisplayName = System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
(Fully-specified)
LOG: Appbase = file:///C:/Program Files/SolidWorks Corp/SolidWorks/
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = NULL
Calling assembly : System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a.
So by some reasons it is trying to use v2.0.50727\mscorwks.dll loader to load the Version=4.0.0.0 of System.dll. On build machine I'm referring 2.0.0.0 version of System.dll.
I had this same problem - some users could pull from git and everything ran fine. Some would pull and get a very similar exception:
Could not load file or assembly '..., Version=..., Culture=neutral, PublicKeyToken=...' or one of its dependencies. The system cannot find the file specified.
In my particular case it was AjaxMin, so the actual error looked like this but the details don't matter:
Could not load file or assembly 'AjaxMin, Version=4.95.4924.12383, Culture=neutral, PublicKeyToken=21ef50ce11b5d80f' or one of its dependencies. The system cannot find the file specified.
It turned out to be a result of the following actions on a Solution:
NuGet Package Restore was turned on for the Solution.
A Project was added, and a Nuget package was installed into it (AjaxMin in this case).
The Project was moved to different folder in the Solution.
The Nuget package was updated to a newer version.
And slowly but surely this bug started showing up for some users.
The reason was the Solution-level packages/respositories.config kept the old Project reference, and now had a new, second entry for the moved Project. In other words it had this before the reorg:
<repository path="..\Old\packages.config" />
And this after the reorg:
<repository path="..\Old\packages.config" />
<repository path="..\New\packages.config" />
So the first line now refers to a Project that, while on disk, is no longer part of my Solution.
With Nuget Package Restore on, both packages.config files were being read, which each pointed to their own list of Nuget packages and package versions. Until a Nuget package was updated to a newer version however, there weren't any conflicts.
Once a Nuget package was updated, however, only active Projects had their repositories listings updated. NuGet Package Restore chose to download just one version of the library - the first one it encountered in repositories.config, which was the older one. The compiler and IDE proceeded as though it chose the newer one. The result was a run-time exception saying the DLL was missing.
The answer obviously is to delete any lines from this file that referenced Projects that aren't in your Solution.
I got this after downgrading a project from .net 4.5 to .net 3.5.
To resolve I had to go in to the project - properties - settings window and delete all my settings, save the project, exit and restart visual studio, go back into project - properties -settings window and re-enter all my settings and their default values
This worked for me.
Go to Project->Propertied->Target Frawork->Change frame work like 3.5 to 4.0
I had the problem under Linux and I needed to install those. I don't know which one actually fixed the problem, but that error was gone after that:
apt-get install mono-utils mono-runtime-sgen mono-runtime-common \
mono-runtime-boehm mono-runtime-dbg mono-xbuild
I've seen this a couple times, and it is usually fixed by running a repair on .NET Framework (whichever version the application is trying to use).
You are using .net 4? - Maybe on the clients there is only the ".net framework 4 client profile" installed. Try to install full package!!
Download here
In my case, I was able to find issue with ScriptManager by setting Debug=true in web.config file
I answered too late but it has worked in my case.If you are facing this issue in your project please add the following line in your web.config :
<compilation batch="false" >
This worked in my case. If you already have compilation tag in your web.config then add only batch="false" property to it.
You can enable NuGet packages and update you dlls. so that it work.
or you can update the package manually by going through the package manager in your vs if u know which version you require for your solution.
Even I have experience some more strange things, I can see there is no dll in GAC from where the dll is loading but windows > Module shows system.dll version=4.0.0.0 loaded
i just changed my target .net framework and it worked .in my case i changed from .net 4.7 to .net 4.
Right click your solution and select properties
selct properties
Click Application >> Target Framework
FileNotFoundException: Could not load file or assembly 'System.Configuration.ConfigurationManager, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified.
this is my problem. I installed system.configuration assembly in the project and other class libraries also. now the problem has gone.
am used net 6.0 with aspcore.report and problem like this happened with me
I installed system.configuration assembly in the server project problem solved

Categories