ASP.NET Webforms Project created with VS2012 RC does not run in VS2012 RTM - asp.net

I used the RC version of Visual Studio 2012 to create an ASP.NET Webforms project and I intentionally took the 4.0 version of .Net and of the project template to avoid complications after the release of VS2012.
Now I anyway bumped into the problem, that is revealed in the following error message:
'jquery' is not a valid script name. The name must end in '.js'.
As I noticed in the references, following assembly references are broken:
Microsoft.ScriptManager.jQuery
Microsoft.ScriptManager.jQuery.UI.Component
System.Web.Providers
I tried to re-install jQuery using NuGet but did not find these assemblies.
If I now create a new .Net 4.0 ASP.NET Webforms project in Visual Studio 2012 I get a lot of new references which are not present in my current (originally created in the RC-version, now opened in VS2012 RTM), like:
AspNet.ScriptManager.jQuery
AspNet.ScriptManager.jQuery.UI.Combined
but I can't find them among reference sources if I try to add a new reference to my original project.
How can I make my application runnable in VS2012?

Check packages
AspNet.ScriptManager.jQuery.1.7.1
AspNet.ScriptManager.jQuery.UI.Combined.1.8.20
make sure the following dlls are in the lib folder
AspNet.ScriptManager.jQuery.dll
AspNet.ScriptManager.jQuery.UI.Combined.dll
And check the reference in your project to make sure all references are resolved.
Sometimes, the dlls didn't added to the source control and when you do a get latest from the source control these two dlls are missing.

Related

Copy Visual Studio Project - Compilation Error

I have an ASP.Net MVC 5 project inside a Visual Studio 2015 solution. I needed an exact copy of the project so in the File Explorer I copied the project and pasted to create a new project.
I renamed the copied project so that both projects now have a different name. I also updated the Namespaces inside of any classes in the copied project to reflect the new project name.
MyProjects.ProjectOne
MyProjects.ProjectTwo
I also deleted the Bin directory in the newly copied project. Both projects are targeted at the .Net Framework 4.0. I've restarted Visual Studio, but I still get the following compilation error when I now try to run either Project:
Compiler Error Message: CS0234: The type or namespace name 'ProjectOne' does not exist in the namespace 'MyProjects' (are you missing an assembly reference?)
I'm running out of ideas with regards to solving this.
Any advice would be greatly appreciated.
Thanks.
Make sure that the project which you copied has the correct references, and that the versions of the assemblies are the same as on the old project. You can also use the Object Browser to inspect an assembly and verify whether it contains the types that you expect it to contain.
For more information, see Troubleshooting .NET Framework Targeting Errors.

error when deployed to azure

When i Publish my project i m getting this error:
error CS0009: Metadata file
'D:\home\site\approot\packages\Microsoft.ApplicationInsights\1.1.1-beta\lib\net45\Microsoft.ApplicationInsights.dll'
could not be opened -- Invalid COR20 header signature.
(I m using asp.net core 1)
Did Someone knows or has experienced the same problem?
Thanks
This problem can occur when you have added a third-party DLL to your application and have not properly added it to your compiler’s project file or references list.
If that's the case this might work:
Open your project in Visual Studio .NET. Make sure the DLL exists and has been properly added to the reference list. If you are using VBC or CSC to compile your project, check your application’s CompileApplication.rsp file to make sure the DLL is in the /references list like the other DLLs.
Your DLL may not be compatible with .NET or with .NET’s 32-bit mode. Ensure that your DLL is .NET compatible.
If your project still won’t compile properly, try switching your application’s compiler selection in Iron Speed Designer’s Application Wizard from 'vbc.exe' or ‘csc.exe’ to Visual Studio .NET or vice versa. Using Visual Studio .NET will take longer to build than .NET’s VBC or CSC built-in compilers, but Visual Studio .NET will resolve all of the references properly without having to change your application’s CompileApplication.rsp file.

VS.NET 2015 project won't build

