vendredi 22 mai 2015

Errors converting web site project to web application project ASP.NET

I have a web site that I am trying to convert to a web application project. I am using these references:

http://ift.tt/1dp2qUb

http://ift.tt/1Q1rDQg

I think I'm following the recipe, but I get hundreds of compilation errors upon build, which in my experience usually means I am doing something very basic very wrong, like in web.config. Without posting the entire project, here's a sample of the errors.

In each web form, the asp.net page directive looks like this:

<%@ Page Language="C#" AutoEventWireup="true" Inherits="Configuration" Codebehind="Configuration.aspx.cs" %>

And throws: "The pre-application start initialzation method Start on type System.Web.WebPages.Deployment.PreApplicationStartCode" threw an exception with the following error message: Could not find a part of the path 'I:\Visual Studio 2013\Projects\MG401k\WAP\MG401kWap'" and "A namespace cannot directly contain members such as fields or methods". It looks like it is expecting something that I am not telling it. If I add a new web form to the project, the page directive looks like this:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="MG401kWap.WebForm1" %>

but still throws the same error.

In each javascript file, for the "$(document).ready" function, it throws "error CS1056: Unexpected character '$'"

I added <namespaces> <add namespace="MG401kWap" /> </namespaces></code> to the web.config, but no joy.

Can someone please point me in the right direction? I'm unsure what to do next.




Aucun commentaire:

Enregistrer un commentaire