aspx.cs file not found after unpacking a WSP package

1.2k views Asked by At

I´ve unpacked a WSP package creating a new Project in Visual Studio with the "Import Sharepoint Solution Package" option. I can deploy the project and everything works just fine but I obtain this warning message:

Warning 1   File 'MySolutionCentralAdminPage.aspx.cs' was not found.    

The Warning comes with this block of code:

<%@ Page Language="C#" 
AutoEventWireup="true" 
CodeBehind="MySolutionCentralAdminPage.aspx.cs"
Inherits="MySolution.MySolutionCentralAdminPage" 
MasterPageFile="~/_admin/admin.master" %>   

The thing is everything just works so this file MUST be somewhere but after an intensive search (in my computer and then looking for solutions in internet) I must say I cannot find this file.

How can I locate it in order to modify it?

1

There are 1 answers

5
Thorsten Hans On BEST ANSWER

Is there an MySolution.aspx? the codebehind for the markup you've pasted here should be CassidianCentralAdminPage.aspx.cs not MySolution.aspx.cs

When you're sure that everything is working without MySolution.aspx.cs, you could remove the ItemEntry from the Project file.

To do so you should unload the project in VS and choose Edit ProjectFile from the contextmenu when you rightclick the unloaded project.

I would remove the Item Entry for MySolution.aspx.cs, save it and reload the project.

But you have to ensure that everything is working without the MySolution.aspx.cs..

Thorsten