Last week I created a ASP.NET 5 MVC project using VS.NET 2015 Preview. I then used NuGet to get the MongoDB driver (mongocsharpdriver) and I wrote some code and with that added some documents to the database. I started a new project today along those same lines but it wouldn't build. It says the type or namespace MongoDB can't be found even though I have intellisense for it. So I opened the original project and now that one won't build, same exact error. My project properties is set to target CLR, not Core -- that MongoDB library doesn't work with Core. Has anyone run into this problem and know how to fix it? I'm pretty sure I'm not going crazy.
All I do to reproduce the problem is start a new ASP.NET Web Application, then pick ASP.NET 5 Starter Web, then install MongoDB from NuGet, then add an import to it in the HomeController.cs. Then it complains about it not being found in Core, even though I'm not targeting Core.
This is the error when compiling following my steps above:
Error CS0246 The type or namespace name 'MongoDB' could not be found (are you missing a using directive or an assembly reference?) Bug.ASP.NET Core 5.0 HomeController.cs
As per my best knowledge ASP.net core 5.0 framework does not support many of existing Nuget library and assembly.
Go to project.json and remove ASP.net Core 5 from framework section.

Error message about existing

I'm using VS 2010 with ASP.net MVC 2.
I recieved a program that was completed and when I was debugging the program I recieve an error message.
"Error 4 The type 'System.Web.Routing.RouteTable' exists in both 'C:\Program Files\Reference Assemblies\Microsoft\Framework.NETFramework\v4.0\System.Web.dll' and 'C:\Documents and Settings\Vincent\Desktop\3\Manning.ASP.NET.MVC.2.in.Action.Jun.2010\aspnetmvc2inaction_code\lib\AspNetMvc\System.Web.Routing.dll' C:\Documents and Settings\Vincent\Desktop\3\Manning.ASP.NET.MVC.2.in.Action.Jun.2010\aspnetmvc2inaction_code\src\Chapter01\GuestBook\Global.asax.cs"
and
"Error 1 The type 'System.Web.Routing.RequestContext' exists in both 'c:\Program Files\Reference Assemblies\Microsoft\Framework.NETFramework\v4.0\System.Web.dll' and 'c:\Documents and Settings\Vincent\Desktop\3\Manning.ASP.NET.MVC.2.in.Action.Jun.2010\aspnetmvc2inaction_code\lib\AspNetMvc\System.Web.Routing.dll' C:\Documents and Settings\Vincent\Desktop\3\Manning.ASP.NET.MVC.2.in.Action.Jun.2010\aspnetmvc2inaction_code\src\Chapter01\GuestBook\Controllers\AccountController.cs".
The program was converted into VS 2010 format.
What should I do?
// Fullmetalboy
When you convert a project from .Net 2.0/3.5 to 4.0 in VS2010 the web projects will prompt you to upgrade the framework to 4.0 but you will need to manually go into the project properties and upgrade class library projects and certain other projects manually in the project properties. So this type of error is probably caused by your web project referencing the 4.0 version of System.Web.Routing but a class library in your solution is still referencing the 3.5 version.
One of the projects in your solution is referencing a single type (RouteTable/RequestContext) in two different places. I always start with cleaning and rebuilding the solution, but if that doesn't fix it, you're going to have to check the project references and resolve it that way. If all else fails, try to make a new project from scratch and manually add the references and projects you need and then copy and paste your old code.
Someone copied the ASP.NET MVC source code into the "lib" folder of your application and either included that folder in the project (so it is getting built when you build your project) or he/she built it before you got it and referenced it from within the project. Now it is in conflict with the ASP.NET libraries that exist in default installation folder on the system 'c:\Program Files\Reference Assemblies\Microsoft\Framework.NETFramework\v4.0\System.Web.dll'.
Since you're using the .NET 4.0 Framework, the library System.Web.Routing is ambiguous. Make sure you have referenced System.Web.dll (version 4.0) and remove the reference to System.Web.Routing.dll

Visual Studio 2010 build with wrong framework

I'm working on Visual Studio Profesionnal 2010.
In my solution I've got 2 projects
The first is a web site with targeted .net runtime 2.0
the second is a dll with targeted .net runtime 2.0
I add the output of the second as assembly of the first.
I build and rebuild and clean my solution
result : Build succeeded
But when I launch the projet in my web-browser ( in debug or release ).
I've got the Server Error :
This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded
Is there someone who had already the problem?
I think it can be a bug from Visual Studio 2010 but the hotline is very expensive
300€ the phone call.
More Information :
I opended my dll with reflector and saw that mscorlib is referenced 2 times
the first time Version = 2.0
and the second time version = 4.0
Open the .csproj file with text editor (e.g. Notepad) and see the references in there.
If there are references to frameworks higher than 2.0 remove them or change to 2.0 if possible, save and reload the project.
I am pretty sure that this means that you built with asp.net framework 3.5x, but your server only has 3.0x. Update the runtime on the server.
Your server can only support 3.0, Updating the server will resolve the issue..

Resources