locked
error ASPPARSE: Could not load type Global RRS feed

  • Question

  • User-1902688485 posted

    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 

     

     

     

     

     

    Friday, September 14, 2007 9:17 AM

Answers

  • User-1902688485 posted

    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://msdn.microsoft.com/en-us/library/63ckb9s9.aspx)
    $(WebDirectory)- you need to declare this property. e.g. c:\Build\web...

    <MakeDir Directories="$(SolutionRoot)\ProjectName\bin" Condition="!Exists('$(SolutionRoot)\ProjectName\bin')"/>
    <
    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) 

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, September 24, 2007 11:01 AM

All replies

  • User-762694769 posted

    Are you using the AspNetCompiler task in your project file? Or are you doing it differently?

    Friday, September 14, 2007 12:57 PM
  • User-1902688485 posted

    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"

     

    Monday, September 17, 2007 8:28 AM
  • User-762694769 posted

    What do you have in global.asax.vb?

    Monday, September 17, 2007 1:49 PM
  • User-762694769 posted

    Also, is this a "Web application project" or a "Web site"?

    Monday, September 17, 2007 1:50 PM
  • User1413390734 posted

    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

     
     

    Tuesday, September 18, 2007 6:54 AM
  • User-1902688485 posted

    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://msdn.microsoft.com/en-us/library/63ckb9s9.aspx)
    $(WebDirectory)- you need to declare this property. e.g. c:\Build\web...

    <MakeDir Directories="$(SolutionRoot)\ProjectName\bin" Condition="!Exists('$(SolutionRoot)\ProjectName\bin')"/>
    <
    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) 

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, September 24, 2007 11:01 AM
  • User45797585 posted

    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.

    Monday, March 15, 2010 4:53 PM