When publishing my MVC 5 webapp to Azure I get the error:
The “ImportParametersFile” task failed unexpectedly. System.IO.FileNotFoundException: Could not load file or assembly ‘Microsoft.Web.XmlTransform,Version=220.127.116.11, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’ or one of its dependencies. The system cannot find the file specified. File name: ‘Microsoft.Web.XmlTransform, Version=18.104.22.168, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’
I’m using Visual Studio 2012 Update 4. Azure SDK 2.3.
– reinstall azure SDK
– reinstall Web Tools 2013.1 for VS2012
– installed slowcheetah nuget package
– installed Microsoft.Web.xdt nuget package
– uninstalled VS 2013
So far no luck, the Microsoft.Web.Xmltransform.dll is just missing and the version that is somewhere on my system is the wrong version. I’ve tried to find the 22.214.171.124 version somewhere, but it seems unfindable.
– repair Microsoft ASP.NET & Web Tools 2013.1 Visual Studio 2012
reinstall does not work
I got the error message Could not load file or assembly ‘system.web.http’ file not found when running custom tool on Typelite. File not found. This was after updating some nuget packages.
The issue is that apperently there are several version installed. How to get rid of this misery:
– start the nuget package manager console in Visual Studio
– type: update-package (all packages are updated)
– type: get-package (you get a list of installed packages)
– remove all packages from old versions (e.g.: uninstall-package xxxx.yyy -Version 1.0.0)
– if still an old assembly exists in the references, delete it and reinstall the package (Update–Package <PACKAGE> –reinstall
– run update-package again
If you get a message that the package is not installed, install it! (install-package <PACKAGE NAME>
All should work now (at least it did for me)
Using Entity Framework 6.0 I got this message. This problem occurs when mostly in Async environment. This is due to a reader (in the same DBContext) that is still open, while another reader tries to open an new one. Typically this is a async issue.
In my MVC 5 app I have a Async call to my webapi. My problem was that I created a second repository object in a method, while the first repository was created by Unity Dependency Injection Framework was not finished reading.
In stead of newing the repository up in the method I injected it in the constructor and all issues where solved.
A better solution:
Add MultipleActiveResultSets=True to the connectionstring of the database.
After updating my nuget packages my build of the test project was failing, without any error reported in the build output window.
First of all you can turn on verbose logging:
- Project and Solutions
- Build and Run
- Set these to options to Diagnostic:
- MSBuild project build output verbosity
- MSBuild project build log file verbosity
Probably you’ll see the error appearing in you build log file of in the build output file.
In my case the System.web.mvc reference was updated, but the fake assembly that I had generated was not updated and one assembly was missing.
When rendering a CSHTML webpage that includes a PartialView (or is a PartialView) when using MVC you get the error message:
The “RenderBody” method has not been called for layout page
This typically occurs when you:
– have a partial view
– use a _ViewStart.cshtml page
– you call the partival view from your controller using: return View();
And there you go wrong. It is a partial view, so you should return like this:
That’s all there is to it.