Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Mar 15, 2010 08:53 PM by mcgurk
Sep 14, 2007 01:17 PM|LINK
I'm trying to use ASPNET Compiler in MSBuild.
For some reason it doesn't like it when I do a GET from MSBUILD and run ASPNET Compiler.
However, once I pull up the same Project in VS2005 and do a build. And then go back and call ASPNET Compiler, it is able to run fine.
GLOBAL.ASAX file has the following:
<%@ Application Codebehind="Global.asax.vb" Inherits="Global" %>
Any help will be greatly appreciated. Thanks
Sep 14, 2007 04:57 PM|LINK
Are you using the AspNetCompiler task in your project file? Or are you doing it differently?
Sep 17, 2007 12:28 PM|LINK
I tried it in my project file and with Visual Studio 2005 command prompt as well. None of them works
with msbuild, I wrote-
<AspNetCompiler Debug="false" VirtualPath="/build" PhysicalPath="$(Root)\myProject" TargetPath="$(Root)\mytarget" Updateable="false" />
For the VS2005 CommandPrompt, I wrote-
aspnet_compiler -p "c:\myproject" -v / "c:\mytarget"
Sep 17, 2007 05:49 PM|LINK
What do you have in global.asax.vb?
Sep 17, 2007 05:50 PM|LINK
Also, is this a "Web application project" or a "Web site"?
Sep 18, 2007 10:54 AM|LINK
We had the same issue. Apparently has something to do with web application projects. This link explains it and has some keys to be added to the deploy project:
Sep 24, 2007 03:01 PM|LINK
Atomic mass Thanks for the tip. It did answer part of my question.
hongping- this is a web service project. Global.asax- is an empty shell.
Once I took it out it did the same to my service.asmx file
If anyone is interested, here is the Fix- It turns out that Asp_net compiler wants a "bin" folder with all the dll references inside the project (the one you are tyring to build).
But that was not happening when I just ran Asp_Net compiler.
Here is my script with the fix (this comes after you got the project to build):
ProjectName- the name of the project you are working on
DLL_Destination- the path to the dll your project is using.
$(SolutionRoot)- you might need to declare the property for this- e.g- c:\build... (to create a property refer-> http://msdn2.microsoft.com/en-us/library/63ckb9s9.aspx)
$(WebDirectory)- you need to declare this property. e.g. c:\Build\web...
(NOTE: If any of you know a better way to do this, let me know. thanks)
Mar 15, 2010 08:53 PM|LINK
ANOTHER way this can happen is when you change the output directory from /bin to /bin/debug in your web app.
I was changing my config from AnyCpu to x86, which changed the output path in all my projects to bin/x86/debug. So I smartly went through and changed everything back to bin/debug, including my website project. Which broke the build.