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:
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...
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.
stringme6
0 Points
3 Posts
error ASPPARSE: Could not load type Global
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
hongping
Contributor
3403 Points
635 Posts
Microsoft
Re: error ASPPARSE: Could not load type Global
Sep 14, 2007 04:57 PM|LINK
Are you using the AspNetCompiler task in your project file? Or are you doing it differently?
If you get the answer to your question, please mark it as the answer.
stringme6
0 Points
3 Posts
Re: error ASPPARSE: Could not load type Global
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"
hongping
Contributor
3403 Points
635 Posts
Microsoft
Re: error ASPPARSE: Could not load type Global
Sep 17, 2007 05:49 PM|LINK
What do you have in global.asax.vb?
If you get the answer to your question, please mark it as the answer.
hongping
Contributor
3403 Points
635 Posts
Microsoft
Re: error ASPPARSE: Could not load type Global
Sep 17, 2007 05:50 PM|LINK
Also, is this a "Web application project" or a "Web site"?
If you get the answer to your question, please mark it as the answer.
atomic_mass
Member
6 Points
3 Posts
Re: error ASPPARSE: Could not load type Global
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:
http://blogs.msdn.com/aaronhallberg/archive/2007/07/02/team-build-and-web-deployment-projects.aspx
stringme6
0 Points
3 Posts
Re: error ASPPARSE: Could not load type Global
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):
<MakeDir Directories="$(SolutionRoot)\ProjectName\bin" Condition="!Exists('$(SolutionRoot)\ProjectName\bin')"/>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...
<Exec Command="xcopy /Y /R %22DLL_Destination\*.dll%22 %22$(SolutionRoot)\ProjectName\bin%22" ContinueOnError="true" />
<AspNetCompiler Debug="false" VirtualPath="/ProjectName" PhysicalPath="$(SolutionRoot)\ProjectName" TargetPath="$(WebDirectory)\ProjectName" Updateable="false" />
(NOTE: If any of you know a better way to do this, let me know. thanks)
mcgurk
Member
49 Points
19 Posts
Re: error ASPPARSE: Could not load type Global
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.