MVC Unable to find Assembly - asp.net-mvc

I'm running into an issue after updating the assemblies in my project. Previously I deployed MVC application which contain a reference of an assembly named Core.dll (One of my class library project).
Now in the newer version, I completely removed the dependency of Core.dll from my project and added new dependency TrainingEngine.Core.dll (new class library project).
But the problem is after deployed my updated application, there are several errors being logged that says
Unable to find assembly 'Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
And after further investigation, I came to know that this error raised from those users who previously had opened website on there browser and now when they refresh on there side, this error logged and the site is not responding to them. But if they delete there browser cache or use another browser, it works fine.
I'm not sure why it still looking for old assembly even though I deployed new version. I restarted the App Pool, also Recycle it and restarted the web server but nothing help.
Please suggest

Related

The name 'Url' does not exist in the current context error VS2017

Getting an error The name 'Url' does not exist in the current context error in asp.net whenever I open a .cshtml file in my web project.
I should note that I got this solution fresh from our source repo and other developers tell me they don't see this issue.
Web project has a referenced to a nuget package and when I look at System.Web.MVC it's Mvc.4.0.40804
Things I've tried based on posted solutions:
1) Unloaded project and deleted .user file and did a clean and rebuilt.
2) Deleted temp ASP files in the .net framework directory.
There are a lot of other solutions saying to move views or adding to web.config file, but if other developers using same solution aren't facing this - I'm thinking it's machine specific.
I don't see any reference errors in the web project.
When I installed VS2017, I just did the ASP.NET development. So, i have no gotten another version of MVC. Could it be that?
Thanks,
Brian
So I ended up modifying my VS2017 install and under ASP.NET and web development, I uninstalled that and reinstalled and made sure ASP.NET MVC 4 was checked off under Optional.

TFS Build Failing on System.Windows

I've been trying to run my build on TFS and I keep getting an error that kills my build. What's strange is that nothing except code change has been done since the issue started (Or at least that I'm aware about). I keep seeing this:
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.WinFx.targets (268): Unknown build error, 'Cannot resolve dependency to assembly 'System.Windows, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' 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.'
I've googled this and the only thing I see is that it's because there's a Silverlight dll being used in a WPF application. My application is a WPF project, but I haven't been able to find any changes being done in any of my projects in my solution in regards to references.
For more information, this project is a branch from the main code. The main development branch runs fine, but for some reason, this build just fails.
Any ideas?
It seems like you're referencing the Silverlight version of System.Windows instead of the .NET Framework version. Have you tried installing Silverlight on the build server or changing the reference of your project to point to the normal .NET Framework version of that assembly (which .NET Framework exists on your build server)?

file load exception prblem in mvc project

I am trying to run a project on my system (the project is in mvc and azure ).
i am able to build the project but it is showing error on run time .the error message is as following :-
Could not load file or assembly 'System.Net.Http, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Check the .net version in your IIS app pool. Also check the target version in your project properties and make sure you are targeting the same version your IIS app pool is configured for. You should be targeting 4.0+.
The likely problem is the target machine doesn't have the target assemblies installed.
You should make sure you have .NET framework v4 installed.
This shouldn't be happening on the same machine which the solution was built, as the assemblies are required during the build process.
This is a common-case that, I don't know who downvoted this question, but just because you don't know what this guy is talking about doesn't mean the question is invalid, of poor quality, etc. fact is this is enough information to solve the problem, barring any crazy, environment-specific problems created by the user.
Hope this helps others out there!

Razor MVC application failed to load FreeTextBox but it doesn't have a FreeTextBox

I uploaded my MVC3 Razor application to the webhost provider (works fine on my development server under Visual Studio 2010).
On the deployed site I get a
"Could not load file or assembly 'FreeTextBox, Version=3.3.1.12354, Culture=neutral, PublicKeyToken=5962a4e684a48b87' or one of its dependencies. The system cannot find the file specified."
But I am totally puzzled, my application does NOT have ANY FreeTextBox in it! I am not even referencing that DLL. Unfortunately the "Detaile" IIS error doesn't even mention who or what is trying to load that DLL so I have no idea where it is coming from.
To triple check I did a search on FreeTextBox on my self-built app with search mask . on the ENTIRE solution and Visual Studio can't find anything.
Here the Actual Solution
It was indeed inheriting an assembly of the parent application.
Ketan as per your suggestion I solved it by doing this:
<system.web>
<assemblies>
<clear/>
... here standard MVC3 assemblies of template project ...
</assemblies>**
</system.web>
Is your app folder on shared host configured as an "Application"? If not then it probably is using the machine.config or web.config at a higher level where there is a reference of that control. The FreeTextBox is a ASP.NET WYSWYG Text editor something that webhosts normally include in their hosting packages as free. I would contact their tech support to fix this.
you are referencing a assembly with a dependency on "FreeTextBox".
deploy the .dll containing the "FreeTextBox" assembly to your /bin dir or find the offending assembly with a tool like
.NET Reflector
NDepend
dotPeek

Problems Running Monodroid application with Db4o

My monodroid application builds fine and deploys to the device; however the application dies on start up and the DDMS shows the following error:
01-07 17:04:57.607: E/mono(875): Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'Db4objects.Db4o, Version=8.0.224.15975, Culture=neutral, PublicKeyToken=6199cd4f203aa8eb' or one of its dependencies.
I have confirmed I am referencing DB4O and it shows up in the bin/debug directory.
Given this error I would think that db4o does not work with Monodroid but I have another Monodroid project which uses db4o and it works.
I have a feeling something is broken with the project file but not sure what to do. I have tried removing and adding the db4o reference a couple of times.
I am using Visual Studio 2010 and the latest version of Mondodroid as of 1/7/2012. I am deploying to a an Android 3.2 emulator.
Thanks in advance for any insight.
It sounds like you're running into a bug in the current version of Mono for Android that has to do with Fast Deployment. In the project's properties, under the Mono Android Options section, uncheck the box for Use Fast Deployment. You'll probably need to do a clean build as well to make sure it takes effect.

Resources