Error in building project after installing VS2012 - asp.net

I have just installed VS2012 on my system and VS2010 was already installed. I have a project made in VS2010 which was build successfully but later when i have installed VS2012 then it gives an error while build. Here is the error :
Error 430 The best overloaded method match for 'System.Web.UI.HtmlControls.HtmlTableRowCollection.Add(System.Web.UI.HtmlControls.HtmlTableRow)' has some invalid arguments
I have searched on google and i found some of articles with the solution of this problem. All they have mentioned that either remove the tags or remove the runat="server" from the table tag to solve this issue. I have tried and it worked for me.
But now my main concern is that i have more than 100 such pages and i don't want to remove it from each and every page. So is there any alternative solution to solve this issue. I mean to say can we handle this error in web.config or somewhere else so that i don't need to do it for every page.
If you have any idea then kindly suggest me and your suggestions will be really appreciated. Thanks in advance.

Solution to this issue is nicely expalained in below link
http://connect.microsoft.com/VisualStudio/feedback/details/766115/value-of-type-system-web-ui-htmlcontrols-htmlgenericcontrol-cannot-be-converted-to-system-web-ui-htmlcontrols-htmltablerow
and you can apply a patch released by MS for this issue:
http://support.microsoft.com/kb/2750147

Related

Cannot Build Xamarin.Forms From Source Code

I have downloaded the Xamarin.Forms solution from GitHub and I am trying to build the solution. Visual Studio does not build, generating more than 70 errors, as simple as the one below:
"The type or namespace name 'IOnClickListener' could not be found (are
you missing a using directive or an assembly reference?"in
Xamarin.Forms.Platform.Android\AppCompat\ButtonRenderer.cs
When I investigate the code, I see that there is really no reference to Android.Views.View in the using statements, so it seems fair.
Am I making a mistake somewhere?
It's not easy to get to the answer without digging into the logs but here are some steps that have helped me in the past.
Android Specific Steps:
Check the logs for any problems that stand out, look at the top most error first and work your way down. Output window -> Show output from Xamarin Diagnostic
If you find unzipping problems you might have to visit the Xamarin folders to delete the zip causing problems and Xamarin will download a new one.
C:\Users{USER}\AppData\Local\Xamarin
If you get loads of Xaml and Resource errors you might have to delete the contents of the file.
Resources\Resource.Designer.cs
After deleting the content(not the file), clean the solution, rebuild the project.
If you still have problems try to either downgrade Xamarin.Forms or upgrade it.
Change Api level to a higher one on the project properties.
Hope one of these helps.

Visual studio 2013 preview SPA template

I'm unable to get the SPA template to work from Visual Studio 2013.
I've installed the Web Tools update, and created a fresh project choosing the Web SPA template option.
unfortunately, I get the error
An unknown error occurred.
This is caused by a failed webapi request which has the following error message (from fiddler):
No OWIN environment is available for the request
I can't find any information anywhere on how to get this to run.. can anyone help?
Thanks
TL;DR
Don't use a space in the project name
Kiran, I went to reproduce the problem from scratch. I messed around with the first project (trying to get it to work) so much that I didn't think it would be much help in diagnosing the problem.
The new project worked fine... Isn't it great when you can't reproduce the problem?
Well I looked carefully at what I did differently.. couldn't think of anything, yet yesterday, I spent all evening trying to get this work... I'd recreated the project from scratch several times!
Finally I realised... I named my project "Test SPA" whereas today I was too lazy to write such a long name.. just called it "SPA".
Just created a new project with a space in the name.. and have successfully reproduced the problem.
Let me know if you still need me to send a project, I think you should be able to repro without one though if you use a space in the project name

ASP.NET runtime error: Could not load file or assembly 'Interop.CertEnroll'

