When I checked I could see the package.zip file contains the project without .cs file( which is expected) but aspx files refer.cs file( which is not expected). aspx files should refer dll to get code behind.
Can you please let me know what gets wrong from my side?
In addition to that what is the best way to package and deployment using automation script(I can use, command line, poweshell commands but NOT User interface such as Visual Studio or Import project from IIS etc) as we are doing build and deployment
automation without any user interactions.
I will definitely appreciate any help from your side.
Thanks & Regards,
FNK
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Don't forget to click "Mark as Answer" on the post that helped you.
The steps you have outlined look reasonable. Can you try reproducing this using following different steps:
Create a new web application project in VS. Try to Package using right click context menu and deploy using deploy.cmd file with a /Y switch. You can skip the /M switch for now.
Create a new web application project in VS and then try your steps again.
I think the issue is that CodeFile attribute should ideally not exist in a Web Application Project, it should be CodeBehind. My suspicion is that this was an issue which got created when there was a conversion from WebSite project to Web Application project.
You can also try to Right click on the project file and say "Convert to Web Application" (or manually change the attributes :-))and then try again.
Sorry for the delayed reply as we had some urgent bug fixing had to be done on last couple of days. So, I was unable to test the solutions which you suggested.
As you suggested, I converted to web application by rightclicking on the project, but that didn't help me.
1.Create a new web application project in VS. Try to Package using right click context menu and deploy using deploy.cmd file with a /Y switch. You can skip the /M switch for now.
I couldn't find a context menu with deploy option.
2.Create a new web application project in VS and then try your steps again. I created a new webapplication and followed the steps as explained in your article mentioned in the previous post. The issue persists.
But when I created a new website application everything working as expected.
As per my understandingwe can't publish ASP.NET Web application using MSBuild tool. If it is wrong something wrong withmy comfiguration . Currently we are using Visual studio 2010
Thank you very much, I appreciate this help.
Thanks & Regards,
FNK
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Don't forget to click "Mark as Answer" on the post that helped you.
faisalnk
Member
452 Points
110 Posts
Packaging and deployment of ASP.NET 2010 web project using script(command line tools)
Oct 19, 2011 06:05 AM|LINK
Hi ,
We have been doing build and deployment using CruiseControl.NET, Poweshellscript.
We have small web application which contains few aspx files and .cs files.
I created a package using following msbuild command as per vishal Joshy's blog
MSBuild "C:\Myproject.csproj" /T:Package /P:Configuration=Release;PackageLocation="C:\MyPackage\Package.zip"
After that I run following deployment code as per ScottGu's blog
Package.deploy.cmd /y /M:https://localhost:8172/MsDeploy.axd
The deployment also executed successfully
But when I browse the one of the application page getting following error
The file '/Mypage.aspx.cs' does not exist.
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Mypage.aspx.cs" Inherits="MyPage" %>
When I checked I could see the package.zip file contains the project without .cs file( which is expected) but aspx files refer.cs file( which is not expected). aspx files should refer dll to get code behind.
Can you please let me know what gets wrong from my side?
In addition to that what is the best way to package and deployment using automation script(I can use, command line, poweshell commands but NOT User interface such as Visual Studio or Import project from IIS etc) as we are doing build and deployment automation without any user interactions.
I will definitely appreciate any help from your side.
Thanks & Regards,
FNK
Don't forget to click "Mark as Answer" on the post that helped you.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Thanks & Regards
Faisal. N
VishalRJoshi
Member
104 Points
28 Posts
Re: Packaging and deployment of ASP.NET 2010 web project using script(command line tools)
Oct 21, 2011 04:45 AM|LINK
Hi Faisal,
The steps you have outlined look reasonable. Can you try reproducing this using following different steps:
I think the issue is that CodeFile attribute should ideally not exist in a Web Application Project, it should be CodeBehind. My suspicion is that this was an issue which got created when there was a conversion from WebSite project to Web Application project. You can also try to Right click on the project file and say "Convert to Web Application" (or manually change the attributes :-))and then try again.
Hope this helps.
Vishal R. Joshi | http://vishalrjoshi.com | http://twitter.com/vishalrjoshi
faisalnk
Member
452 Points
110 Posts
Re: Packaging and deployment of ASP.NET 2010 web project using script(command line tools)
Oct 24, 2011 06:16 AM|LINK
Hi Vishal Johi,
Sorry for the delayed reply as we had some urgent bug fixing had to be done on last couple of days. So, I was unable to test the solutions which you suggested.
As you suggested, I converted to web application by rightclicking on the project, but that didn't help me.
1.Create a new web application project in VS. Try to Package using right click context menu and deploy using deploy.cmd file with a /Y switch. You can skip the /M switch for now.
I couldn't find a context menu with deploy option.
2.Create a new web application project in VS and then try your steps again. I created a new webapplication and followed the steps as explained in your article mentioned in the previous post. The issue persists.
But when I created a new website application everything working as expected.
Instead of MSBuild I used Aspnet_compiler.
Aspnet_compiler -v /ABC.SSO -p "C:\NEWAPP\ABC.SSO" -u "C:\TargetPackage"
As per my understanding we can't publish ASP.NET Web application using MSBuild tool. If it is wrong something wrong withmy comfiguration . Currently we are using Visual studio 2010
Thank you very much, I appreciate this help.
Thanks & Regards,
FNK
Don't forget to click "Mark as Answer" on the post that helped you.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Thanks & Regards
Faisal. N