Well I have a problem, we upgraded the .net framework from version 4.0 to version 4.6 of .net, I have about 9 projects running and I had to install masstransit and autofac in 2 projects, this caused some libraries to be updated or installed in other projects.
At the moment in one of the projects(Team.Services) I have installed the 4.5.2 version of the library System.Threading.Tasks.Extensions, before of this I had the version 4.2.0.0, but now I update this. The image below you can see that it is version 4.5.2.
Now when I see the references of the project I can see that I do not have the correct version referenced, it is as if another dll was installed
look for the solution(link below) in other places, also try to change the version in the app.config check the version in the package.config clear the nuget cache and reinstall everything. and it is not working, it keeps looking for the old dll and for this reason it doesn't find the new dll, besides the installations seem to be a different version.
DLL hell - Could not load file or assembly System.Threading.Tasks.Extensions
This is the error:
System.IO.FileNotFoundException
HResult=0x80070002
Message=Could not load file or assembly 'System.Threading.Tasks.Extensions, Version=4.2.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified.
Source=Team.Services
StackTrace:
at Team.Services.ServiceFactory.StartServices(String applicationDirectory) in C:\Users\amilkar.contreras\source\repos\TFS.TeamServices\Common\Team.Services\ServiceFactory.vb:line 110
at Team.ServiceHost.Service.OnStart(String[] args) in C:\Users\amilkar.contreras\source\repos\TFS.TeamServices\Hosts\TeamServiceHost\Service.vb:line 25
at Team.ServiceHost.Service.Start(String[] args) in C:\Users\amilkar.contreras\source\repos\TFS.TeamServices\Hosts\TeamServiceHost\Service.vb:line 34
at Team.ServiceHost.Program.Main(String[] args) in C:\Users\amilkar.contreras\source\repos\TFS.TeamServices\Hosts\TeamServiceHost\Program.vb:line 41
You can have a try the possible solution to solve it:
Confirm the Package Management is Package.config in visual studio, then reinstall this package again
delete .vs folder then restart visual studio
Remove this dll manually, then add the new dll as reference manually
Related
I added HtmlAgilityPack dll(1.8.5 version) as reference in my SSDT VS 2010 solution.
But i got error message like
Could not load file or assembly 'HtmlAgilityPack, Version=1.8.5.0, Culture=neutral, PublicKeyToken=bd319b19eaf3b43a' or one of its dependencies. The system cannot find the file specified.
Note : I don't have permission to download dll from Nuget in my original solution so i downloaded dll from another server through Nuget and added that dll in my original solution as reference. Actuall DLL is not in packages folder in my solution.
Please help me on this.
I've ran into a weird problem.
I basically have my own web-stack for .NET-core which I've built into a few .dlls, and I want to reference these from another ASP CORE-solution.
VS seems to find the assemblies, where I can navigate types etc.
I can also build the project without any issues, but when IIS then runs the server I get an internal server error stating:
FileNotFoundException: Could not load file or assembly 'myDLL, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
The referenced DLLs are in the debug-folder, and the really weird thing is that if I create a new ASP Core project in the same solution as the web-stack, I can reference and use it without any problems.
Why is this happening only when running on a project outside the web-stack's solution, and what can I do to make it runnable everywhere?
The .NET Core Tooling in VS 2017 (< 15.3 preview) / .NET CLI < 2.0 doesn't fully support referencing assemblies on disk. You need to package the library up as a NuGet package or use a project reference ("same solution"). The technical reason is that all the required assemblies and versions are resolved during compilation and written to the .deps.json file. When loading arbitrary assemblies, this might fail because either the assembly or its dependencies cannot be found (or a conflict with each other).
for load the external dll in core project, needed to:
vs 2017 with version 15.3 or upper.
Microsoft.Extensions.DependencyModel NuGet package installed in your project.
I want to use Deedle, but it complains like this:
Unknown build error, 'Cannot resolve dependency to assembly
'FSharp.Core, Version=4.3.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a' because it has not been preloaded.
When using the ReflectionOnly APIs, dependent assemblies must be
pre-loaded or loaded on demand through the
ReflectionOnlyAssemblyResolve event.'
Being an Android developer normally I'm a bit confused about VS dependencies.
I tried with the Package Manager Console, but it installs only 4.0.0.1 and doesn't know 4.3.0.0.
It seems it is solved with help from this question:
.NET runtime tries to load FSharp.Core 4.3.0 even if all projects reference 4.3.1
In the App.config file there was a binding redirect already to 4.4.0.0. I don't know if I added it earlier or Deedle. When I changed it to 4.0.0.1, which is apparently and confusingly the latest version of FSharp and I could download it with NuGet, it started to work.
I've been trying to update my Ninject not to meet this bug and I wasn't able to figure out what version of Ninject.Web.Common I have.
Here's a line from packages.config
package id="Ninject.Web.Common" version="3.2.3.0" ...
However, the csproj contains the following line
Reference Include="Ninject.Web.Common, Version=3.2.0.0 ..."
What exactly does the reference version here means?
The version in packages.config is the version nuget will fetch from the server. So when you run nuget restore this will be the version that is downloaded.
The second one is the version that your assembly is searching for at runtime. If you don't load your dependencies from GAC the version will be ignored. Only if your application loads its assemblies from GAC the version will taken into account and the CLR tried to find the assembly with the specified version. Because in the GAC multiple versions of the same assembly can exist.
Have a look at this Question for details about compile time dependencies.
I am new to winCE (.net 2.0) programming.
My project is in C# language. A guy before me was using log4net (Runtime version : V1.1.4322, Version 1.2.10.0). What does those versions means, Am I right V1.1.4322 means it was compiled on .net version 1.1.4322
Now the problem is if I compile it is giving me warning(s):
Consider app.config remapping of assembly "System.Data, Culture=neutral, PublicKeyToken=969db8053d3322ac, Retargetable=Yes" from Version "1.0.5000.0" [] to Version "2.0.0.0" [C:\Program Files\Microsoft Visual Studio 8\SmartDevices\SDK\CompactFramework\2.0\v2.0\WindowsCE\System.Data.dll] to solve conflict and get rid of warning.
Consider app.config remapping of assembly "System.Xml, Culture=neutral, PublicKeyToken=969db8053d3322ac, Retargetable=Yes" from Version "1.0.5000.0" [] to Version "2.0.0.0" [C:\Program Files\Microsoft Visual Studio 8\SmartDevices\SDK\CompactFramework\2.0\v2.0\WindowsCE\System.Xml.dll] to solve conflict and get rid of warning.
Consider app.config remapping of assembly "System, Culture=neutral, PublicKeyToken=969db8053d3322ac, Retargetable=Yes" from Version "1.0.5000.0" [] to Version "2.0.0.0" [C:\Program Files\Microsoft Visual Studio 8\SmartDevices\SDK\CompactFramework\2.0\v2.0\WindowsCE\System.dll] to solve conflict and get rid of warning.
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Microsoft.Common.targets : warning MSB3247: Found conflicts between different versions of the same dependent assembly.
My application .exe is OK but when I am running WinCE Emulator it is crashing
I have worked with app.config, it didn't fix my problem
any suggestions ?
The problem you're seeing is you've got references to two different versions of log4net.
Check any referenced assemblies to see if you've got references in those projects. Then confirm the versions of any copies of the file you've got on disk.
It can be a pain to find the offending file; I've found the simplest thing is to find all copies on disk, and just delete all copies of the incorrect version. Then see where your project complains and adjust.
I'm not sure that you're having just a log4net problem.
The assemblies its complaining about are normal CLR assemblies (from the System namespace). It almost seems to me that you have references to several .NET 1.1 assemblies but you've got your project set to use .NET 2.0. The IDE is asking you to map the 1.1 assemblies to the 2.0 ones so that your project will know which one it should use at runtime.