I have a ASP.Net 4.0 site that I am editiing in VS2010. Every # Master and # Page tag has the blue squiggle lines giving the following error:
ASP.NET runtime error: Could not load file or assembly 'Interop.CertEnroll' or one of its dependencies. An attempt was made to load a program with an incorrect format.
I know it is related to trying to load a 32bit dll into a 64bit application but I am not sure how to control it since I am not sure how this Iterop.CertEnroll client is evening being referenced.
I am targetting Any CPU for my builds.
My application still functions but it bothers me to see all of these warnings and I have seen hints that this may be causing issue with my AjaxToolkit server tags not being recognized.
Thank you!
Karl
I discovered this solution for you. Since I cannot reproduce the error, can't exactly say if it would resolve the error for you, but you can still try. Here is the crux of the story from the link:
If you compile against x86 platform instead of Any CPU platform (which makes the code to run against x64 platform on x64 systems by default), it will work fine.
All the best!
Make sure you are compiling against .NET 4 and not .NET 4 Compact Framework.
I had the same issue not long ago with this missing dependency.
Installing Microsoft Online Services Sign In provides the correct assembly, although I'm not sure why this would be required.
edit: I can't seem to find the article that pointed me to the above download.
This is a known bug they aren't going to fix. You can try suggested workarounds though.
TL;DR: Check your master page(s) if the ContentPlaceHolder tags are specified correctly, and your pages to see that the ContentPlaceHolder tag ids are correct.
Long answer:
For anyone facing this issue and if the other solutions do not work, here is another thing you could try. I was getting the same error, with all master and page tags highlighted with the error:
Could not load file or assembly Microsoft.Practices.ServiceLocation,
Version=1.3.0.0
My packages were all in order and I spent quite a lot of time trying to get it to work. Turns out the error was misdirecting and the actual error was missing ContentPlaceHolder tags in my nested master page.

TFS 2010 - TF14040 The Folder may not be checked out

I have a .NET 4 website in VS2010 stored in a TFS 2010 team project. I need to add a reference to System.Data.Linq.dll to the website. I am referencing a LINQ DataContext that is defined in another project and I get build errors saying that I need the reference to System.Data.Linq. I go up to the "Add Reference" menu option and add it like I would any normal reference, and it even shows up in the Web.config and in the Properties pages for the website... BUT if I build I still get the same error.
So I found a place in my code where I was referencing the LINQ count function and it told me it was invalid because I was missing a reference and it offered to add the reference automatically. I told it to add the reference automatically and it is at this point that I get the error mentioned in the subject:
TF14040: The folder $/Folder/Subfolder may not be checked out. No items were checked out
I've done some research online but I haven't been able to find much. I saw on a blog that making the folder not readonly fixed the issue for him, but it didn't seem to work for me unless I misunderstood something.
I tried loading up the project from source control onto a fresh computer where that project had never been loaded before and I can reproduce the issue the same way. Help would be greatly appreciated.
FWIW, this error also occurs in different circumstances. I had the same error today from the command line when trying to use tfs checkout SomeFolder /login:user,password, although this was not within the context of an asp.net app, I'm currently working on dependency replication. For me, adding the /recursive command worked, like this:
tfs checkout SomeFolder /recursive /login:user,password
The hint to try that came from here, by the way.
I have no idea if this is your problem but I've noticed that TFS2010 seems to have some bug somewhere around folder renames/deletes/changes or something. The bugs seem to go away when you check everything in and try again after the folder change has been saved to source control. I have hit this issue a dozen times this week but don't know exactly what the scenarios are. It's quite frustrating.
I figured it out, but it's a little strange. I had some build errors that I hadn't fixed yet, also my web.config file used to be for a 3.5 SP1 site and I upgraded the site to 4.0. Somewhere along the line the build errors and the web.config combined to form this strange weird error that apparently has nothing to do with TFS.
I figured it out by creating a new website and slowly moving over portions of my site to that new site. Things didn't go totally crazy until I moved over my web.config. So I went back and updated my web.config file so that it more closely matched the way a .Net 4 web.config should by trimming out a lot of stuff and now things are good and building fine. Thanks for the help.

VS2008 not picking up recently added web controls

Has anyone had experience with VS2008 incorrectly identifying variables in the code-behind as not being defined on the .aspx page? How was this resolved? The page is executing properly without any runtime or compilation errors.
Nevermind. Closing and re-opening the document in question seems to have resolved the problem. Anyone watch "The IT Crowd"? ... haha. "Have you tried turning it off and on again?" Seems to solve everything.
Check out my answer to my question here: Web site reports xxx does not exist in current context after upgrade to VS2008 Sp1
There is a hotfix for this if your getting the same issue I was.

Resources